class

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

Source

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.

Source
do(callback : Tourmaline::CallbackQuery, services : Services) : Nil

The function that describes the behavior of the CallbackHandler

Source
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:

  • User does not exist in the Database
  • User is blacklisted
Source