- Watches chats for the names of programming languages
- When it detects a programming language it will send an image (if available) of an anime girl holding a book about that language.
Images are sourced from the Anime-Girls-Holding-Programming-Books repo so if you want to see an image you made then fork that repo and make a pull request to add the image.
- Download this repo
- Create a Discord bot
- Set the Privileged Gateway Intents in the Bot tab all to on
- Get the invite link from the OAuth2 URL Generator in the OAuth2 tab
- Give it the scope bot
- Give it the following permissions:
- Send Messages
- Read Message History
- Embed Links
📝 Note: Im not certain it needs anything other than Send Messages but tbh its easier to just give it the extra perms just in case :)
- Copy the URL into your browser and invite it to the server you want it on
- Create a .env file in the folder with the python script and copy the contents of the .env.example file into it
- Reset the token for the bot and paste the token in the .env file.
- Check over the config.json file and make the desired changes. I have set a few specific languages to false by default because they will cause spam.
- Either host the bot on a server or host it from your own computer and thats it. I have my bot run on my pc startup
- Why are C# and C++ set to false by defaut?
Because the code looks for words using word characters and # and + arent included. So when it sees C# or C++ it sees it as C and then sends an image from all 3 languages. This can be fixed I'm just lazy.
- Why is it a .pyw file instead of .py?
Because it doesnt open a cmd window when it runs as a .pyw. Feel free to change this to a .py if you want.