Allow the client to interact with the discord bot
- The client can now interact with the bot, this allows the client to offer bot controls via API - The master server will now be able to instruct a specific client to join a specific channel via channel ID (master server function coming soon) - Suppress some debug statements to make the output easier to read when mixed in with the client debug output
This commit is contained in:
@@ -7,15 +7,18 @@ import {getVoiceConnection} from "@discordjs/voice";
|
||||
import { replyToInteraction } from '../utilities/messageHandler.js';
|
||||
|
||||
|
||||
export default async function status({interaction= undefined, guildID= undefined}) {
|
||||
export default async function status({interaction= undefined, guildID= undefined, callback = undefined}) {
|
||||
//if (!interaction && !guildID) // Need error of sorts
|
||||
if (interaction){
|
||||
guildID = interaction.guild.id;
|
||||
}
|
||||
const voiceConnection = getVoiceConnection(guildID);
|
||||
|
||||
log.DEBUG("guildID: ", guildID)
|
||||
log.DEBUG("Voice Connection: ", voiceConnection)
|
||||
const statusObj = {
|
||||
"guildID": guildID, "voiceConnection": voiceConnection
|
||||
}
|
||||
|
||||
//log.DEBUG('Status Object: ', statusObj);
|
||||
|
||||
// get the status and return it accordingly (message reply / module)
|
||||
|
||||
@@ -23,6 +26,6 @@ export default async function status({interaction= undefined, guildID= undefined
|
||||
return replyToInteraction(interaction, "Pong! I have Aids and now you do too!");
|
||||
}
|
||||
else {
|
||||
|
||||
callback(statusObj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user