This discord bot was made for DevNestHacks using discord.py. Current features:
/advice: receive a 'green' tip through AI/ecochallenge: recieve a random eco-friendly challenge!/forecast [city]: view the forecast for the next five days/help: list out all the commands/news: view the latest cliamte change news (BBC)/ping: test the bot ping/weather [city]: view the current weather (default: Oakville)
- This is not slash commands, the prefix is '/' *
Click on the Invite Link to test the bot out in your own server!
For windows:
pip install discord.py requests beautifulsoup4 python-dotenv asyncio transformers
For mac:
pip3 install discord.py requests beautifulsoup4 python-dotenv asyncio transformers
- Pre-reqs: have python installed on your computer
- Install the packages above and clone the repo
- Create a
.envfile in the/srcdirectory - Head to the Discord developer portal, and create a bot
- Ensure you have intents enabled in settings
- Copy your discord token and in your
.envfile, write:
DISCORD_BOT_TOKEN = your_token
- Head over to Weather Api, and create a free account. Copy the API Key
- Return to your
.envfile, and add the following to the second line:
APP_KEY = your_api_key
- Run the program in your terminal, and it should work!
python3 src/main.py