Update commands to use the new slash command builder
- Updated app js to remove Emmelia remnants
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
// Debug
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||
const log = new DebugBuilder("client-bot", "join");
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder");
|
||||
const log = new DebugBuilder("client", "ping");
|
||||
// Modules
|
||||
const { joinVoiceChannel, VoiceConnectionStatus } = require("@discordjs/voice");
|
||||
const {replyToInteraction} = require("../utilities/messageHandler.js");
|
||||
const { SlashCommandBuilder } = require('discord.js');
|
||||
const {createAudioInstance} = require("../controllers/audioController.js");
|
||||
const OpusEncoderPkg = require("@discordjs/opus");
|
||||
|
||||
@@ -11,6 +12,17 @@ const OpusEncoderPkg = require("@discordjs/opus");
|
||||
const { OpusEncoder } = OpusEncoderPkg;
|
||||
const encoder = new OpusEncoder(48000, 2);
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('join')
|
||||
.setDescription('Join a voice channel'),
|
||||
example: "join",
|
||||
isPrivileged: false,
|
||||
async execute(interaction) {
|
||||
await this.join({ interaction: interaction });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Join the specified voice channel
|
||||
*
|
||||
@@ -55,4 +67,5 @@ exports.join = async function join({interaction= undefined, guildID= undefined,
|
||||
})
|
||||
|
||||
if (guildID && callback) callback();
|
||||
else return;
|
||||
}
|
||||
Reference in New Issue
Block a user