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:Jump to 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.
4 Replies
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.
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:
I'd log in with each bot when the main bot logs in
secondaryBotOne
and secondaryBoTwo
being instances of SapphireClientit wouldnt be, also refer to the answers given on https://discord.com/channels/737141877803057244/1170458087304466482
Thank you