Adds a check
This commit is contained in:
@@ -58,7 +58,7 @@ namespace EventBot.Services
|
|||||||
var context = new SocketCommandContext(_discord, message);
|
var context = new SocketCommandContext(_discord, message);
|
||||||
GuildConfig guildConfig = context.Guild != null ? _database.GuildConfigs.FirstOrDefault(g => g.GuildId == context.Guild.Id) : null;
|
GuildConfig guildConfig = context.Guild != null ? _database.GuildConfigs.FirstOrDefault(g => g.GuildId == context.Guild.Id) : null;
|
||||||
if (!message.HasMentionPrefix(_discord.CurrentUser, ref argPos))
|
if (!message.HasMentionPrefix(_discord.CurrentUser, ref argPos))
|
||||||
if (guildConfig != null)
|
if (guildConfig != null && string.IsNullOrEmpty(guildConfig.Prefix))
|
||||||
{
|
{
|
||||||
if (!message.HasStringPrefix(guildConfig.Prefix, ref argPos))
|
if (!message.HasStringPrefix(guildConfig.Prefix, ref argPos))
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user