Skip to content

Commit

Permalink
Disable certain automod checks on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
hypergonial committed Dec 16, 2023
1 parent d68d5cc commit ee73cd1
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions extensions/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,18 +632,29 @@ async def scan_messages(

policies = await get_policies(message.guild_id)

all(
(
await detect_mass_mentions(message, policies),
await detect_spam(message, policies),
await detect_attach_spam(message, policies),
await detect_bad_words(message, policies),
await detect_caps(message, policies),
await detect_invites(message, policies),
await detect_link_spam(message, policies),
await detect_perspective(message, policies),
if isinstance(event, hikari.GuildMessageUpdateEvent):
all(
(
await detect_mass_mentions(message, policies),
await detect_bad_words(message, policies),
await detect_caps(message, policies),
await detect_invites(message, policies),
await detect_perspective(message, policies),
)
)
else:
all(
(
await detect_mass_mentions(message, policies),
await detect_spam(message, policies),
await detect_attach_spam(message, policies),
await detect_bad_words(message, policies),
await detect_caps(message, policies),
await detect_invites(message, policies),
await detect_link_spam(message, policies),
await detect_perspective(message, policies),
)
)
)


def load(bot: SnedBot) -> None:
Expand Down

0 comments on commit ee73cd1

Please sign in to comment.