Last active
February 12, 2024 18:09
-
-
Save ddodogames/365f931749f2d22e706c83614b7fe1a7 to your computer and use it in GitHub Desktop.
aoi.js v6 slash choice example with test command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = [{ | |
name: "create", | |
code: `The example slash command with choices has been created! Run the command to check out. | |
$createApplicationCommand[$guildID;choice;slash command choices showcase!;true;false;slash;[{ | |
"name": "option", | |
"description": "options example", | |
"required": true, | |
"type": 3, | |
"choices" : [{ | |
"name" : "choice 1", | |
"value" : "value1" | |
},{ | |
"name" : "choice 2 ", | |
"value" : "value2" | |
},{ | |
"name" : "choice 3", | |
"value" : "value3" | |
}] | |
}] | |
$onlyIf[$checkContains[$clientOwnerIDs[,];$authorID]==true;]` // Restricted to bot developers for safety | |
},{ | |
name: "choice", | |
type: "interaction", | |
prototype: "slash", | |
$if: "old", | |
code: `$if[$slashOption[option]==value1] | |
$interactionReply[example of choice 1 reply!;;;;all;false] | |
$elseif[$slashOption[option]==value2] | |
$interactionReply[example of choice 2 reply!;;;;all;false] | |
$endelseif | |
$elseif[$slashOption[option]==value3] | |
$interactionReply[example of choice 3 reply!;;;;all;false] | |
$endelseif | |
$endif` | |
}] | |
// Note that this was only made for learning purposes. You can change everything to your liking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment