https://github.com/k5342/discord-new-emoji-notifier
A simple discord bot to notify new emojis
https://github.com/k5342/discord-new-emoji-notifier
discord-bot discord-emoji-bot
Last synced: 3 months ago
JSON representation
A simple discord bot to notify new emojis
- Host: GitHub
- URL: https://github.com/k5342/discord-new-emoji-notifier
- Owner: k5342
- Created: 2023-01-07T06:03:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T10:27:44.000Z (over 2 years ago)
- Last Synced: 2025-01-13T05:09:03.278Z (5 months ago)
- Topics: discord-bot, discord-emoji-bot
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# discord-new-emoji-notifier
A simple discord bot to notify new emojis## Example
## Installation & Run
```
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=&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.
## TODO(s)
- rename to a cool name (current: discord-new-emoji-notifier)## Design
To group notifications each polling window, this implementation follows Producer-Consumer pattern### Producer: watch gateway event and register notification queue
1. Watch GuildEmojiUpdate sent from Gateway Event
1. Triggers pushEmojiToQueue() to push notifyRequest### Consumer: send a notification on new emojis to a pre-defined channel
1. Get the notifyRequest pushed by the producer
1. Register the notifyRequest to a notifyQueue
1. (every N minutes) Get requests from the notifyQueue and send a message to the channel