-
Notifications
You must be signed in to change notification settings - Fork 7
keyword.py Inherits Action
Frank Hui edited this page Jan 26, 2020
·
1 revision
All commands must inherit Keyword
.
Inheriting Keyword
gives you these variables:
The documentation object. Contains the properties "trigger"
and "function"
. trigger
is which keyword triggers the command. The function is to describe what the keyword does.
Example:
bruh.py
self.documentation = {
"trigger": "bruh",
"function": "Logs the message in the Bruh Database."
}
Implement self.documentation in your action by adding the function define_documentation(self)
within the class of your keyword.
def define_documentation(self):
self.documentation = {
"trigger": "bruh",
"function": "Logs the message in the Bruh Database."
}
And all other variables from action.py