class

PrivateParlorXT::Handler

Inherits Reference < Object

The base class for all message handlers

Constructors

new(config : Config)

Initializes an instance of Handler

The config can be used to modify the functionality of the handler

Source

Instance methods

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

The function that describes the behavior of the Handler

Source
reply_message(user : User, message : Tourmaline::Message, services : Services) : Tourmaline::Message | Nil

Returns the given message's reply, if it exists

Source
reply_user(user : User, reply_message : Tourmaline::Message, services : Services) : User | Nil

Returns the reply_message's User if he exists and the reply_message is still available in the History

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

Checks the given message for uniqueness and returns true if the message is unique

Returns false if the message is unoriginal

Source
update_user_activity(user : User, services : Services) : Nil

Updates the given user's last_active attribute to the current time

Source