Skip to content

Commit

Permalink
Ignore replies with empty content
Browse files Browse the repository at this point in the history
  • Loading branch information
smallketchup82 committed Sep 27, 2024
1 parent 768f397 commit e00ea86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ketchupbot-discord/GalaxyGPT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public static async Task HandleMessage(SocketMessage messageParam, DiscordSocket

if (allowedChannels != null && !allowedChannels.Contains(message.Channel.Id)) return;

if (message.Type == MessageType.Reply && message.ReferencedMessage.Author.Id == client.CurrentUser.Id && message.ReferencedMessage.ReferencedMessage.Author.Id == message.Author.Id)
if (!string.IsNullOrWhiteSpace(message.Content) && message.Type == MessageType.Reply &&
message.ReferencedMessage.Author.Id == client.CurrentUser.Id &&
message.ReferencedMessage.ReferencedMessage.Author.Id == message.Author.Id))

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

Invalid expression term ')'

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

; expected

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

} expected

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

Invalid expression term ')'

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

; expected

Check failure on line 25 in ketchupbot-discord/GalaxyGPT.cs

View workflow job for this annotation

GitHub Actions / build

} expected
{
IDisposable? typing = message.Channel.EnterTypingState();
try
Expand Down

0 comments on commit e00ea86

Please sign in to comment.