From ac762c8f0addad3e10c6424d7b31c0dc1fdce3bf Mon Sep 17 00:00:00 2001 From: Sean Stoves Date: Wed, 5 Aug 2020 18:03:48 -0400 Subject: [PATCH] Adding reply for message age > 2 weeks --- ChaosBot/Discord/Modules/Admin/Clear.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChaosBot/Discord/Modules/Admin/Clear.cs b/ChaosBot/Discord/Modules/Admin/Clear.cs index 09f1bd6..3bffd45 100644 --- a/ChaosBot/Discord/Modules/Admin/Clear.cs +++ b/ChaosBot/Discord/Modules/Admin/Clear.cs @@ -28,6 +28,8 @@ namespace ChaosBot.Discord.Modules.Admin } catch (Exception ex) { + if(ex.Message.Contains("Messages must be younger than two weeks old.")) + await ReplyAsync($"{Context.User.Mention}, You cannot delete messages older then 2 weeks old."); _logger.Error($"AdminCommands.ClearCommand: Exception [{ex}] thrown, <[{ex.Message}]>."); } }