SelectMenu -> StringSelectMenu

This commit is contained in:
Isaac
2023-01-02 12:23:14 +00:00
parent 5c2eed2d7b
commit a10a1663a3
4 changed files with 20 additions and 19 deletions

View File

@@ -7,8 +7,8 @@ const {
},
ChannelType: { GuildText },
EmbedBuilder,
SelectMenuBuilder,
SelectMenuOptionBuilder,
StringSelectMenuBuilder,
StringSelectMenuOptionBuilder,
} = require('discord.js');
const emoji = require('node-emoji');
const { logAdminEvent } = require('../../../../../lib/logging');
@@ -102,12 +102,12 @@ module.exports.post = fastify => ({
);
} else {
components.push(
new SelectMenuBuilder()
new StringSelectMenuBuilder()
.setCustomId(JSON.stringify({ action: 'create' }))
.setPlaceholder(getMessage('menus.category.placeholder'))
.setOptions(
categories.map(category =>
new SelectMenuOptionBuilder()
new StringSelectMenuOptionBuilder()
.setValue(String(category.id))
.setLabel(category.name)
.setDescription(category.description)