Skip to content

Commit

Permalink
Attempt to prevent infinite loops in DMs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed May 8, 2024
1 parent 5d31e58 commit 4b7fde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ await e.Channel.SendMessageAsync("It looks like you misunderstood my prefix.\n"

// ai handling

if (e.Channel.IsPrivate || (e.Channel.Id == 1236484733362503751 && !e.Message.Content.StartsWith('.'))&& !e.Author.IsBot && !e.Message.Content.Contains("gptreset"))
if (!e.Author.IsBot && !e.Message.Content.Contains("gptreset") && (e.Channel.IsPrivate || (e.Channel.Id == 1236484733362503751 && !e.Message.Content.StartsWith('.'))))
{
await e.Channel.TriggerTypingAsync();
if (!conversations.ContainsKey(e.Channel.Id))
Expand Down

0 comments on commit 4b7fde1

Please sign in to comment.