Browse Source

Update MessageExtensions.cs

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

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

@@ -52,7 +52,7 @@ namespace Discord.Commands
var text = msg.Content; var text = msg.Content;
if (text.Length <= 3 || text[text.Length - 1] != '>') return false; if (text.Length <= 3 || text[text.Length - 1] != '>') return false;


int iniPos = text.IndexOf('<');
int iniPos = text.LastIndexOf('<');
if (iniPos == -1) return false; if (iniPos == -1) return false;
if (!MentionUtils.TryParseUser(text.Substring(iniPos, text.Length - iniPos), out ulong userId)) return false; if (!MentionUtils.TryParseUser(text.Substring(iniPos, text.Length - iniPos), out ulong userId)) return false;
if (user.Id == userId) return true; if (user.Id == userId) return true;


Loading…
Cancel
Save