mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
testing
This commit is contained in:
1 parent
fe123731d1
commit
65e58414dc
3 files changed
+72
-5
No files matched your search
+19
-1
@@ -190,7 +190,25 @@ export async function run(message, data) {
|
||||
const cid = this.players.checkVoiceChannels(message);
|
||||
|
||||
if (!cid) {
|
||||
const prefix = this._commands?.getPrefix?.(getGuildId(message)) ?? "%";
|
||||
const userId = message?.author?.id ?? message?.message?.author?.id;
|
||||
const guildId = getGuildId(message);
|
||||
let isHidden = false;
|
||||
try {
|
||||
const cleanGuild = String(guildId ?? "").replace(/\D/g, "");
|
||||
const guild = this.players?.commands?.client?.guilds?.get?.(cleanGuild);
|
||||
const member = guild?.members?.get?.(userId);
|
||||
if (member) {
|
||||
const memberVoiceCh = member.voice?.channelId ?? member.voice_channel_id ?? member.voiceChannelId ?? null;
|
||||
if (memberVoiceCh) isHidden = true;
|
||||
}
|
||||
} catch (_) {}
|
||||
if (isHidden) {
|
||||
const prefix = this._commands?.getPrefix?.(guildId) ?? "%";
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.join.hiddenVoiceChannel", { prefix }));
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
const prefix = this._commands?.getPrefix?.(guildId) ?? "%";
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.join.noVoiceChannel", { prefix }));
|
||||
return message.reply({ embeds: [embed] });
|
||||
|
||||
Reference in new issue
Block a user