This is a simple Discord bot that responds to user messages with various commands.
- Hello: Send the bot a message saying "hello" to receive a friendly greeting.
- Roll: Type "roll" to get a random number between 1 and 6.
- Help: Send the bot the command "!help" to get assistance and information about available commands.
- Custom Responses: The bot also provides custom responses to certain inputs, such as "hi."
- Invite the bot to your Discord server.
- Start a conversation with the bot by mentioning its name or sending a direct message.
- Use the supported commands mentioned above to interact with the bot.
Feel free to modify the handle_response
function in the bot.py
script to add more custom responses based on your requirements.
- Python 3.7 or higher
- discord.py library
- Clone the repository to your local machine.
- Install the required dependencies by running the following command:
pip install discord.py
- Replace the
'YOUR_DISCORD_TOKEN'
placeholder inbot.py
with your actual Discord bot token. - Run the bot script by executing the following command:
python bot.py
Make sure you have created a Discord bot and obtained a valid bot token before running the script. For more information on creating a Discord bot and obtaining a token, refer to the Discord Developer Portal documentation.
Feel free to explore and modify the code according to your needs. Enjoy using the Discord bot!