mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-16 18:50:13 +00:00
Fix matching commands with a newline instead of a space after command name
This commit is contained in:
parent
5835ab63cd
commit
c89802a21c
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ namespace PluralKit.Bot.CommandSystem
|
||||||
|
|
||||||
public Parameters(string cmd)
|
public Parameters(string cmd)
|
||||||
{
|
{
|
||||||
_cmd = cmd;
|
// This is a SUPER dirty hack to avoid having to match both spaces and newlines in the word detection below
|
||||||
|
// Instead, we just add a space before every newline (which then gets stripped out later).
|
||||||
|
_cmd = cmd.Replace("\n", " \n");
|
||||||
_ptr = 0;
|
_ptr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue