Skip to content

Commands

Dotsian edited this page May 15, 2025 · 6 revisions

Commands v0.5

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.

Global Commands

CREATE

The CREATE command creates a model depending on the field given. The function is structured like this:

CREATE > MODEL > IDENTIFIER
  • MODEL should be replaced with the model you are trying to edit, such as BALL, REGIME, SPECIAL, etc.
  • IDENTIFIER should be replaced with the name of the model you are trying to create.

DELETE

The DELETE command deletes a model depending on the identifier given:

DELETE > MODEL > IDENTIFIER
  • MODEL should be replaced with the model you are trying to delete.
  • IDENTIFIER has to be replaced with the model's identifier you are trying to delete.

UPDATE

The UPDATE command updates a model depending on the field given. The function is structured like this:

UPDATE > MODEL > IDENTIFIER > FIELD > VALUE(?)
  • MODEL should be replaced with the model you are trying to update.
  • IDENTIFIER has to be replaced with the model's identifier you are trying to edit.
  • ATTRIBUTE has 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.


VIEW

The VIEW command displays the value of a specified field for a model:

VIEW > MODEL > IDENTIFIER > ATTRIBUTE(?)
  • MODEL should be replaced with the model you want to view.
  • IDENTIFIER has 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.


ATTRIBUTES

The ATTRIBUTES command displays a list of changeable attributes for a specified model:

ATTRIBUTES > MODEL > FILTER(?)
  • MODEL should 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)

Filter Commands

UPDATE

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(?)
  • MODEL should be replaced with the model you are trying to update.
  • ATTRIBUTE should be replaced with the attribute you are trying to check.
  • OLD_VALUE should be replaced with the old attribute value you want to replace.
  • NEW_VALUE should 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")

DELETE

The DELETE filter command deletes all instances of a model where the specified attribute meets the condition:

FILTER > DELETE > MODEL > ATTRIBUTE > VALUE > TORTOISE_OPERATOR(?)
  • MODEL should be replaced with the model you are trying to delete.
  • ATTRIBUTE should be replaced with the attribute you are trying to check.
  • VALUE should 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.

VIEW

The VIEW filter command displays all instances of a model where the specified attribute meets the condition:

FILTER > VIEW > MODEL > ATTRIBUTE > VALUE > TORTOISE_OPERATOR(?)
  • MODEL should be replaced with the model you want to view.
  • ATTRIBUTE should be replaced with the attribute you are trying to check.
  • VALUE should 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.

Clone this wiki locally