diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index eb3cfcb3..3d565c81 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -161,8 +161,12 @@ namespace PluralKit.Bot int argPos = 0; // Check if message starts with the command prefix - if (arg.HasStringPrefix("pk;", ref argPos) || arg.HasStringPrefix("pk!", ref argPos) || arg.HasMentionPrefix(_client.CurrentUser, ref argPos)) + if (arg.HasStringPrefix("pk;", ref argPos, StringComparison.OrdinalIgnoreCase) || arg.HasStringPrefix("pk!", ref argPos, StringComparison.OrdinalIgnoreCase) || arg.HasMentionPrefix(_client.CurrentUser, ref argPos)) { + // Essentially move the argPos pointer by however much whitespace is at the start of the post-argPos string + var trimStartLengthDiff = arg.Content.Substring(argPos).Length - arg.Content.Substring(argPos).TrimStart().Length; + argPos += trimStartLengthDiff; + // If it does, fetch the sender's system (because most commands need that) into the context, // and start command execution // Note system may be null if user has no system, hence `OrDefault` diff --git a/PluralKit.Bot/Commands/HelpCommands.cs b/PluralKit.Bot/Commands/HelpCommands.cs index a4aee6b7..a4c09edb 100644 --- a/PluralKit.Bot/Commands/HelpCommands.cs +++ b/PluralKit.Bot/Commands/HelpCommands.cs @@ -8,7 +8,7 @@ namespace PluralKit.Bot.Commands public class HelpCommands: ModuleBase { [Command] - public async Task HelpRoot() + public async Task HelpRoot([Remainder] string _ignored) { await Context.Channel.SendMessageAsync(embed: new EmbedBuilder() .WithTitle("PluralKit")