Add option to let user search directly from play

This commit is contained in:
2022-02-27 19:21:50 +07:00
parent 108a4042e2
commit b274332cc9
4 changed files with 75 additions and 10 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ const EMBEDS = {
export async function joinVoiceChannelProcedure (data: Interaction | Message, instance: (DiscordMusicPlayerInstance | null), voiceChannel: (VoiceChannel | StageChannel)) {
const isSlashCommand = data instanceof CommandInteraction && data.isCommand();
const isAcceptableInteraction = data instanceof Interaction && data.isSelectMenu();
const isAcceptableInteraction = data instanceof Interaction && (data.isSelectMenu() || data.isButton());
const isMessage = data instanceof Message;
if ((!isSlashCommand && !isAcceptableInteraction) && !isMessage) return;