From b8f87990356b819a12ec5f4c1c8bf2d1bee4350c Mon Sep 17 00:00:00 2001 From: JustNrik <35231903+JustNrik@users.noreply.github.com> Date: Wed, 22 Aug 2018 14:25:09 -0400 Subject: [PATCH] Update CommandService.cs IndexOf => LastIndexOf --- src/Discord.Net.Commands/CommandService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index 64b6f8b1e..9a8cd97f2 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -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); }