AdminLogs Plugin¶
A plugin design to save admins hassle with regard to evidence collection on automated punishments.
Simply register this as a plugin, and it will save the relevant information for all punishments to a text file.
-
class
antispam.plugins.
AdminLogs
(handler: antispam.anti_spam_handler.AntiSpamHandler, log_location: str)¶ A plugin design to save admins hassle with regard to evidence collection on automated punishments.
-
__init__
(handler: antispam.anti_spam_handler.AntiSpamHandler, log_location: str)¶ Parameters: - handler (AntiSpamHandler) – Our AntiSpamHandler instance
- log_location – The directory to store logs in, relative from the caller location. This directory should be empty or only contain previous output from this plugin.
Notes
This will save transcripts for every punishment, but it only sends ones to discord if the Guild has a log_channel_id set.
-
propagate
(message, data: antispam.dataclasses.core.CorePayload = None) → Any¶ This method is called whenever the base
antispam.propagate
is called, adhering toself.is_pre_invoke
Parameters: - message (Union[discord.Message, hikari.messages.Message]) – The message to run propagation on
- data (Optional[CorePayload]) – Optional input given to after invoke plugins which is the return value from the main propagate()
Returns: A dictionary of useful data to the end user
Return type:
-