mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Swallow 404 when deleting proxied message
This commit is contained in:
parent
d47e7e7a06
commit
6668cd8d2d
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ using System.Text.RegularExpressions;
|
|||
using System.Threading.Tasks;
|
||||
using Dapper;
|
||||
using Discord;
|
||||
using Discord.Net;
|
||||
using Discord.Webhook;
|
||||
using Discord.WebSocket;
|
||||
|
||||
|
|
@ -106,7 +107,11 @@ namespace PluralKit.Bot
|
|||
|
||||
// Wait a second or so before deleting the original message
|
||||
await Task.Delay(1000);
|
||||
await message.DeleteAsync();
|
||||
|
||||
try
|
||||
{
|
||||
await message.DeleteAsync();
|
||||
} catch (HttpException) {} // If it's already deleted, we just swallow the exception
|
||||
}
|
||||
|
||||
private async Task<bool> EnsureBotPermissions(ITextChannel channel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue