Adding Dynamic to Exception

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-08-05 19:27:22 -04:00
parent 379c47cbfe
commit 6625e8ceac

View File

@ -3,6 +3,7 @@ using Discord;
using Discord.Commands; using Discord.Commands;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection;
using ChaosBot.Discord.PreConditions; using ChaosBot.Discord.PreConditions;
using NLog; using NLog;
@ -30,7 +31,7 @@ namespace ChaosBot.Discord.Modules.Admin
{ {
if(ex.Message.Contains("Messages must be younger than two weeks old.")) 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."); await ReplyAsync($"{Context.User.Mention}, You cannot delete messages older then 2 weeks old.");
_logger.Error($"AdminCommands.ClearCommand: Exception [{ex}] thrown, <[{ex.Message}]>."); _logger.Error($"{MethodBase.GetCurrentMethod().ReflectedType.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>.");
} }
} }
} }