.alias notification (x => y) will get deleted after 1.5s now

This commit is contained in:
Master Kwoth 2017-11-01 06:35:45 +01:00
parent e737e8bc1b
commit 9cfb25d2ed

View File

@ -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;
}
}