mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-14 19:29:22 +00:00
Fixed select menu bug
This commit is contained in:
@@ -119,7 +119,7 @@ export async function joinVoiceChannelProcedure(
|
||||
voiceChannel: VoiceChannel | StageChannel
|
||||
) {
|
||||
const isSlashCommand = data.isApplicationCommand();
|
||||
const isAcceptableInteraction = data.isSelectMenu() || data.isButton();
|
||||
const isAcceptableInteraction = data.isStringSelectMenu() || data.isButton();
|
||||
const isMessage = data.isMessage();
|
||||
if (!isSlashCommand && !isAcceptableInteraction && !isMessage) return;
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ export default class Play extends DiscordModule {
|
||||
instance.addTrackToQueue(song);
|
||||
}
|
||||
|
||||
if (hybridData.getSelectMenu().message instanceof Message)
|
||||
await (hybridData.getSelectMenu().message as Message).edit({ components: [] });
|
||||
if (hybridData.getStringSelectMenu().message instanceof Message)
|
||||
await (hybridData.getStringSelectMenu().message as Message).edit({ components: [] });
|
||||
|
||||
return await sendHybridInteractionMessageResponse(
|
||||
hybridData,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
CommandInteraction,
|
||||
ActionRowBuilder,
|
||||
ButtonInteraction,
|
||||
SelectMenuBuilder,
|
||||
StringSelectMenuBuilder,
|
||||
SelectMenuComponentOptionData
|
||||
} from 'discord.js';
|
||||
import { I18n } from 'i18n';
|
||||
@@ -137,7 +137,7 @@ export default class Search extends DiscordModule {
|
||||
|
||||
const menuOptions: SelectMenuComponentOptionData[] = [];
|
||||
|
||||
const messageSelectMenu = new SelectMenuBuilder();
|
||||
const messageSelectMenu = new StringSelectMenuBuilder();
|
||||
/*
|
||||
Discord have 100 char custom id char limit
|
||||
So we need to shorten our json.
|
||||
@@ -168,7 +168,7 @@ export default class Search extends DiscordModule {
|
||||
|
||||
messageSelectMenu.addOptions(menuOptions);
|
||||
|
||||
const row = new ActionRowBuilder<SelectMenuBuilder>();
|
||||
const row = new ActionRowBuilder<StringSelectMenuBuilder>();
|
||||
row.addComponents([messageSelectMenu]);
|
||||
|
||||
return await sendHybridInteractionMessageResponse(data, {
|
||||
|
||||
Reference in New Issue
Block a user