class PrivateParlorXT::InfoCommand

Overview

A command used to get information about one's account, or get obfuscated information about another user if one is authorized to see such information

Defined in:

private-parlor-xt/handlers/command_handlers/info_command.cr

Constructors

Instance Method Summary

Instance methods inherited from class PrivateParlorXT::CommandHandler

authorized?(user : User, message : Tourmaline::Message, permission : CommandPermissions, services : Services) : Bool
authorized?(user : User, message : Tourmaline::Message, services : Services, *permissions : CommandPermissions) : CommandPermissions | Nil
authorized?
, delete_messages(message : MessageID, user : UserID, debug_enabled : Bool | Nil, services : Services) : MessageID | Nil delete_messages, deny_user(user : User, services : Services) : Nil deny_user, remove_command_entity(text : String, entities : Array(Tourmaline::MessageEntity), arg : String) : Array(Tourmaline::MessageEntity) remove_command_entity, user_from_message(message : Tourmaline::Message, services : Services) : User | Nil user_from_message

Instance methods inherited from class PrivateParlorXT::Handler

do(message : Tourmaline::Message, services : Services) : Nil do, reply_message(user : User, message : Tourmaline::Message, services : Services) : Tourmaline::Message | Nil reply_message, reply_user(user : User, reply_message : Tourmaline::Message, services : Services) : User | Nil reply_user, unique?(user : User, message : Tourmaline::Message, services : Services, text : String | Nil = nil) : Bool unique?, update_user_activity(user : User, services : Services) : Nil update_user_activity

Constructor methods inherited from class PrivateParlorXT::Handler

new(config : Config) new

Constructor Detail

def self.new(config : Config) #

Creates an instance of InfoCommand


[View source]

Instance Method Detail

def cooldown_until(expiration : Time | Nil, services : Services) : String #

Format the cooldown until text based on the given expiration


[View source]
def do(message : Tourmaline::Message, services : Services) : Nil #

Returns a message containing information about the user's account or the user who sent the message this message replies to


[View source]
def ranked_info(user : User, message : Tourmaline::Message, reply : Tourmaline::Message, services : Services) : String | Nil #

Returns a String containing obfuscated information about a user the who sent the reply


[View source]
def smiley(warnings : Int32) : String #

Returns a smiley based on the number of given warnings


[View source]
def user_info(user : User, services : Services) : String | Nil #

Returns a String containing information about the given user


[View source]
def warn_expiry(expiration : Time | Nil, services : Services) : String | Nil #

Format the warning expiration text based on the given expiration


[View source]