How can I run private instances of my Discord Bot for each server?

Viewed 146

A bot I'm working on offers a premium subscription and as one of the perks, I'd like to offer users a chance to change stuff like the avatar, username, status, etc. for the bot in their server, similar to how Mee6 does it. What would be the simplest way to go about this? I'm thinking Docker and Containers would work out well, but I feel as if there's an easier way to go about this.

1 Answers

Yes, you can, but user need to provide their bot's token, you don't need to use docker container, you only need to create multiple Client

// Client one
const client1 = new Discord.Client({...});
// Client two
const client2 = new Discord.Client({...});

// login to client
client1.login("client 1 token")
client2.login("client 2 token")

If you want to manage more client, you can create a collection then put all client into it.

Related