Browse Source

Update CommandService.cs

IndexOf => LastIndexOf
pull/1130/head
JustNrik GitHub 7 years ago
parent
commit
b8f8799035
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Commands/CommandService.cs

+ 2
- 2
src/Discord.Net.Commands/CommandService.cs View File

@@ -357,9 +357,9 @@ namespace Discord.Commands
switch (type)
{
case SuffixType.String:
return ExecuteAsync(context, text.Remove(text.IndexOf(suffix) - 1), services, multiMatchHandling);
return ExecuteAsync(context, text.Remove(text.LastIndexOf(suffix) - 1), services, multiMatchHandling);
case SuffixType.Mention:
return ExecuteAsync(context, text.Remove(text.IndexOf(context.Client.CurrentUser.Mention) - 1), services, multiMatchHandling);
return ExecuteAsync(context, text.Remove(text.LastIndexOf(context.Client.CurrentUser.Mention) - 1), services, multiMatchHandling);
}
return ExecuteAsync(context, text, services, multiMatchHandling);
}


Loading…
Cancel
Save