diff --git a/src/Discord.Net.Commands/CommandContext.cs b/src/Discord.Net.Commands/CommandContext.cs index aa2a99abd..50b41f02e 100644 --- a/src/Discord.Net.Commands/CommandContext.cs +++ b/src/Discord.Net.Commands/CommandContext.cs @@ -21,7 +21,7 @@ public CommandContext(IDiscordClient client, IUserMessage msg) { Client = client; - Guild = (msg.Channel as IGuildChannel).Guild; + Guild = (msg.Channel as IGuildChannel)?.Guild; Channel = msg.Channel; User = msg.Author; Message = msg;