From 7f8b61f728a3fa80e2426f8841679328d7239ed2 Mon Sep 17 00:00:00 2001 From: Brandon Smith Date: Tue, 1 Sep 2015 19:34:27 -0300 Subject: [PATCH] Dont parse commands if there are none configured. --- src/Discord.Net.Commands/DiscordBotClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/DiscordBotClient.cs b/src/Discord.Net.Commands/DiscordBotClient.cs index c8b366635..e8ffacaa1 100644 --- a/src/Discord.Net.Commands/DiscordBotClient.cs +++ b/src/Discord.Net.Commands/DiscordBotClient.cs @@ -27,8 +27,12 @@ namespace Discord MessageCreated += async (s, e) => { + //If commands aren't being used, don't bother processing them + if (_commands.Count == 0) + return; + //Ignore messages from ourselves - if (e.Message.UserId == _myId) + if (e.Message.UserId == _myId) return; //Check for the command character