A simple side project for testing GitHub Action and sending weather updates to Discord.
This is a small bot called Jarvis, which is open source. It uses the Open-Meteo API to fetch weather data and sends it to a Discord channel.
- Fetches weather data from Open-Meteo API
- Sends weather updates to a Discord channel
- Uses GitHub Action for automated testing
- The bot uses the
discord.js
library to connect to Discord and send messages. - It uses the
https
module to make API calls to Open-Meteo. - The
graph_gen.js
file generates a chart based on the weather data with the lib chartJS. - The bot sends the chart to the Discord channel.
To use this bot, you'll need to:
- Create a Discord bot token and add it to your environment variables.
- Create a GitHub Action workflow to automate testing.
- Set up a Discord channel for the bot to send updates to.
The code for this bot is located in the index.js
file.
The bot uses the following environment variables:
DISCORD_BOT_TOKEN
CLIENT_ID
To start the bot, navigate to the project directory in your terminal and run the following commands:
npm install
npm start
This will install libs and start the bot, it will send weather updates to the specified Discord channel.