Service: Content Protection
The Content Protection service allows your plugin to scan messages for dangerous content, then report back to the bot and let it know whether it should take action or not.
Functions
await scan
await scan
Function called by Unifier Bridge to scan a message using the Plugin.
Provided arguments
message
: Message object for the content to scan. This may benextcord.Message
,revolt.Message
orguilded.Message
.data
: Dictionary object containing Plugin data.
Expected return
A dict
object in the following structure:
unsafe
: Whether action should be taken by the bot.description
: A description of the Plugin's verdict.target
: Members to target, as well as the duration in structure{user_id: duration, user_id_2: duration}
. If duration is 0, the user will be permanently banned.delete
: IDs of messages to delete. Unifier Bridge will find the corresponding UnifierMessage object and delete all messages associated with the object.restrict
: IDs of servers to restrict, as well as the duration in structure{svr_id: duration, svr_id_2: duration}
This will enable slowmode and limit the character count per message for the server.data
: New Plugin data the bot should store in its memory. This data will be given when the function is called again.
Compatibility
Plugins offering Content Protection service should have a minimum Unifier release requirement of 49 or above. If your Plugin is for Unifier v1.2.x, this should be between 43 and 48.
Last updated