Futurismobject › bot

From Botdom Documentation

Jump to: navigation, search

The bot object holds a couple of essential processing methods, and more importantly, several subobjects with different informations.

Contents

Properties

  • str bot.build — The bot software's build number. Default (depending on version): "800".
  • dict bot.commands — A dictionary of current loaded modules, each with a list of commands for each module, e.g. bot.commands['internal']. The special key __ALL gives a dictionary of all commands as keys, regardless of module, and with their module name as value.
  • instance bot.conn — A link back to the connection instance. Default: dAmn instance.
  • dict bot.module — A dictionary of current installed modules and their object instances. Allows you to control each one, e.g. bot.module['internal'].
  • instance bot.modules — The bot.modules global object. Controls the bot's handling of modules.
  • str bot.name — The name of the bot sofware. Default: "Codename Futurism".
  • instance bot.user — The bot.user global object. Controls the bot's handling of bot users and privileges.
  • str bot.version — The version (including codename) of the bot software. Default (depending on version): "0.8 (Silverado)".

Methods

void bot.joinRoomlist(instance dAmn)

Joins all rooms specified as autojoin rooms in the config file. Uses the inputted parameter dAmn as a reference to the dAmn object, as this object is not present when the class is loaded.

void bot.loadModules(classobj botModules[, bool launch])

Initialises the bot.modules object, which is inputted as an uninitialized class as the botModules parameter. If launch is True (the default value), it will also trigger an evt_launch event, which is triggered when the bot starts up. If this method is run when the bot is not launching, it is because a user has ordered the bot to reload its modules.

void bot.parseCommand(instance dAmn, str msg, str ns, str user)

Parses and triggers a command from the inputted message msg written by user in ns. Uses the inputted parameter dAmn as a reference to the dAmn object. Executed from bot.processMessage if it detects a command.

void bot.processMessage(instance dAmn, str msg, str ns, str user)

Processes every chat message coming in from dAmn, in order to detect commands or AI.

Personal tools