class PrivateParlorXT::Services
- PrivateParlorXT::Services
- Reference
- Object
Overview
Container for all objects needed for handlers
Defined in:
private-parlor-xt/services.crConstructors
-
.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
. - .new(config : Config, client : Client)
Instance Method Summary
-
#access : AuthorizedRanks
Retrusn the
AuthorizedRanks
object -
#config : HandlerConfig
Returns the
HandlerConfig
object -
#database : Database
Returns the
Database
object -
#descriptions : CommandDescriptions
Returns the
CommandDescriptions
object -
#history : History
Retruns the
History
object -
#karma : KarmaHandler | Nil
Returns the
KarmaHandler
object if it is available -
#locale : Locale
Returns the
Locale
object -
#logs : Logs
Returns the
Logs
object -
#relay : Relay
Returns the
Relay
object -
#replies : Replies
Returns the
Replies
object -
#robot9000 : Robot9000 | Nil
Returns the
Robot9000
object if it is available -
#spam : SpamHandler | Nil
Returns the
SpamHandler
object if it is available -
#stats : Statistics | Nil
Returns the
Statistics
object if it is available
Constructor Detail
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
#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