VirusTotal Scanner Cog added

Signed-off-by: Marc Ahlgrim <marc@onemarcfifty.com>
This commit is contained in:
Marc Ahlgrim
2022-10-03 12:23:25 +02:00
parent 4023e2d70e
commit c2ff226138
3 changed files with 204 additions and 0 deletions
+12
View File
@@ -188,6 +188,12 @@ class OMFBot(AutoShardedBot):
except Exception as e:
print(f"ERROR in setup_hook: {e}")
# transmit the VirusTotal Token to the scanner object
scanner = self.get_cog('Scanner')
if scanner is not None:
scanner.registervTotal(self.configData.getVToken())
print(f'TOKEN: {self.configData.getVToken()}')
# ######################################################
# send_random_message is called when the server is idle
@@ -384,6 +390,12 @@ class OMFBot(AutoShardedBot):
async def on_message(self, message : discord.Message ):
try:
x=message.author
except Exception as e:
# message has been deleted by the scanner
return
# ignore ephemeral messages
if message.flags.ephemeral:
return