Major updates to core
This commit is contained in:
25
server/discordBot/commands/join.mjs
Normal file
25
server/discordBot/commands/join.mjs
Normal file
@@ -0,0 +1,25 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
// Exporting data property
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName('join')
|
||||
.setDescription('Replies with your input!');
|
||||
|
||||
// Exporting other properties
|
||||
export const example = "/join";
|
||||
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);
|
||||
console.log("Open Socket: ", sockets.values(), nodeIo.sockets.sockets.get(sockets[0]))
|
||||
//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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user