![]() ![]() Instead of choices, the option map can also include an "autocomplete" key controlling whether dynamic suggestions can be provided to the client (defaulting to false). The "type" key can be one of: STRING, INTEGER, BOOLEAN, USER, CHANNEL, ROLE, MENTIONABLE, NUMBER, ATTACHMENT.Īdditionally, the option map can include a "choices" key, which is a MapTag of ordered MapTags that have a "name" (what displays to the user) and a "value" (what gets passed to the client). It is recommended to use Command: definemap or a data script key when creating commands.Īll option MapTags must have "type", "name", and "description" keys, with an optional "required" key (defaulting to true). It is a MapTag of ordered MapTags that can sometimes hold ordered MapTags. The "options" argument controls the command parameters. "Description" and "options" are only valid for slash commands. When creating, both a name and description are required.Ĭommands can be slash commands - activated via typing "/", message commands - activated by right-clicking a message, or user commands - activated by right-clicking a user. NOTE: Global commands take up to an hour to register. If not present, a global command will be created. To create (or delete) a command in a specific Discord guild, use the "group" argument. You can create a new command, edit the permissions of an existing command, or delete an existing command. Learn about how commands work in The Beginner's Guide.ĭiscordcommand (id : ) (group : ) (name : ) (type : /user /message) (description : ) (options : ) Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |