mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 13:54:36 +00:00
Fix exception on every non-command incoming message
This commit is contained in:
parent
9278ef0a48
commit
a91e22ca71
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ namespace BirthdayBot
|
|||
// For all cases: base command, 2 parameters.
|
||||
// Except this case: "bb.config", subcommand name, subcommand parameters in a single string
|
||||
var csplit = msg.Content.Split(" ", 3, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (csplit.Length > 0)
|
||||
if (csplit.Length > 0 && csplit[0].StartsWith(CommandPrefix, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var channel = (SocketTextChannel)msg.Channel;
|
||||
var author = (SocketGuildUser)msg.Author;
|
||||
|
|
Loading…
Reference in a new issue