From e8f6054c5a950a66fb3e24a9a768fde80e5505dd Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 28 Oct 2016 12:44:40 +0200 Subject: [PATCH] Fixes to v+t and blacklisting --- .../Modules/Administration/Commands/VoicePlusTextCommands.cs | 5 +++-- .../Modules/Permissions/Commands/BlacklistCommands.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index cd9b4bc2..1e4ca219 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -114,7 +114,7 @@ namespace NadekoBot.Modules.Administration var channel = (ITextChannel)msg.Channel; var guild = channel.Guild; - var botUser = guild.GetCurrentUser(); + var botUser = await guild.GetCurrentUserAsync().ConfigureAwait(false); if (!botUser.GuildPermissions.ManageRoles || !botUser.GuildPermissions.ManageChannels) { await channel.SendMessageAsync(":anger: `I require atleast manage roles and manage channels permissions to enable this feature (preffered Administration permission).`"); @@ -166,7 +166,8 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)msg.Channel; var guild = channel.Guild; - if (!guild.GetCurrentUser().GuildPermissions.Administrator) + var botUser = await guild.GetCurrentUserAsync().ConfigureAwait(false); + if (!botUser.GuildPermissions.Administrator) { await channel.SendMessageAsync("`I need Administrator permission to do that.`").ConfigureAwait(false); return; diff --git a/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs b/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs index e538e2a6..bbffabcf 100644 --- a/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs +++ b/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs @@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Permissions } await uow.CompleteAsync().ConfigureAwait(false); } - if (action == AddRemove.Rem) + if (action == AddRemove.Add) { TriviaGame tg; switch (type)