PrivateParlorXT::CallbackHandler
Inherits Reference < Object
The base class for all callback query handlers
Constructors
new(config : Config)
Initializes an instance of CallbackHandler
The config can be used to modify the functionality of the handler
Instance methods
deny_user(user : User, services : Services) : Nil
Queues a system reply when the user cannot make a callback query due to being blacklisted.
do(callback : Tourmaline::CallbackQuery, services : Services) : Nil
The function that describes the behavior of the CallbackHandler
user_from_callback(callback : Tourmaline::CallbackQuery, services : Services) : User | Nil
Returns the User associated with the callback if the User could be found in the Database.
This will also update the User's username and realname if they have changed since the last message.
Returns nil if:
Userdoes not exist in theDatabaseUseris blacklisted