class

PrivateParlorXT::SignCommand

Inherits PrivateParlorXT::CommandHandler < PrivateParlorXT::Handler < Reference < Object

Processes sign messages before an UpdateHandler gets them

This handler expects the command handlers to be registered before the update handlers

Instance methods

do(message : Tourmaline::Message, services : Services) : Nil

Preformats the given message with a username signature if the message meets requirements

Source
spamming?(user : User, message : Tourmaline::Message, arg : String, services : Services) : Bool

Checks if the user is spamming username signatures

Returns true if the user is spamming username signatures or unformatted text is spammy, returns false otherwise

Source
user_sign(name : String, id : UserID, arg : String, entities : Array(Tourmaline::MessageEntity)) : Tuple(String, Array(Tourmaline::MessageEntity))

Format the user sign based on the given name, appending the signature to arg as a text link to the user's ID

Source