fix: don't try matching commands if there is nothing to match

This commit is contained in:
spiral 2021-05-01 19:18:04 +01:00
parent 1e5ba5f985
commit cf93b8b3cc
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -103,7 +103,7 @@ namespace PluralKit.Bot
if (content == null) return false;
// Check for command prefix
if (!HasCommandPrefix(content, shard.User?.Id ?? default, out var cmdStart))
if (!HasCommandPrefix(content, shard.User?.Id ?? default, out var cmdStart) || cmdStart == content.Length)
return false;
// Trim leading whitespace from command without actually modifying the string