mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 01:53:17 +00:00
Discord.js - StringSelectMenu
This commit is contained in:
parent
92af0f71b2
commit
503f4b7cca
@ -1,4 +1,4 @@
|
|||||||
import { ActionRowBuilder, EmbedBuilder, SelectMenuBuilder } from "discord.js";
|
import { ActionRowBuilder, EmbedBuilder, StringSelectMenuBuilder } from "discord.js";
|
||||||
import Streamer from "../classes/Streamer.js";
|
import Streamer from "../classes/Streamer.js";
|
||||||
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
|
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
|
||||||
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
|
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
|
||||||
@ -65,7 +65,7 @@ module.exports = {
|
|||||||
|
|
||||||
const menu = new ActionRowBuilder()
|
const menu = new ActionRowBuilder()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new SelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
.setCustomId('maintenance')
|
.setCustomId('maintenance')
|
||||||
.setPlaceholder('Select action')
|
.setPlaceholder('Select action')
|
||||||
.addOptions(options)
|
.addOptions(options)
|
||||||
|
@ -26,7 +26,7 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
} else if (interaction.isSelectMenu() || interaction.isButton()){
|
} else if (interaction.isStringSelectMenu() || interaction.isButton()){
|
||||||
const commandName = interaction.customId;
|
const commandName = interaction.customId;
|
||||||
const command = client.commands.get(commandName);
|
const command = client.commands.get(commandName);
|
||||||
if (!command) return;
|
if (!command) return;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ActionRowBuilder, SelectMenuBuilder } from "discord.js";
|
import { ActionRowBuilder, StringSelectMenuBuilder } from "discord.js";
|
||||||
|
|
||||||
module.exports = function listStations(client, interaction){
|
module.exports = function listStations(client, interaction){
|
||||||
let stations = new Array();
|
let stations = new Array();
|
||||||
@ -16,7 +16,7 @@ module.exports = function listStations(client, interaction){
|
|||||||
|
|
||||||
const menu = new ActionRowBuilder()
|
const menu = new ActionRowBuilder()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new SelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
.setCustomId('play')
|
.setCustomId('play')
|
||||||
.setPlaceholder('Nothing selected')
|
.setPlaceholder('Nothing selected')
|
||||||
.addOptions(options)
|
.addOptions(options)
|
||||||
|
Loading…
Reference in New Issue
Block a user