feat: meeting room locking
This commit is contained in:
@@ -92,7 +92,12 @@ func tryCleanupTempChannel(s *discordgo.Session, ctx context.Context, svc *servi
|
||||
}
|
||||
|
||||
// Check if anyone is still in the channel.
|
||||
g, err := s.Guild(guildID)
|
||||
// IMPORTANT: don't use REST `s.Guild(...)` here; it doesn't include VoiceStates.
|
||||
// Use the session state cache (requires IntentsGuildVoiceStates).
|
||||
if s == nil || s.State == nil {
|
||||
return
|
||||
}
|
||||
g, err := s.State.Guild(guildID)
|
||||
if err != nil || g == nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user