Don't allow muting the bot

This commit is contained in:
Deukhoofd 2019-01-31 11:41:59 +01:00
parent 9a563ba0b6
commit 89dd74c711
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 4 additions and 0 deletions

View File

@ -224,6 +224,10 @@ namespace DeukBot4.MessageHandlers.CommandHandler
private async Task<string> SilenceUser(IGuildUser user, TimeSpan span) private async Task<string> SilenceUser(IGuildUser user, TimeSpan span)
{ {
if (user.Id == Program.BotId)
{
return "Stop trying to mute me.";
}
var silencedRoleId = ServerSettingHandler.GetSettings(user.GuildId).MutedRoleId; var silencedRoleId = ServerSettingHandler.GetSettings(user.GuildId).MutedRoleId;
if (silencedRoleId == 0) if (silencedRoleId == 0)
{ {