This commit is contained in:
2023-02-11 10:37:40 -03:00
parent 79b1a0e15e
commit c0f7c8cc1d
6 changed files with 268 additions and 159 deletions

View File

@@ -0,0 +1,18 @@
using Discord;
using Discord.Rest;
namespace Kasbot.Extensions
{
public static class RestMessageExtensions
{
public static async Task TryDeleteAsync(this RestMessage message, RequestOptions options = null)
{
try
{
await message.DeleteAsync(options);
}
catch { }
}
}
}