@getsolara/solara.voice
Version:
Optional voice functionality for @getsolara/solara.js using @discordjs/voice
13 lines • 510 B
JavaScript
module.exports = {
name: "$voiceChannelID",
description: "Returns the ID of the voice channel the bot is connected to in the current guild.",
takesBrackets: false,
execute: async (context, args) => {
if (context.client.voiceInitialized === false) {
return "";
}
if (!context.guild) return "";
const connection = context.client.solaraVoiceConnections?.get(context.guild.id);
return connection?.joinConfig?.channelId || "";
}
};