Description Notification Setup for BoinkBot
SUMMARY
Run a scheduled task every 30 minutes that fetches the upload date in x_world, store it in the game world props
User enrolls a channel into a given notification, bot will post the in the channel and @ the subscriber
Multiple users should have the ability to enroll on the same channel and just expand the @
Notification types are pre-defined, user only specifies which account they are tracking for that notification type
Table that tracks the status of runs of the notification service
run_date, checks_count, post_count, time_taken
Table to track who is subscribed to which notification
channel_id, discord_id, notification_code, target_player_id
COMMANDS
!notify subscribe <notification_code>
!notify unsubscribe <notification_code>
!notify list
EVENT FLOW
On 11/05 the data pull has 3 villages for bufboy
After the data pull the scheduled job runs and sets the date in the prop file
Carni enrolls #holy-moly for new village alerts, player: bufboy
On 11/06 the data pull has 4 villages for bufboy
After the data pull the scheduled job runs and notices the date has changed
New date is set in the prop file
Run a series of checks by notification code (Following example using new village notification)
Take the notification code and search it in the subscribed channel, collect list of target IDs
For each ID query number of villages for most recent date, and n-1 date
If the number doesn’t match notify the all discord_ids in the channel_id for the given target
On each check run and each notification sent a counter variable is incremented
Final results of the service run is logged to the service table
EXAMPLE NOTIFICATIONS
Ping on the 100 pt CP day
Pings when a new village drop
Ping when members leave or join a specific alliance
Reactions are currently unavailable
You can’t perform that action at this time.
Notification Setup for BoinkBot
SUMMARY
Run a scheduled task every 30 minutes that fetches the upload date in x_world, store it in the game world props
User enrolls a channel into a given notification, bot will post the in the channel and @ the subscriber
Notification types are pre-defined, user only specifies which account they are tracking for that notification type
Table that tracks the status of runs of the notification service
Table to track who is subscribed to which notification
COMMANDS
EVENT FLOW
EXAMPLE NOTIFICATIONS