Browse Source

Update MessageExtensions.cs

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

+ 1
- 2
src/Discord.Net.Commands/Extensions/MessageExtensions.cs View File

@@ -33,8 +33,7 @@ namespace Discord.Commands
if (endPos == -1) return false;
if (text.Length < endPos + 2 || text[endPos + 1] != ' ') return false; //Must end in "> "

ulong userId;
if (!MentionUtils.TryParseUser(text.Substring(0, endPos + 1), out userId)) return false;
if (!MentionUtils.TryParseUser(text.Substring(0, endPos + 1), out ulong userId)) return false;
if (userId == user.Id)
{
argPos = endPos + 2;


Loading…
Cancel
Save