This is a simple bot that is used to automate filing of GitHub issues by scraping the Discord chat. It uses OpenAI's GPT-4 Turbo to analyze the chat and embedded images to gather the information about issues, which in turn are automatically filed on GitHub.
- OpenAI API account with access to GPT-4 Turbo
- Discord bot token
- GitHub App registered and added to wanted repositories
- MongoDB database
- Python 3.10 or higher
- Libraries listed in
requirements.txt
- Create a directory in the root of the project called
certs/
and place your GitHub App private key there. - In the project directory create a
.env
file that should contain:DISCORD_TOKEN=
- Discord app tokenOPENAI_API_KEY=
- OpenAI API key with access to GPT-4 TurboGITHUB_APP_ID=
- GitHub App IDGITHUB_APP_KEY=
- Name of your GitHub App private key file that you placed in thecerts/
directoryMONGO_URI=
- MongoDB connection URI
- Run the bot with
python bugbot.py
- Invite the bot to your Discord server
To configure the bot simply call /setup
command in Discord. You will be asked to fill the following:
-
GitHub repository name.
owner/repo
-
Product name and type in separate lines.
Best Game Ever video game
-
Issue categories in separate lines.
UI Performance Other
-
Additional information to collect for the issue in separate lines.
Hardware and drivers Operating system
Standard information that is always collected and doesn't need to be specified in this configuration step:
- Product version
- Description
- Workarounds
-
Name of the Discord developer role, to distinguish them in the chat.
Developer
Find the message that begins the conversation about the issue you want to report, copy link to it and call /bug
with the link as an argument.
You may also give it an optional bug_hint
argument to help the bot understand the issue better.