Browse Source

Minor Change

pull/1200/head
ComputerMaster1st 6 years ago
parent
commit
f9e34fd95d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Commands/Extensions/MessageExtensions.cs

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

@@ -19,7 +19,7 @@ namespace Discord.Commands
public static bool HasCharPrefix(this IUserMessage msg, char c, ref int argPos)
{
var text = msg.Content;
if (!string.IsNullOrEmpty(text) && text.Length > 0 && text[0] == c)
if (!string.IsNullOrEmpty(text) && text[0] == c)
{
argPos = 1;
return true;
@@ -45,7 +45,7 @@ namespace Discord.Commands
public static bool HasMentionPrefix(this IUserMessage msg, IUser user, ref int argPos)
{
var text = msg.Content;
if (!string.IsNullOrEmpty(text) && 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