Replace deprecated SelectMenuBuilder

This commit is contained in:
Ninjdai 2023-02-25 10:20:58 +01:00
parent ddc2f5ba8b
commit 97d38c94e5
6 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
const { SlashCommandBuilder, SelectMenuBuilder, ActionRowBuilder } = require('discord.js'); const { SlashCommandBuilder, StringSelectMenuBuilder, ActionRowBuilder } = require('discord.js');
module.exports = { module.exports = {
data: new SlashCommandBuilder() data: new SlashCommandBuilder()
@ -21,7 +21,7 @@ module.exports = {
const sanctionembedrow = new ActionRowBuilder() const sanctionembedrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('document_sanctions') .setCustomId('document_sanctions')
.setPlaceholder('Navigateur') .setPlaceholder('Navigateur')
.addOptions([ .addOptions([

View File

@ -1,4 +1,4 @@
const { SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ActionRowBuilder, SelectMenuBuilder, ChannelType } = require('discord.js'); const { SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ActionRowBuilder, StringSelectMenuBuilder, ChannelType } = require('discord.js');
const SetupTickets = require('./setupcommands/tickets.js'); const SetupTickets = require('./setupcommands/tickets.js');
const SetupPanel = require('./setupcommands/panels.js'); const SetupPanel = require('./setupcommands/panels.js');
const SetupMod = require('./setupcommands/moderation.js'); const SetupMod = require('./setupcommands/moderation.js');

View File

@ -1,4 +1,4 @@
const { ButtonStyle, EmbedBuilder, SelectMenuBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js') const { ButtonStyle, EmbedBuilder, StringSelectMenuBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js')
module.exports = { module.exports = {
async execute(interaction, client) { async execute(interaction, client) {
@ -151,7 +151,7 @@ module.exports = {
const sanctionembedrow = new ActionRowBuilder() const sanctionembedrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('document_sanctions') .setCustomId('document_sanctions')
.setPlaceholder('Navigateur') .setPlaceholder('Navigateur')
.addOptions([ .addOptions([
@ -195,7 +195,7 @@ const sanctionembedrow = new ActionRowBuilder()
const albumphotoembedrow = new ActionRowBuilder() const albumphotoembedrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('document_albumphoto') .setCustomId('document_albumphoto')
.setPlaceholder('Navigateur') .setPlaceholder('Navigateur')
.addOptions([ .addOptions([

View File

@ -1,4 +1,4 @@
const { EmbedBuilder, SelectMenuBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js') const { EmbedBuilder, StringSelectMenuBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js')
module.exports = { module.exports = {
async execute(interaction, client) { async execute(interaction, client) {
@ -50,7 +50,7 @@ const ticketgraphismtyperow = new ActionRowBuilder()
const ticketsupportRow = new ActionRowBuilder() const ticketsupportRow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('ticket_create-support') .setCustomId('ticket_create-support')
.setPlaceholder('Choisissez le type de ticket que vous voulez !') .setPlaceholder('Choisissez le type de ticket que vous voulez !')
.addOptions([ .addOptions([

View File

@ -1,4 +1,4 @@
const { EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
module.exports = { module.exports = {
async execute(interaction) { async execute(interaction) {
@ -212,7 +212,7 @@ const notifroles = [
const rolegenrerow = new ActionRowBuilder() const rolegenrerow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('roleselect_genre') .setCustomId('roleselect_genre')
.setPlaceholder('Choisissez votre pronom / Choose your pronoun') .setPlaceholder('Choisissez votre pronom / Choose your pronoun')
.addOptions([ .addOptions([
@ -236,7 +236,7 @@ const rolegenrerow = new ActionRowBuilder()
const rolecolorrow = new ActionRowBuilder() const rolecolorrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('roleselect_color') .setCustomId('roleselect_color')
.setPlaceholder('Choisissez une couleur / Choose a color') .setPlaceholder('Choisissez une couleur / Choose a color')
.addOptions([ .addOptions([
@ -279,7 +279,7 @@ const rolecolorrow = new ActionRowBuilder()
); );
const rolehobbiesrow = new ActionRowBuilder() const rolehobbiesrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('roleselect_hobbies') .setCustomId('roleselect_hobbies')
.setPlaceholder('Choisissez vos hobbies / Choose your hobbies') .setPlaceholder('Choisissez vos hobbies / Choose your hobbies')
.setMaxValues(8) .setMaxValues(8)
@ -328,7 +328,7 @@ const rolehobbiesrow = new ActionRowBuilder()
); );
const rolepingsrow = new ActionRowBuilder() const rolepingsrow = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId('roleselect_pings') .setCustomId('roleselect_pings')
.setPlaceholder('Choisissez vos notifications / Choose your pings') .setPlaceholder('Choisissez vos notifications / Choose your pings')
.setMaxValues(7) .setMaxValues(7)

View File

@ -1,11 +1,11 @@
const { ActionRowBuilder, SelectMenuBuilder } = require('discord.js') const { ActionRowBuilder, StringSelectMenuBuilder } = require('discord.js')
module.exports = { module.exports = {
async execute(interaction) { async execute(interaction) {
await interaction.deferReply({ ephemeral: true }); await interaction.deferReply({ ephemeral: true });
const ticketgraphismtyperow2 = new ActionRowBuilder() const ticketgraphismtyperow2 = new ActionRowBuilder()
.addComponents( .addComponents(
new SelectMenuBuilder() new StringSelectMenuBuilder()
.setCustomId(`ticket_create-graphism-${interaction.customId.replace('ticketopener_', '')}`) .setCustomId(`ticket_create-graphism-${interaction.customId.replace('ticketopener_', '')}`)
.setPlaceholder('Choisissez le type de graphisme.') .setPlaceholder('Choisissez le type de graphisme.')
.addOptions([ .addOptions([