✨ only 1 role can be selected with dropdown (configurable)
This commit is contained in:
parent
1cfc4a8fa8
commit
8e38c629af
|
|
@ -42,7 +42,7 @@ export class CreateRolePickerCommand extends Command {
|
||||||
const row = new MessageActionRow().addComponents(
|
const row = new MessageActionRow().addComponents(
|
||||||
new MessageSelectMenu()
|
new MessageSelectMenu()
|
||||||
.setMinValues(0)
|
.setMinValues(0)
|
||||||
.setMaxValues(role.length)
|
.setMaxValues(rolePicker.multi_select ? role.length : 1)
|
||||||
.setCustomId(`interaction-poc-${rolePicker.name}`)
|
.setCustomId(`interaction-poc-${rolePicker.name}`)
|
||||||
.setPlaceholder(rolePicker.placeholder)
|
.setPlaceholder(rolePicker.placeholder)
|
||||||
.addOptions(
|
.addOptions(
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ interface RolePicker {
|
||||||
name: string,
|
name: string,
|
||||||
message: string,
|
message: string,
|
||||||
placeholder: string,
|
placeholder: string,
|
||||||
|
multi_select: boolean
|
||||||
roles: Role[]
|
roles: Role[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue