Skip to content

Commit

Permalink
Update format
Browse files Browse the repository at this point in the history
  • Loading branch information
danparizher committed Sep 12, 2023
1 parent 8ed97db commit 8f62e21
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions cogs/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class MessageFingerprint:
attachment_urls: list[
str
] # the discord content URLs for each of the message's uploaded attachments
cached_attachment_hashes: set[
Hash
] | None = None # populated on the first call to `get_attachment_hashes`
cached_attachment_hashes: (
set[Hash] | None
) = None # populated on the first call to `get_attachment_hashes`

content_hash: Hash | None = (
None # hash of the message body, after being passed through `filter_content`
)
content_hash: (
Hash | None
) = None # hash of the message body, after being passed through `filter_content`

# shortcut to build a fingerprint given a message
@classmethod
Expand Down Expand Up @@ -166,11 +166,8 @@ async def is_multipost_of(self, other: MessageFingerprint) -> bool:
class Moderation(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
self.fingerprints: list[
MessageFingerprint
] = (
[]
) # stores all user messages sent in the last minute (recent messages near the end)
# stores all user messages sent in the last minute (recent messages near the end)
self.fingerprints: list[MessageFingerprint] = []
self.multipost_warnings: dict[
Annotated[int, "Multiposted Message ID"],
tuple[
Expand Down

0 comments on commit 8f62e21

Please sign in to comment.