From 02171b57651609a0dfa096762dd8dfd976ba0b5e Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 25 Oct 2016 16:55:34 +0200 Subject: [PATCH] error logging for .iam --- .../Administration/Commands/SelfAssignedRolesCommand.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index 94e215c1..5d29e4fc 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Administration [Group] public class SelfAssignedRolesCommands { - + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageMessages)] @@ -183,9 +183,10 @@ namespace NadekoBot.Modules.Administration { await guildUser.AddRolesAsync(role).ConfigureAwait(false); } - catch (Exception) + catch (Exception ex) { await channel.SendMessageAsync($":anger:`I am unable to add that role to you. I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false); + Console.WriteLine(ex); return; } var msg = await channel.SendMessageAsync($":ok:You now have {role.Name} role.").ConfigureAwait(false);