The attribute should be given to a function that should be called as the bot is starting up. The primary purpose of this attribute is to perform any initialization actions required for the module to operate properly. def function(bot, nick, msg): #code function.setup=0 The value of the setup function does not matter, but for consistency it is advised to set the attribute to 0. It is recommended that the attribute be the only one set on a “say” function; however it is feasible for the function to also use the attribute “command” depending on the actions taken within the function. **A function should use both the command and attributes** Privilege This attribute determines what type of chat member can invoke the command def function(bot, nick, msg): #code function.privilege=”owners”, or “admin”, “regular” The privilege attribute should be set to one of three things: or “owners”, “admin”, Any functions with a attribute but not a privilege attribute is “regular”. “commands” assumed to have the privilege. “regular” Privilege refers to who in the chat has access to the function (or more specifically, access to the command used to invoke the function). The level “owners” means only members of the chat whose chat names are listed in the VespaBot.cfg file can invoke the command. This is typically reserved for functions that set important information or moderate other chat features. The level is only superficially “admin” supported at the moment, but would allow only chat users marked as chat administrators and members designated as owners to use the function. Finally, the level “regular” means any chat user can invoke the function. Usage The attribute is used to define a help message to be used with the “!help” command in the builtinregulars module. This attribute is meant to be used with a function that makes use of the command attribute. “command” def function(bot, nick, msg): #code function.usage=(“command_name”, “usage_message”)
The attribute should be given to a function that should be called as the bot is starting up. The primary purpose of this attribute is to perform any initialization actions required for the module to operate properly. def function(bot, nick, msg): #code function.setup=0 The value of the setup function does not matter, but for consistency it is advised to set the attribute to 0. It is recommended that the “say” attribute be the only one set on a function; however it is feasible for the function to also use the “command” attribute depending on the actions taken within the function. **A function should use both the command and attributes** Privilege This attribute determines what type of chat member can invoke the command def function(bot, nick, msg): #code function.privilege=”owners”, “admin”, or “regular” The privilege attribute should be set to one of three things: “owners”, “admin”, or “regular”. Any functions with a “commands” attribute but not a privilege attribute is assumed to have the “regular” privilege. Privilege refers to who in the chat has access to the function (or more specifically, access to the command used to invoke the function). The “owners” level means only members of the chat whose chat names are listed in the VespaBot.cfg file can invoke the command. This is typically reserved for functions that set important information or moderate other chat features. The “admin” level is only superficially supported at the moment, but would allow only chat users marked as chat administrators and members designated as owners to use the function. Finally, the “regular” level means any chat user can invoke the function. Usage The attribute is used to define a help message to be used with the “!help” command in the builtinregulars module. This attribute is meant to be used with a “command” function that makes use of the command attribute. def function(bot, nick, msg): #code function.usage=(“command_name”, “usage_message”)