This is an example Discord bot which can watch your server, check for certain ROLE updates and notify a user/channel if that role changes.
For example: Someone subscribed, gained a new role, and you want them to be notified.
Environment | Description |
---|---|
APPLICATION_ID |
(OPTIONAL - NOT IN USE) Bot application Id |
PUBLIC_KEY |
(OPTIONAL - NOT IN USE) Channel public key |
BOT_TOKEN |
Insert your bot secret token here |
SUBSCRIBED_ROLE_IDS |
List of ids(numbers) for the role you want to watch |
NOTIFICATION_TYPE |
The target for the notification: either user or channel |
NOTIFICATION_ID |
The target Id for the notification (user or channel) |
GO_ENV |
"development/production" |
GO_LOG_LEVEL |
"debug/info/warn/panic" |
task install-requirements
task run
or
go run cmd/bot/bot.go