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
is this a bad solution converting into json so concat does not remove the commands with the same name
const slashCommand = this.client.commands.toJSON();
const userCommand = this.client.userCommands.toJSON();
const messageCommand = this.client.messageCommands;
const test = slashCommand.concat(userCommand)
console.log(test)
//@ts-ignore
const rest = new REST().setToken(process.env.token);
const globalCommands: any = await rest.put(Routes.applicationCommands("1190649323160088687"), {
body: test
})
console.log(`successfully loaded `, globalCommands)
const slashCommand = this.client.commands.toJSON();
const userCommand = this.client.userCommands.toJSON();
const messageCommand = this.client.messageCommands;
const test = slashCommand.concat(userCommand)
console.log(test)
//@ts-ignore
const rest = new REST().setToken(process.env.token);
const globalCommands: any = await rest.put(Routes.applicationCommands("1190649323160088687"), {
body: test
})
console.log(`successfully loaded `, globalCommands)
4 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
How you do that
10 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
since what sharding and local clustering does it just split up the guilds into different process on the computer but there is a limit even to that so how do they avoid that
10 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
but how does that work for big bots like mee6
10 replies