Add command for simulating extended dice roll and basic shell code

This commit is contained in:
Sebastian Fischlmayr 2022-10-12 19:10:23 +02:00
parent 8fee5df53e
commit f700c892ac
Signed by: Maverick
GPG key ID: 6379E413924A4E77
2 changed files with 128 additions and 8 deletions

View file

@ -27,6 +27,84 @@ const commands = [
{ name: 'Framework', value: 'framework' },
)
)
),
new SlashCommandBuilder()
.setName('simulate')
.setDescription('Simulate different type of dice rolls.')
.addSubcommand(subcommand =>
subcommand
.setName('simple')
.setDescription('Simulate a simple dice roll.')
)
.addSubcommand(subcommand =>
subcommand
.setName('extended')
.setDescription('Simulate an extended dice roll.')
.addNumberOption(option =>
option
.setName('dicepool')
.setDescription('The dicepool of the roll.')
.setRequired(true)
)
.addNumberOption(option =>
option
.setName('difficulty')
.setDescription('The difficulty of the roll.')
.setRequired(true)
)
.addNumberOption(option =>
option
.setName('interval')
.setDescription('The interval of the roll.')
.setRequired(false)
)
.addNumberOption(option =>
option
.setName('max-edge')
.setDescription('The maximum number of edge to use.')
.setRequired(false)
)
.addStringOption(option =>
option
.setName('edgetype')
.setDescription('What type of edgeing should be used ?')
.addChoices(
{ name: 'None', value: 'none' },
{ name: 'Turn Up', value: 'up' },
{ name: 'Reroll', value: 'reroll' },
{ name: 'Smart', value: 'smart' },
{ name: 'All', value: 'all' },
)
)
.addStringOption(option =>
option
.setName('edgerefresh')
.setDescription('How often should the edge refresh ?')
.addChoices(
{ name: 'Never', value: 'none' },
{ name: 'Every Roll', value: 'fill' },
{ name: '1 Edge per Roll', value: 'once' },
{ name: '2 Edge per Roll', value: 'twice' },
)
)
.addNumberOption(option =>
option
.setName('amount')
.setDescription('How many times should the roll be simulated ? WARNING this service is pricey !')
.setRequired(false)
)
.addBooleanOption(option =>
option
.setName('hidden')
.setDescription('Should the result be hidden ?')
.setRequired(false)
)
.addBooleanOption(option =>
option
.setName('true-random')
.setDescription('Should the dice be truly random ?')
.setRequired(false)
)
)
]
.map(command => command.toJSON());