feat: meeting room locking

This commit is contained in:
2026-03-17 17:11:22 +00:00
parent c4dd7302bc
commit 76aeca3de6
4 changed files with 278 additions and 1 deletions
+6 -1
View File
@@ -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
}