mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 06:17:55 +00:00
Make prefix matching case-insensitive
This commit is contained in:
parent
e6e1ab023a
commit
7f55fca625
1 changed files with 2 additions and 2 deletions
|
|
@ -329,8 +329,8 @@ namespace PluralKit.Bot
|
|||
|
||||
int argPos = -1;
|
||||
// Check if message starts with the command prefix
|
||||
if (msg.Content.StartsWith("pk;")) argPos = 3;
|
||||
else if (msg.Content.StartsWith("pk!")) argPos = 3;
|
||||
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
|
||||
if (id != _client.CurrentUser.Id) // But undo it if it's someone else's ping
|
||||
argPos = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue