/chatgpt-discord-bot

A Discord bot that helps users generate random conversation topics using the GPT-3 language model.

Primary LanguagePythonApache License 2.0Apache-2.0

ChatGPT Discord Bot

How to download it

How to set up

To set up the bot I made it as simple as possible. I now created a config.example.json file where you can put the needed things to edit.

Here is an explanation of what everything is:

Variable What it is
YOUR_BOT_PREFIX_HERE The prefix you want to use for normal commands
YOUR_BOT_TOKEN_HERE The token of your bot
YOUR_BOT_PERMISSIONS_HERE The permissions integer your bot needs when it gets invited
YOUR_APPLICATION_ID_HERE The application ID of your bot
YOUR_OPENAI_API_KEY_HERE The API key of your OpenAI account
OWNER_GUILD_ID The guild ID of the guild where the bot owners are
OWNERS The user ID of all the bot owners
OPENAI_CHATGPT_MODEL The model you want to use for the ChatGPT
CHATGPT_ALLOW_MENTION Whether or not you want to allow mentions in the ChatGPT

How to start

To start the bot you simply need to launch, either your terminal (Linux, Mac & Windows), or your Command Prompt (Windows).

Before running the bot you will need to install all the requirements with this command:

python -m pip install -r requirements.txt

After that you can start it with

python bot.py

Note You may need to replace python with py, python3, python3.11, etc. depending on what Python versions you have installed on the machine.

Issues or Questions

If you have any issues or questions, you can post them here.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Built With

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details

Also, chatgpt_discord_bot/cogs/chatgpt.py is owned by EcmaXp and is licensed under the Apache License 2.0

And, this project forked from kkrypt0nn/Python-Discord-Bot-Template:

  • Keep the credits, and a link to this repository in all the files that contains my code
  • Keep the same license for unchanged code