class

PrivateParlorXT::PromoteCommand

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

A command used to promote a user to a given rank

Instance methods

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

Promotes the user described in the message text or promotes the sender of the message it replies to, if message meets requirements

Source
promote_from_args(text : String | Nil, authority : CommandPermissions, user : User, message : MessageID, services : Services) : Nil

Promotes a user given in the text to the user's current rank if the rank has the CommandPermissions::Promote or CommandPermissions::PromoteSame permission and only one argument (the user's identifier) was given, or promotes to the given rank if the user's rank has the CommandPermissions::Promote or CommandPermissions::PromoteLower permission and two arguments (the user's identifier and name/value of rank) was given

Source
promote_from_reply(arg : String | Nil, authority : CommandPermissions, user : User, message : MessageID, reply : Tourmaline::Message, services : Services) : Nil

Promotes a user who sent the reply message to the user's current rank if the rank has the CommandPermissions::Promote or CommandPermissions::PromoteSame permission and no arg was given, or promotes to the given rank in arg if the user's rank has the CommandPermissions::Promote or CommandPermissions::PromoteLower permission and one argument (name/value of rank) was given

Source