abstract class PrivateParlorXT::CallbackHandler

Overview

The base class for all callback query handlers

Direct Known Subclasses

Defined in:

private-parlor-xt/handlers/callback_query_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config) #

Initializes an instance of CallbackHandler

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


[View source]

Instance Method Detail

def deny_user(user : User, services : Services) : Nil #

Queues a system reply when the user cannot make a callback query due to being blacklisted.


[View source]
abstract def do(callback : Tourmaline::CallbackQuery, services : Services) : Nil #

The function that describes the behavior of the CallbackHandler


[View source]
def 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:


[View source]