Server
- Working init discord bot
- Modular events and commands
- Has access to the socket server
- Working init socket server
- Need to work on getting access to discord bot
- Working init web server
Currently working on breaking out the init of the socket server
Client
- Working init socket client
Currently working on the discord bot to join voice channels
24 lines
719 B
JavaScript
24 lines
719 B
JavaScript
import { SlashCommandBuilder } from 'discord.js';
|
|
|
|
// Exporting data property
|
|
export const data = new SlashCommandBuilder()
|
|
.setName('ping')
|
|
.setDescription('Replies with your input!');
|
|
|
|
// Exporting other properties
|
|
export const example = "/ping";
|
|
export const deferInitialReply = false;
|
|
|
|
// Exporting execute function
|
|
export async function execute(nodeIo, interaction) {
|
|
try {
|
|
const sockets = await nodeIo.allSockets();
|
|
console.log("All open sockets: ",sockets);
|
|
//await interaction.reply(`**Online Sockets: '${sockets}'**`);
|
|
await interaction.reply('**Pong.**');
|
|
//await interaction.channel.send('**Pong.**');
|
|
} catch (err) {
|
|
console.error(err);
|
|
// await interaction.reply(err.toString());
|
|
}
|
|
} |