From 196c6ac6981612204944434f752767956bed44bb Mon Sep 17 00:00:00 2001 From: RogueException Date: Fri, 12 Feb 2016 00:32:50 -0400 Subject: [PATCH] Fixed crash if prefix mention is checked in PM --- 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 647bd01f1..5969b9691 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -97,8 +97,8 @@ namespace Discord.Commands //Check for mention if (cmdMsg == null && Config.AllowMentionPrefix) { - if (msg.StartsWith(e.Server.CurrentUser.Mention)) - cmdMsg = msg.Substring(e.Server.CurrentUser.Mention.Length + 1); + if (msg.StartsWith(client.CurrentUser.Mention)) + cmdMsg = msg.Substring(client.CurrentUser.Mention.Length + 1); else if (msg.StartsWith($"@{client.CurrentUser.Name}")) cmdMsg = msg.Substring(client.CurrentUser.Name.Length + 1); }