don't dm owner if integer is sent to the bot, and don't send message string, this is to prevent bot replying to poll vote

This commit is contained in:
Kwoth 2016-10-24 17:36:06 +02:00
parent a1056c9194
commit 4fa0f1533a

View File

@ -173,6 +173,10 @@ namespace NadekoBot.Services
{ {
if (msg.Channel is IPrivateChannel) if (msg.Channel is IPrivateChannel)
{ {
//rofl, gotta do this to prevent this message from occuring on polls
int vote;
if (int.TryParse(msg.Content, out vote)) return;
await msg.Channel.SendMessageAsync(Help.DMHelpString).ConfigureAwait(false); await msg.Channel.SendMessageAsync(Help.DMHelpString).ConfigureAwait(false);
await DMForwardCommands.HandleDMForwarding(msg, ownerChannels); await DMForwardCommands.HandleDMForwarding(msg, ownerChannels);