Giter Club home page Giter Club logo

discordbot-mdn's Introduction

おしゃべりぼっと!もだねちゃん

おしゃべりぼっと!もだねちゃん

目次

1. もだねちゃんとは?

もだねちゃんは、ボイスチャットツール Discord 上で働いてくれる読み上げ Bot です。
テキストチャンネルに投稿された文章をボイスチャンネルで読み上げてくれます。

「しゃべるのが恥ずかしい」「深夜なので声を出しにくい」などの理由でお声を出しづらい方でも、お友達と楽しく会話することができます。

働いている様子はこちら!※Youtube へ移動します

読み上げBot もだねちゃん 紹介動画

2. Bot の導入方法・使い方

📙お仕事内容ガイドブック をご覧ください。
※ ご協力いただいている少数のサーバーにて試験運用中のため、現在 Bot の一般公開は行っておりません。

3. 構築

環境を構築して Bot を稼働させる場合は以下の手順で行います。
実行に関しては自己責任でお願いします。

3.1. 必要なもの

  • Docker および Docker Compose が実行可能な環境(手順は WSL2 上での実行)
  • 約 850 MB 以上の空き容量(下記内訳)
    • discordbot-mdn_main イメージ: 546 MB
    • postgres イメージ: 217 MB
    • discordbot-mdn_db-volume ボリューム: 50 MB ~
  • Discord Bot のトークン

3.2. 実行手順

  1. リポジトリをクローン。

    $ git clone https://github.com/kenkenpa198/discordbot-mdn.git
  2. リポジトリのルートディレクトリへ移動。

    $ cd discordbot-mdn
  3. .env ファイルを作成し、パスワードとトークンを記述。

    $ cp .env.sample .env
    $ vim .env
    # PostgreSQL イメージ用の環境変数
    POSTGRES_USER=discordbot-mdn
    POSTGRES_PASSWORD=__ENTER_PG_PASSWORD_HERE__ # 好みのパスワードを記述
    POSTGRES_DB=discordbot-mdn-db
    
    # PostgreSQL の接続用 URL
    DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
    
    # bot のトークン
    BOT_TOKEN=__ENTER_BOT_TOKEN_HERE__           # Discord Bot のアクセストークンを記述
  4. docker-compose コマンドでコンテナを立ち上げ。

    $ docker-compose up -d
    Creating network "discordbot-mdn_default" with the default driver
    ...
    Creating discordbot-mdn_db_1   ... done
    Creating discordbot-mdn_main_1 ... done
  5. main_1 db_1 コンテナが起動していることを確認。

    $ docker ps
    CONTAINER ID   IMAGE                      ...   NAMES
    aaaaaaaaaaaa   discordbot-mdn_main        ...   discordbot-mdn_main_1
    bbbbbbbbbbbb   postgres:14.5-alpine3.16   ...   discordbot-mdn_db_1
  6. コンテナのログを確認。main_1 側のログへ Hello, World! と表示されていれば OK 。

    $ docker-compose logs -f
    main_1  | ====================================
    main_1  |            discordbot-mdn
    main_1  | ====================================
    main_1  | 2022-11-08 21:55:43.408075
    main_1  | python 3.10.6
    main_1  | discord.py 2.0.1
    main_1  | 2022-11-08 21:55:43,409 [ INFO ] Bot を起動
    ...
    main_1  | 2022-11-08 21:55:47,198 [ INFO ] Bot ログイン後の処理を完了
    main_1  | 2022-11-08 21:55:47,198 [ INFO ] Hello, World!
  7. Bot を招待したサーバーで実行確認。
    参考: 📙お仕事内容ガイドブック

4. 使用ソフトウェア

5. ライセンス

GNU General Public License v2.0

6. 参考文献

6.1. Discord Bot

6.2. Docker

7. 謝辞

しばたまさあきさん、捕食域の皆さんに相談やテストなどでご協力いただきました。
ありがとうございました!

discordbot-mdn's People

Contributors

dependabot[bot] avatar kenkenpa198 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.