My personal Discord bot, developed using Pycord (migrated from discord.py). My first major coding project. Feel free to give me any questions, feedback, suggestions, bug reports, or to use the code for yourself.
Development Discord Server: https://discord.gg/DKpCvsJ4fp
Install Python 3.7+
Download the repository files
Install the required libraries:
pip install -r requirements.txt
Create a .env
file with the following template:
DISCORD_TOKEN = your_discord_bot_token
HUGGINGFACE_TOKEN = your_huggingface_token
CHATBOT_EMAIL = your_openai_email
CHATBOT_PASSWORD = your_openai_password
Finally, start the bot!
python bot.py
Note: There are references to me or the servers I'm in. Feel free to change them, such as: reporting errors to tylersfoot#8888 and the developers
variable in bot.py
.
/uptime
- returns the uptime of the bot since last restart
.prefix
- returns the current guild's prefix (soon depreciated)
/ping
- returns the bot's ping
/update_guilds
- updates the bot's guild count
[DEV] /unload extension:str
- unloads a specified cog or all cogs
[DEV] /reload extension:str
- reloads/loads a specified cog or all cogs
[DEV] /sync
- syncs all slash commands
[DEV] /clear_temp
- deletes all files in the bot's temp folder
[DEV] /stopbot
- stops the instance of the bot
/calc expression:str
- calculates the given expression
/chat prompt:str
- sends a prompt to the chatbot and returns the response
/chatlogin
- logs in to the chatbot
/chatrefresh
- refreshes the chatbot's thread and deletes previous context
(WIP)
/eightball question:str
- lets the 8ball decide your fate
/say message:str
- makes the bot say the message specified
/coinflip
- flips a coin. duh.
/punch user:discord.Member
- punches the user mentioned
/doublepunch user1:discord.Member user2:discord.Member
- punches two users mentioned
/roundhousekick users:str
- roundhouse kicks all people mentioned
[DEV] /removerole user:discord.Member role:discord.Role
- removes the specified role from the specified user
/img prompt:str
- generates 9 images based on the prompt using Craiyon AI
/suggestion text:str
- sends a suggestion to the developer(s)
/bugreport text:str
- sends a bugreport to the developer(s)
/servercount
- returns the number of servers the bot is in
/invitelink
- sends the invite link for the bot & the discord server
/avatar member:discord.Member
- returns the avatar for the user mentioned (author if none)
/serverinfo
- returns information about the current server
account_creation_date
- returns the date of the user's account creation
(WIP)
/play url:str
- plays the audio from the youtube link provided
/join
- joins the voice channel the user is in
/disconnect
- disconnects from the currently connected voice channel
/pause
- pauses the current audio
/resume
- resumes playing the current audio
/stop
- stops playing audio
(WIP)
(WIP)
(WIP)
/wikisearch request:str
- returns a list of Wikipedia articles based on the request
/wiki request:str
- returns a summary of the specified Wikipedia article
/wikirandom
- returns the summary of a random Wikipedia article
(WIP)