Lib Base Object

The generic feature class which all Lib’s should subclass

class antispam.libs.shared.base.Base

A base Library feature class which implements shared functionality.

async dict_to_embed(data: dict, message, warn_count: int, kick_count: int)
async dict_to_lib_embed(data: Dict)
Parameters

data (dict) – The embed as a dictionary, used to build a an embed object for your library.

Returns

Your libraries embed object.

Return type

Any

Warning

Lib classes must implement this.

async embed_to_string(embed) str
async get_substitute_args(message) antispam.libs.shared.substitute_args.SubstituteArgs
Parameters

message – Message used to create SubstituteArgs

Returns

Return type

SubstituteArgs

Warning

Lib classes must implement this.

async lib_embed_as_dict(embed) Dict
Parameters

embed – Your libraries embed object.

Returns

The embed in dict form

Return type

dict

Warning

Lib classes must implement this.

async substitute_args(content, message, warn_count: int, kick_count: int) str
async transform_message(content: Union[str, dict], message, warn_count: int, kick_count: int)
async visualizer(content: str, message, warn_count: int = 1, kick_count: int = 2)