feat: split ignores into 'ignore messages' and 'ignore entities'

This commit is contained in:
sam 2024-11-18 00:47:27 +01:00
parent d48ab7e16e
commit 0cac964aa6
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
32 changed files with 730 additions and 488 deletions

View file

@ -53,7 +53,13 @@ public class MessageCreateResponder(
var guild = await guildRepository.GetAsync(msg.GuildID);
// The guild needs to have enabled at least one of the message logging events,
// and the channel must not be ignored, to store the message.
if (guild.IsMessageIgnored(msg.ChannelID, msg.Author.ID))
if (
guild.IsMessageIgnored(
msg.ChannelID,
msg.Author.ID,
msg.Member.OrDefault()?.Roles.OrDefault()
)
)
{
await messageRepository.IgnoreMessageAsync(msg.ID.Value);
return Result.Success;