From d8209998bf4c51f3fae84d74db60d0586d8cee25 Mon Sep 17 00:00:00 2001 From: Sean Stoves Date: Wed, 3 Jun 2020 16:36:52 -0400 Subject: [PATCH] Adding code for CommandHandler checks --- ChaosBot/Discord/Services/CommandHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChaosBot/Discord/Services/CommandHandler.cs b/ChaosBot/Discord/Services/CommandHandler.cs index 1a97231..7da71bf 100644 --- a/ChaosBot/Discord/Services/CommandHandler.cs +++ b/ChaosBot/Discord/Services/CommandHandler.cs @@ -85,7 +85,8 @@ namespace ChaosBot.Discord.Services return; } - await context.Channel.SendMessageAsync($"Sorry, {context.User.Username}... something went wrong -> [{result}]!"); + _logger.Warn($"{context.User.Username} attempted to access {command.Value.Name} and was denied -> [{result}]"); + await context.Channel.SendMessageAsync($"Sorry, {context.User.Username}, that command won't work for you.!"); } catch (Exception ex) {