Proper checking for no channel defined

This commit is contained in:
Daniel_I_Am 2020-10-16 22:25:41 +02:00
parent a92e258ed6
commit 7ff86a1a5c
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84

View File

@ -82,7 +82,7 @@ namespace ChaosBot.Discord.Services
}
ISocketMessageChannel messageChannel;
if (channelToSendIn != "false")
if (channelToSendIn != null)
{
ulong channelId = Convert.ToUInt64(channelToSendIn.Substring(2, channelToSendIn.Length - 3));
messageChannel = context.Guild.GetTextChannel(channelId);