The Discord bot to schedule announcements on your server!
To use the bot you need to add a role called "Announcer" to your server, and only those with that role will be able to schedule announcements. You also need to make sure that the bot has permissions to send messages to the channels where you want to send announcements to.
Click here to add this bot to your server for free!
Click here to join the cronnouncer discord server, where you can demo the bot, ask for help, report bugs, suggest features, and give feedback.
Here is an example of what the announcement message looks like:
Note: Right now the announcement message does not support file/image attachments or link previews.
To use this bot, you must create a role called Announcer
. Only those with this role will be able to run any of the following commands.
Command | Description | Usage | Example |
---|---|---|---|
.timezone | Sets the timezone for the discord server (you only have to do this once). Available timezones (case sensitive): US/Alaska , US/Aleutian , US/Arizona , US/Central , US/East-Indiana , US/Eastern , US/Hawaii , US/Indiana-Starke , US/Michigan , US/Mountain , US/Pacific , US/Samoa |
.timezone {timezone} | .timezone US/Pacific |
.create | Creates a new announcement | .create | .create |
.set-channel | Sets the channel for the in-progress announcement | .set-channel {announcementID} {discord channel name} | .set-channel 33 #general |
.set-message | Sets the message for the in-progress announcement | .set-message {announcementID} {announcement content} | .set-message 33 One super awesome announcement |
.set-time | Sets the time for the in progress announcement | .set-time {announcementID} {MM/DD/YYYY hh:mm am/pm} | .set-time 33 4/20/2021 4:20 pm |
.schedule | Schedules the announcement to be sent | .schedule {announcementID} | .schedule 33 |
.unschedule | Un-schedules an announcement that is scheduled to be sent | .unschedule {announcementID} | .unschedule 33 |
.list | Lists all unscheduled, scheduled, and sent announcements | .list | .list |
.view | Shows details for the announcement | .view {announcementID} | .view 33 |
.delete | Deletes and un-schedules an announcement | .delete {announcementID} | .delete 33 |
.ping | Returns latency stats | .ping | .ping |
.help | Get list of available commands | .help | .help |
- Node.js 14
- Docker Desktop (for development or hosting locally)
git clone https://github.com/amanzanero/cronnouncer.git
cd cronnouncer
npm i
- create a discord app
- create a bot and get secret token
- add .env to root folder and paste
DISCORD_TOKEN=<put your token here>
. Look at .env.dev or .env.prod for other required variables
If you'd like to use the database built into this project:
- Copy environment variables from .env.prod into a .env file
- Run
docker-compose up -d
to start bot and database using docker
To shut down: docker-compose down
- Copy environment variables from .env.dev into a .env file
docker-compose up -d db
to spin up postgresql containernpm run dev
to start bot locally using ts-node
Run npm run pushcheck
. If all looks good, go ahead and PR to main.