Fix error on empty message
This commit is contained in:
parent
0ae2cb36f5
commit
bbbbb5a046
@ -325,7 +325,7 @@ namespace PluralKit.Bot
|
|||||||
// Check if message starts with the command prefix
|
// Check if message starts with the command prefix
|
||||||
if (msg.Content.StartsWith("pk;", StringComparison.InvariantCultureIgnoreCase)) argPos = 3;
|
if (msg.Content.StartsWith("pk;", StringComparison.InvariantCultureIgnoreCase)) argPos = 3;
|
||||||
else if (msg.Content.StartsWith("pk!", StringComparison.InvariantCultureIgnoreCase)) argPos = 3;
|
else if (msg.Content.StartsWith("pk!", StringComparison.InvariantCultureIgnoreCase)) argPos = 3;
|
||||||
else if (Utils.HasMentionPrefix(msg.Content, ref argPos, out var id)) // Set argPos to the proper value
|
else if (msg.Content != null && Utils.HasMentionPrefix(msg.Content, ref argPos, out var id)) // Set argPos to the proper value
|
||||||
if (id != _client.CurrentUser.Id) // But undo it if it's someone else's ping
|
if (id != _client.CurrentUser.Id) // But undo it if it's someone else's ping
|
||||||
argPos = -1;
|
argPos = -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user