From 9cfb25d2edeb1c041476b8ddd9e9983c5700c7ce Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 1 Nov 2017 06:35:45 +0100 Subject: [PATCH] .alias notification (x => y) will get deleted after 1.5s now --- .../Modules/Utility/Services/CommandMapService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs b/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs index 23efc2f9..06ed7986 100644 --- a/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs @@ -58,7 +58,18 @@ namespace NadekoBot.Modules.Utility.Services Trigger: {1} Mapping: {2}", guild.Id, input, newInput); - try { await channel.SendConfirmAsync($"{input} => {newInput}").ConfigureAwait(false); } catch { } + try + { + var toDelete = await channel.SendConfirmAsync($"{input} => {newInput}").ConfigureAwait(false); + var _ = Task.Run(async () => + { + await Task.Delay(1500); + await toDelete.DeleteAsync(new RequestOptions() { + RetryMode = RetryMode.AlwaysRetry + }); + }); + } + catch { } return newInput; } }