Skip to content
Snippets Groups Projects
Commit 3173e8d2 authored by Torben Eims's avatar Torben Eims
Browse files

First testing and working multi-select

parent bd029fd6
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,13 @@ const locales = require("../util/locale");
// slashcommand handler
async function addRoleMenu(interaction) {
const config = await ServerConfig.findOne({guildID: interaction.guild.id.toString()});
let locale = 'en';
if (config != null) {
locale = config.locale;
}
console.log('addrolemenu 20210926T2132')
// let locale = 'en';
// if (config != null) {
// locale = config.locale;
// }
const locale = config?.locale || 'en'
const functionLocale = locales.get(locale).components.roleMenu;
const messageLocale = locales.get(locale).misc.messageTemplates.roleDropdown;
if (!(await checkPerm(interaction.member, 'role_menu'))) {
......@@ -32,6 +35,22 @@ async function addRoleMenu(interaction) {
value: 'select_reset'
}
])
.addOptions([
{
label: 'Debug Option 1',
value: 'option1',
emoji: '1️⃣'
}
])
.addOptions([
{
label: 'Debug Option 2',
value: 'option2',
emoji: '2️⃣'
}
])
.setMaxValues(3)
.setMinValues(0)
);
const msg = await channel.send({content: messageContent, components: [row1]});
let menu = new RoleMenu();
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment