Added status command to discord bot
This commit is contained in:
28
Client/discord-bot/commands/status.js
Normal file
28
Client/discord-bot/commands/status.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// Debug
|
||||
import ModuleDebugBuilder from "../utilities/moduleDebugBuilder.js";
|
||||
const log = new ModuleDebugBuilder("bot", "status");
|
||||
// Modules
|
||||
import {getVoiceConnection} from "@discordjs/voice";
|
||||
// Utilities
|
||||
import { replyToInteraction } from '../utilities/messageHandler.js';
|
||||
|
||||
|
||||
export default async function status({interaction= undefined, guildID= 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)
|
||||
|
||||
// get the status and return it accordingly (message reply / module)
|
||||
|
||||
if (interaction) {
|
||||
return replyToInteraction(interaction, "Pong! I have Aids and now you do too!");
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user