Compare commits
3 Commits
7b21d4601f
...
565fd5af37
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
565fd5af37 | ||
|
|
f04154d361 | ||
|
|
383663e980 |
@@ -41,9 +41,10 @@ export async function autocomplete(nodeIo, interaction) {
|
|||||||
*/
|
*/
|
||||||
export async function execute(nodeIo, interaction) {
|
export async function execute(nodeIo, interaction) {
|
||||||
// Check if the user is in a VC
|
// Check if the user is in a VC
|
||||||
if (!interaction.member.voice.channel) { return await interaction.editReply({ content: `<@${interaction.member.id}>, you need to enter a voice channel before use the command`, ephemeral: true }) }
|
if (!interaction.member.voice.channel) { return await interaction.editReply({ content: `<@${interaction.member.id}>, you need to enter a voice channel before you use this command`, ephemeral: true }) }
|
||||||
// Grab the channel if the user is connected to VC
|
// Grab the channel if the user is connected to VC
|
||||||
const channelToJoin = interaction.member.voice.channel;
|
const channelToJoin = interaction.member.voice.channel;
|
||||||
|
console.log(`The user '${interaction.member.id}' is in the voice channel '${channelToJoin}'`);
|
||||||
|
|
||||||
// Get the selected system option from the command interaction
|
// Get the selected system option from the command interaction
|
||||||
const selectedSystem = interaction.options.getString('system');
|
const selectedSystem = interaction.options.getString('system');
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export function addEnabledEventListeners(serverClient, _eventsPath = "./events")
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The discord client
|
// The discord client
|
||||||
export const serverClient = new Client({ intents: [GatewayIntentBits.Guilds] });
|
export const serverClient = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates] });
|
||||||
|
|
||||||
// Run when the bot is ready
|
// Run when the bot is ready
|
||||||
serverClient.on('ready', async () => {
|
serverClient.on('ready', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user