Command rework
This commit is contained in:
@@ -47,6 +47,16 @@ func StartTwitchLiveLoop(s *discordgo.Session, svc *services.Services) {
|
||||
for _, guildID := range guildIDs {
|
||||
log.Printf("twitch: processing guild %d", guildID)
|
||||
|
||||
enabled, err := svc.Twitch.IsEnabled(ctx, guildID)
|
||||
if err != nil {
|
||||
log.Printf("twitch: failed to check enabled state for guild %d: %v", guildID, err)
|
||||
continue
|
||||
}
|
||||
if !enabled {
|
||||
log.Printf("twitch: notifications disabled for guild %d", guildID)
|
||||
continue
|
||||
}
|
||||
|
||||
channelID, ok, err := svc.Twitch.GetNotificationChannel(ctx, guildID)
|
||||
if err != nil {
|
||||
log.Printf("twitch: failed to get channel for guild %d: %v", guildID, err)
|
||||
|
||||
Reference in New Issue
Block a user