Delete the notification when the bot pins a message

This commit is contained in:
Toastie 2024-12-27 17:30:05 +13:00
parent 7b64129cc1
commit 56d3c6b089
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -54,6 +54,11 @@ public static class EventHandler
public static async Task OnMessageCreated(DiscordClient client, MessageCreatedEventArgs e)
{
if (e.Author.IsCurrent && e.Message.MessageType == DiscordMessageType.ChannelPinnedMessage)
{
await e.Message.DeleteAsync();
}
if (e.Author.IsBot)
{
return;