mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Skip leading spaces when command parsing
This commit is contained in:
parent
668d249872
commit
e9a271ef60
1 changed files with 3 additions and 0 deletions
|
|
@ -140,6 +140,9 @@ namespace PluralKit.Bot
|
|||
|
||||
private WordPosition? NextWordPosition(int position)
|
||||
{
|
||||
// Skip leading spaces before actual content
|
||||
while (position < _cmd.Length && _cmd[position] == ' ') position++;
|
||||
|
||||
// Is this the end of the string?
|
||||
if (_cmd.Length <= position) return null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue