MCPcopy Create free account
hub / github.com/AAA3A-AAA3A/AAA3A-cogs / hash_image

Method hash_image

security/modules/image_checking.py:385–389  ·  view source on GitHub ↗
(self, attachment: discord.Attachment)

Source from the content-addressed store, hash-verified

383
384 async def check_image(self, config_hashes: list[str], image_hash: str) -> bool:
385 return any(
386 imagehash.hex_to_hash(image_hash) - imagehash.hex_to_hash(h) <= 8 for h in config_hashes
387 )
388
389 async def on_message(self, message: discord.Message) -> None:
390 if message.guild is None:
391 return
392 config = await self.config_value(message.guild)()

Callers 2

on_messageMethod · 0.95

Calls 1

openMethod · 0.80

Tested by

no test coverage detected