keyword.py Inherits Action - VikingsDev/Dentaku GitHub Wiki
Keyword
Class
keyword.py, The All commands must inherit Keyword
.
Inheriting Keyword
gives you these variables:
self.documentation
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