Beta: clean up servers that opted out while the bot was offline
The bot remembers where it registered beta commands (beta_registered) and removes them from servers that are no longer in the beta at the next start. Failed cleanups are retried; a server the bot has left is forgotten. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
fcf4f3ccbd
commit
9839bba50e
9 files changed
+393
-30
No files matched your search
@@ -94,14 +94,7 @@ func main() {
|
||||
defer bot.Close()
|
||||
|
||||
// Who the beta testers are is set on the dashboard; follow it.
|
||||
bot.WatchBeta(context.Background(), func(ctx context.Context) (string, string, []string, error) {
|
||||
guildID, roleID, err := settingsRepo.GetBetaSettings(ctx)
|
||||
if err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
servers, err := settingsRepo.ListBetaGuilds(ctx)
|
||||
return guildID, roleID, servers, err
|
||||
})
|
||||
bot.WatchBeta(context.Background(), settingsRepo)
|
||||
|
||||
fmt.Println("Bot is running...")
|
||||
|
||||
|
||||
Reference in new issue
Block a user