Support voice text channel

This commit is contained in:
2022-06-29 18:59:06 +07:00
parent 7d4b3add14
commit 6110dd876e
4 changed files with 17 additions and 9 deletions
+4 -2
View File
@@ -12,7 +12,9 @@ import {
TextChannel,
VoiceBasedChannel,
PermissionsBitField,
ButtonStyle
ButtonStyle,
BaseGuildTextChannel,
BaseGuildVoiceChannel
} from 'discord.js';
import { I18n } from 'i18n';
@@ -130,7 +132,7 @@ export async function joinVoiceChannelProcedure(
if (!member || !channel || !guild) return;
if (channel instanceof DMChannel) return;
if (!(channel instanceof TextChannel)) return;
if (!(channel instanceof BaseGuildTextChannel || channel instanceof BaseGuildVoiceChannel)) return;
const memberVoiceChannel = member.voice.channel; //isMessage ? member.voice.channel : DiscordProvider.client.guilds.cache.get(guild.id)!.members.cache.get((data as Interaction).user.id)?.voice.channel;
if (!memberVoiceChannel) return;