class

PrivateParlorXT::RanksayCommand

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

Processes ranksay 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 rank name signature if the message meets requirements

Source
get_rank_name(text : String, user : User, message : Tourmaline::Message, authority : CommandPermissions, services : Services) : String | Nil

For ranksay commands that are not initiated using "/ranksay" and instead uses the name of the rank followed by "-say"

Returns the name of the Rank if the rank in the given text can ranksay

Returns nil otherwise

Source
ranksay(rank : String, arg : String, entities : Array(Tourmaline::MessageEntity)) : Tuple(String, Array(Tourmaline::MessageEntity))

Format ranksay signature for the given rank, appending it to the given arg

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

Checks if the user is spamming rank signatures

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

Source