This is a discord bot coded in python which can play songs, crack jokes, look up something on the wikipedia using specific command words
To use this code -
-
You need to make a bot in discord's developer portal - https://discord.com/developers/applications In this page go to the applications section first and make a discord bot, grant it permissions and copy its token number and paste it in the "keys.py" file
-
Then add this bot to a discord server.
-
Now run the code. When you hear a beep sound from the python project, it indicates that the bot has come online on the server - you can see it come online on the server too.
-
Now you can use commands with ">" symbol and wait for the bot to reply.
You can try the following commands -
-
">hi" or ">hello" and the other keywords listed in the dialogues page to "HEY" list to get a hi back from the bot. You can also write ">bye" to get a bye frmom bot.
-
This bot can also spam whatever string you want it to spam. Just write ">spam (insert the string here)" like ">spam discord". If you want it to shut up just write ">shutup".
-
Write ">crack a joke" to get a joke as response from the discord bot.
-
Write ">search (insert the topic to search here)" like ">search adele" and you'll get a search list. To seach a specific topic from the search list just do ">search option (insert option no. here)".
-
Play songs with it like - ">play roar" and it will play the song for you. DONT FORGET TO JOIN THE VOICE CHANNEL FIRST FOR THIS TO WORK.
NOTE: for the song to work, make sure that you have a "song.mp3" file in the project directory and FFMPEG installed.
- Further on you can pause, resume, replay the song that's playing using ">" symbol.