https://github.com/johncmanuel/bdaybot
Discord bot that sends a message to a channel when it's someone's birthday!
https://github.com/johncmanuel/bdaybot
deno discord discord-slash-commands
Last synced: about 1 month ago
JSON representation
Discord bot that sends a message to a channel when it's someone's birthday!
- Host: GitHub
- URL: https://github.com/johncmanuel/bdaybot
- Owner: johncmanuel
- Created: 2024-11-21T05:50:01.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-12-31T18:59:19.000Z (4 months ago)
- Last Synced: 2025-01-29T21:55:51.827Z (3 months ago)
- Topics: deno, discord, discord-slash-commands
- Language: TypeScript
- Homepage: https://bdaybot.deno.dev/
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bdaybot
Discord bot that sends a message to a channel when it's someone's birthday!
## Setup
1. Install [Deno](https://docs.deno.com/runtime/getting_started/installation/) and [ngrok](https://download.ngrok.com/). Alternatively, you can use [Devbox to install them instead](https://www.jetify.com/docs/devbox/installing_devbox/)
2. Set up the environment variables as shown in [.env.example](https://github.com/johncmanuel/bdaybot/blob/master/.env.example) in another file, `.env`. See [your Discord application after creating it](https://discord.com/developers/applications/) to get the secrets.
3. Run `deno install` to install dependencies
4. Run the server with `deno task start` and run ngrok using `deno task ngrok`. **Set the URL found in the ngrok window under the Interactions Endpoint URL in the General tab of your Discord app.**
5. Invite your app/bot to a test Discord server using `/invite`
6. Test the commands to see if they work!For production, make sure to replace the interaction endpoint URL specified in your Discord application with the actual server URL.
## Commands
1. `/bday user add`
2. `/bday user get`
3. `/bday user list`
4. `/bday user rm`
5. `/bday user update`## Birthday Notification
A Deno Cron routine will run every midnight either in UTC (default) or PST/PDT. The cron job sends a message via a Discord webhook that notifies others about someone's birthday for that particular day. PST/PDT time can be activated by setting `USE_PST_PDT` to `"true"`.