Browse Source

NullRef fix

pull/1199/head
ComputerMaster1st 7 years ago
parent
commit
767b65f3e2
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

@@ -45,7 +45,7 @@ namespace Discord.Commands
public static bool HasMentionPrefix(this IUserMessage msg, IUser user, ref int argPos)
{
var text = msg.Content;
if (text.Length <= 3 || text[0] != '<' || text[1] != '@') return false;
if (string.IsNullOrEmpty(text) || text.Length <= 3 || text[0] != '<' || text[1] != '@') return false;

int endPos = text.IndexOf('>');
if (endPos == -1) return false;


Loading…
Cancel
Save