Skip to content

Commit 084c845

Browse files
committed
feat: ignore elevated users in AIAnswerService
1 parent 9df509c commit 084c845

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Services/AIAnswerService.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ async Task OnMessageReceived(SocketMessage socketMessage)
8686
if(userMessage.Channel is not ITextChannel textChannel) return;
8787
if(userMessage.ReferencedMessage != null) return;
8888
if(textChannel.Guild.Id != _settings.GgjGuildId) return;
89+
90+
// Skip users with elevated permissions (staff/org)
91+
if (userMessage.Author is SocketGuildUser guildUser)
92+
{
93+
if (guildUser.GuildPermissions.Administrator ||
94+
guildUser.GuildPermissions.ManageChannels ||
95+
guildUser.GuildPermissions.ManageMessages)
96+
return;
97+
}
8998

9099
// Basic filter to avoid processing everything, but allow AI to decide relevance
91100
if(string.IsNullOrWhiteSpace(userMessage.Content) || userMessage.Content.Length < 3) return;

0 commit comments

Comments
 (0)