khiemledev / khiemle_discord_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Khiem Le Discord Bot (Slave of Khiem Le)

Features

General:

  • /help - List all commands
  • /ping_bot - Ping the bot
  • /random_number - Choose random number in a range
  • /random_pick - Randomly pick an item from a list

Moderation:

  • /vote_kick - Create a poll to kick a member
  • /vote_ban - Create a poll to ban a member

ChatGPT:

  • /chatgpt - Chat with GPT-3
  • You can mention the bot to chat with it (using ChatGPT under the hood)

Meme:

  • /meme - Get random meme

Start the bot

Using Docker

First, you need to change the environment variables in the .env.prod file:

DISCORD_BOT_TOKEN=replace_with_your_key
CHATGPT_MODEL_NAME=gpt-3.5-turbo
OPENAI_API_KEY=replace_with_your_key

Then, start the bot using Docker:

docker-compose up -d

Manually

First, you need to set these environment variables:

export DISCORD_BOT_TOKEN=replace_with_your_key
export CHATGPT_MODEL_NAME=gpt-3.5-turbo
export OPENAI_API_KEY=replace_with_your_key

Then, install the dependencies:

pip install -r requirements.txt

Finally, start the bot:

cd src
python main.py

Config

You can change the config in the src/config/app.yaml file. The config in ${env:ENV_NAME} will be loaded from environment variable.

To-do

Want a features?

Feel free to open an issue or create a pull request.

Issues

If you have any issues, please open an issue.

About


Languages

Language:Python 99.6%Language:Dockerfile 0.4%