modbot.moderation.Nuking

class modbot.moderation.Nuking[source]

Bases: object

Class to handle nuking words/phrases from chat. In development.

Methods

rep_nuke(info)

Handle response to !nuke command.

should_nuke(msg)

Check if a nuke is ongoing and if there is a message in chat that needs to be nuked

time_nuke()

End nuke if the nuke time has elapsed

rep_nuke(info)[source]

Handle response to !nuke command. Check if we should send nuke.

Parameters

info (dict) – dictionary storing attributes of user. e.g. recent message, badges, username, probability of non-wholesome message

Return type

bool

should_nuke(msg)[source]

Check if a nuke is ongoing and if there is a message in chat that needs to be nuked

Parameters

msg (str) – Message to check for whether it should be nuked

Return type

bool

time_nuke()[source]

End nuke if the nuke time has elapsed