Fixed menu select play not working in stage

This commit is contained in:
2022-06-28 15:19:05 +07:00
parent 1aea4f58a5
commit 46415d2e49
+3 -2
View File
@@ -6,7 +6,8 @@ import {
MessageActionRow, MessageActionRow,
MessageButton, MessageButton,
SelectMenuInteraction, SelectMenuInteraction,
ButtonInteraction ButtonInteraction,
StageChannel
} from 'discord.js'; } from 'discord.js';
import { I18n } from 'i18n'; import { I18n } from 'i18n';
@@ -221,7 +222,7 @@ export default class Play extends DiscordModule {
const voiceChannel = DiscordProvider.client.guilds.cache.get(guild.id)?.channels.cache.get(payload.d.v); const voiceChannel = DiscordProvider.client.guilds.cache.get(guild.id)?.channels.cache.get(payload.d.v);
//let member = DiscordProvider.client.guilds.cache.get(guild.id)?.members.cache.get(user.id); //let member = DiscordProvider.client.guilds.cache.get(guild.id)?.members.cache.get(user.id);
if (!voiceChannel || !(voiceChannel instanceof VoiceChannel)) return; if (!voiceChannel || !(voiceChannel instanceof VoiceChannel || voiceChannel instanceof StageChannel)) return;
if (!member.voice.channel) if (!member.voice.channel)
return await sendHybridInteractionMessageResponse( return await sendHybridInteractionMessageResponse(