-
Notifications
You must be signed in to change notification settings - Fork 4
Commands
Note
A model is a collectible, regime, economy, or special.
Note
A list of all Tortoise ORM filtering operations can be found here.
Commands are the most important aspect of DexScript, as they provide the fundamentals for using DexScript. You cannot view these commands without checking the documentation inside the commands.py file. This page will provide proper documentation for commands.
To run a command, you must put b.run, swapping b. with your bot's prefix.
The CREATE command creates a model depending on the field given. The function is structured like this:
CREATE > MODEL > IDENTIFIER-
MODELshould be replaced with the model you are trying to edit, such asBALL,REGIME,SPECIAL, etc. -
IDENTIFIERshould be replaced with the name of the model you are trying to create.
The DELETE command deletes a model depending on the identifier given:
DELETE > MODEL > IDENTIFIER-
MODELshould be replaced with the model you are trying to delete. -
IDENTIFIERhas to be replaced with the model's identifier you are trying to delete.
The UPDATE command updates a model depending on the field given. The function is structured like this:
UPDATE > MODEL > IDENTIFIER > FIELD > VALUE(?)-
MODELshould be replaced with the model you are trying to update. -
IDENTIFIERhas to be replaced with the model's identifier you are trying to edit. -
ATTRIBUTEhas to be replaced with the attribute you are trying to edit. (EXAMPLE: CREDITS) -
VALUE(OPTIONAL) has to be replaced with the new value you want that field to be.
If the VALUE parameter is omitted and you supply an attachment (image), the attachment will be used as the value.
The VIEW command displays the value of a specified field for a model:
VIEW > MODEL > IDENTIFIER > ATTRIBUTE(?)-
MODELshould be replaced with the model you want to view. -
IDENTIFIERhas to be replaced with the model's identifier you are trying to view. -
ATTRIBUTE(OPTIONAL) has to be replaced with the attribute you are trying to view. (EXAMPLE: ATTACK)
If the ATTRIBUTE parameter is omitted, all the attributes of that model will be displayed.
The ATTRIBUTES command displays a list of changeable attributes for a specified model:
ATTRIBUTES > MODEL > FILTER(?)-
MODELshould be replaced with the model you are trying to view the attributes of. -
FILTER(OPTIONAL) is the filter you wanna use when listing the attributes. (Null / Valid)
The UPDATE filter command updates all instances of a model to the specified value where the specified attribute meets the condition:
FILTER > UPDATE > MODEL > ATTRIBUTE > OLD_VALUE > NEW_VALUE > TORTOISE_OPERATOR(?)-
MODELshould be replaced with the model you are trying to update. -
ATTRIBUTEshould be replaced with the attribute you are trying to check. -
OLD_VALUEshould be replaced with the old attribute value you want to replace. -
NEW_VALUEshould be replaced with the new attribute value you want to use as a replacement. -
TORTOISE_OPERATOR(OPTIONAL) should be replaced with a tortoise filtering expression if you want to use one. (EX: "gt" stands for "greater than")
The DELETE filter command deletes all instances of a model where the specified attribute meets the condition:
FILTER > DELETE > MODEL > ATTRIBUTE > VALUE > TORTOISE_OPERATOR(?)-
MODELshould be replaced with the model you are trying to delete. -
ATTRIBUTEshould be replaced with the attribute you are trying to check. -
VALUEshould be replaced with the value you want to use. -
TORTOISE_OPERATOR(OPTIONAL) should be replaced with a tortoise filtering expression if you want to use one.
The VIEW filter command displays all instances of a model where the specified attribute meets the condition:
FILTER > VIEW > MODEL > ATTRIBUTE > VALUE > TORTOISE_OPERATOR(?)-
MODELshould be replaced with the model you want to view. -
ATTRIBUTEshould be replaced with the attribute you are trying to check. -
VALUEshould be replaced with the value you want to use. -
TORTOISE_OPERATOR(OPTIONAL) should be replaced with a tortoise filtering expression if you want to use one.
For additional help, join the official DexScript Discord server.