465 | Smith M.
465 | Smith M.
DIAdiscord.js - Imagine an app
Created by 465 | Smith M. on 1/6/2024 in #djs-questions
discord.js collections
hello i have two discord collections one for my slash commands and one for my user commands (context menu commands) but im having a issue if i use concat and both commands have the same name, only one is left
async execute(...args: any) {
console.log(`${this.client.user?.tag} is ready`)
const slashCommand = this.client.commands;
const userCommand = this.client.userCommands;
const messageCommand = this.client.messageCommands;
//@ts-ignore
const rest = new REST().setToken(process.env.token);
const globalCommands: any = await rest.put(Routes.applicationCommands("1190649323160088687"), {
body: commands
})
console.log(`successfully loaded `, globalCommands)


}
async execute(...args: any) {
console.log(`${this.client.user?.tag} is ready`)
const slashCommand = this.client.commands;
const userCommand = this.client.userCommands;
const messageCommand = this.client.messageCommands;
//@ts-ignore
const rest = new REST().setToken(process.env.token);
const globalCommands: any = await rest.put(Routes.applicationCommands("1190649323160088687"), {
body: commands
})
console.log(`successfully loaded `, globalCommands)


}
how would i compaine the slashCommand and userCommand and messageCommand collections but also allow for commands to have the same name
4 replies
DIAdiscord.js - Imagine an app
Created by 465 | Smith M. on 1/5/2024 in #djs-questions
context menu loading
i have a custom command file setup like this https://sourceb.in/EeStdEJZDN but want to be able to set user commands
3 replies
DIAdiscord.js - Imagine an app
Created by 465 | Smith M. on 1/5/2024 in #djs-questions
how to cluster on more then one computer
im wondering if / how you could have two vps running a discord bot to split up the interactions / commands to make your discord bot faster
10 replies