Handle secondary bots from main

Hey! I am working on a meetings system that would require my bot to join meetings and record transcriptions. As we have several meetings and sometimes they overlap, I'd like to handle two to three secondary bots that would join the meeting when others are occupied. Is it possible to handle this logic in sapphire? How could that be done? Thank you!
Solution:
Sapphire, nor DiscordJS for that matter, are set up for running multiple bots on the same process. So instead of overcomplicating you’ll just make 1 codebase then spawn it multiple times with multiple configs of Docker or whatever you use to spawn the process and pass different tokens through environment variables.
Jump to solution
4 Replies
Solution
Favna
Favna14mo ago
Sapphire, nor DiscordJS for that matter, are set up for running multiple bots on the same process. So instead of overcomplicating you’ll just make 1 codebase then spawn it multiple times with multiple configs of Docker or whatever you use to spawn the process and pass different tokens through environment variables.
yibuh
yibuhOP14mo ago
Thank you for your answer. I'd like to ask one thing, probably a dumb question: would it be possible to store each client instance in a collection (or an array) inside the container and access each instance through that? For example:
container.bots = [
{
client: secondaryBotOne,
busy: false
},
{
client: secondaryBotTwo,
busy: false
}
]
container.bots = [
{
client: secondaryBotOne,
busy: false
},
{
client: secondaryBotTwo,
busy: false
}
]
I'd log in with each bot when the main bot logs in secondaryBotOne and secondaryBoTwo being instances of SapphireClient
Favna
Favna14mo ago
it wouldnt be, also refer to the answers given on https://discord.com/channels/737141877803057244/1170458087304466482
yibuh
yibuhOP14mo ago
Thank you
Want results from more Discord servers?
Add your server