A bot that allows only links to be posted in channels. Whenever someone posts a non-link message, this bot deletes the message.
Has additional features which utilize some of the free Public APIs listed @ https://github.com/public-apis/public-apis
- List of Available commands
- Try Running it yourself !
I added some additional features to this bot as well ! Type the following commands in the chat to get a response from the bot !
$inspire
- The bot sends randomly retreived Inspirational quotes fetched from here.
$xkcd number
- The bot sends randomly retreived XKCD Comic strips fetched from here.
-
$joke
- The bot sends randomly retreived jokes fetched from here. -
$BardofAvon <some text>
- The bot responds with Shakespearean translation of<sometext>
from here.
-
Install requirements This can be done by navigating to the directory having requirments.txt and running the following in the terminal:
pip install -r requirements.txt
-
Create your Discord own bot and generate it's Token
- You'll need to have a Discord account and make sure you have access to their developer portal.
- Create a bot and then generate a token and copy it.
- Add the bot to your Discord Server
-
Run the project
- In the first_bot.py file, put your copied token in the
client.run()
function at the end as a string. - All that's left to do now is run the Project ! You can do so by :
- In the first_bot.py file, put your copied token in the
python first_bot.py
or
python3 first_bot.py
The script is running successfully and your bot is functional if you see the following in the terminal :
The bot has started.
<BOT username>#number