A simple discord bot to notify new emojis
cp .env{.example,}
$EDITOR .env # issue a BOT_TOKEN from Discord Developer Portal
go mod tidy
go run main.go
An invitation link is formatted as here; using client_id you can get from Discord Developer Portal:
https://discord.com/oauth2/authorize?client_id=<client_id>&scope=bot&permissions=2048
After joining to your server, use /register
command at a channel where you want the bot to notify new emojis to register as a notification channel.
use /unregister
command to remove from notification list.
- rename to a cool name (current: discord-new-emoji-notifier)
To group notifications each polling window, this implementation follows Producer-Consumer pattern
- Watch GuildEmojiUpdate sent from Gateway Event
- Triggers pushEmojiToQueue() to push notifyRequest
- Get the notifyRequest pushed by the producer
- Register the notifyRequest to a notifyQueue
- (every N minutes) Get requests from the notifyQueue and send a message to the channel