Oreo is a simple Discord bot with basic functionalities. It can greet users, echo messages, welcome members when they join, and provide current weather information for a given city.
- Greeting: The bot can greet users.
- Echo: The bot can repeat what you ask it to say.
- Welcome: The bot sends a welcome message to new members when they join the server.
- Weather: Users can get the current weather for a given city.
!hello: Greets the user.!say [message]: The bot will echo back the message.!weather [city_name]: Fetches the weather for the given city.
- Python
- Discord.py library
- An OpenWeatherMap API key
-
Token Setup: Save your Discord bot token in a file named
token.txt. -
API Key Setup: Replace the existing API key in the
weatherfunction with your OpenWeatherMap API key. -
Python Libraries: Install the required libraries using pip:
pip install discord.py requests
-
Run the Bot: Simply run the provided python script to start the bot:
python [filename].py
- Ensure your bot has the necessary permissions to read messages and send messages in the channel.
- The weather command fetches the weather using OpenWeatherMap. Ensure you use a valid and active API key, or the command will fail.
- Add more detailed error handling for edge cases, such as when the city is not found or the API limit is reached.
- Expand bot functionality with more useful and interactive commands.
Contributions are always welcome. Ensure you follow the standard coding conventions and comment on your changes adequately.
This project is open-source and available to anyone. Ensure to mention the original author when using or modifying this bot for your purposes.