class

PrivateParlorXT::Services

Inherits Reference < Object

Container for all objects needed for handlers

Constructors

new(config : HandlerConfig, locale : Locale, replies : Replies, logs : Logs, descriptions : CommandDescriptions, database : Database, history : History, access : AuthorizedRanks, relay : Relay, spam : SpamHandler | Nil = nil, robot9000 : Robot9000 | Nil = nil, karma : KarmaHandler | Nil = nil, stats : Statistics | Nil = nil)

Creates an instance of Services.

Arguments:

config : HandlerConfig object with a limited set of configuration values to be used in subclasses of Handler and CallbackHandler

locale : Locale, general localized values from a locale file

replies : Replies, system message replies from a locale file

logs : Logs, log messages from a locale file

command_descriptions : CommandDescriptions, descriptions for commands from a locale file

database : Database object

history : message History object

access : AuthorizedRanks module used to ensure authorized use of commands and messages

relay : Relay object for queueing messages and sending them to Telegram

spam : SpamHandler object preventing message spam, if this module is toggled

robot9000 : Robot9000 object ensure message uniqueness, if this module is toggled

karma : KarmaHandler object that requires users to have karma in order to send messages, if this module is toggled

stats : Statistics object that records data about the bot, if this module is toggled

Source
new(config : Config, client : Client)

Creates a new instance of Services from a Config file

Source

Instance methods

access

Retrusn the AuthorizedRanks object

Source
config

Returns the HandlerConfig object

Source
database

Returns the Database object

Source
descriptions

Returns the CommandDescriptions object

Source
history

Retruns the History object

Source
karma

Returns the KarmaHandler object if it is available

Source
locale

Returns the Locale object

Source
logs

Returns the Logs object

Source
relay

Returns the Relay object

Source
replies

Returns the Replies object

Source
robot9000

Returns the Robot9000 object if it is available

Source
spam

Returns the SpamHandler object if it is available

Source
stats

Returns the Statistics object if it is available

Source