mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
add IsDefined for gateway.Author in MessageEditedResponder.cs
This commit is contained in:
parent
b5e14a7246
commit
f7903260e8
1 changed files with 6 additions and 1 deletions
|
@ -67,7 +67,12 @@ public class MessageEditedResponder : IResponder<IMessageUpdate>
|
|||
return new ArgumentNullError(nameof(gatewayEvent.ID));
|
||||
}
|
||||
|
||||
if (gatewayEvent.Author.Value.IsBot.OrDefault(false))
|
||||
if (!gatewayEvent.Author.IsDefined(out var author))
|
||||
{
|
||||
return new ArgumentNullError(nameof(gatewayEvent.Author));
|
||||
}
|
||||
|
||||
if (author.IsBot.OrDefault(false))
|
||||
{
|
||||
return Result.FromSuccess();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue