Browse Source

Dont parse commands if there are none configured.

tags/docs-0.9
Brandon Smith 9 years ago
parent
commit
7f8b61f728
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/Discord.Net.Commands/DiscordBotClient.cs

+ 5
- 1
src/Discord.Net.Commands/DiscordBotClient.cs View File

@@ -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


Loading…
Cancel
Save