https://github.com/depthbomb/weathergoat
A Discord bot for reporting weather alerts and hourly forecasts to channels.
https://github.com/depthbomb/weathergoat
bun discord discord-bot discordjs prisma redis typescript weather weather-api
Last synced: 2 months ago
JSON representation
A Discord bot for reporting weather alerts and hourly forecasts to channels.
- Host: GitHub
- URL: https://github.com/depthbomb/weathergoat
- Owner: depthbomb
- License: apache-2.0
- Created: 2023-07-23T05:29:46.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2026-04-13T23:43:58.000Z (2 months ago)
- Last Synced: 2026-04-14T01:21:04.772Z (2 months ago)
- Topics: bun, discord, discord-bot, discordjs, prisma, redis, typescript, weather, weather-api
- Language: TypeScript
- Homepage:
- Size: 8.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A Discord bot for reporting weather alerts and hourly forecasts to channels. Built with [Bun](https://bun.sh), [Discord.js](https://discord.js.org), [Prisma](https://www.prisma.io/orm), [Redis](https://redis.io), and the [National Weather Service API](https://www.weather.gov/documentation/services-web-api).
**[Click here](https://discord.com/oauth2/authorize?client_id=1009028718083199016) to add WeatherGoat to your server.**
# Self-hosting
While self-hosting WeatherGoat really isn't supported, it's not hard to get it set up and running.
First create a `.env` file in the project root and configure it:
```
MODE=development
BOT_TOKEN=abcd
BOT_OWNER_ID=5678
OWNER_PREFIX=$
DATABASE_URL=file:./.data/weathergoat.db
REDIS_URL=redis://localhost:6379
REDIS_PREFIX=wg
MAX_RADAR_MESSAGES_PER_GUILD=1
MAX_ALERT_DESTINATIONS_PER_GUILD=2
MAX_FORECAST_DESTINATIONS_PER_GUILD=2
```
Make sure you have a running Redis instance to use.
Next run `bun migrate:p` to run migrations in production mode, `bun generate-messages` to generate the message catalog and `bun generate-client` to generate the Prisma client code for your environment.
Finally use `bun start` to start the bot. Make sure you set the `MODE` environment variable to `production` unless you want verbose websocket logging flooding your logs.
For managing application commands, see owner-only commands below.
# Development
As of version `2026.4.3`, owner-only commands now use the legacy prefixed commands system and the bot requires the `MESSAGE_CONTENT` intent. These commands should be called in the direct messages channel with the bot. These commands will only work for the owner of the application or an admin or developer if the application is owned by a team.
Use the `commands create-global` command to register application commands globally or `commands create [guildIds:string...]` to register commands to specific guilds. Use `delete`/`delete-global` to delete application commands in specific guilds or globally.