A bot that uses multiple discord bots
Basicly my bot wukk get rate limited alot as it will create alot of channels and drag members when it create game vcs so I need a bot to just create the channels and drag members and one to send the messages and roles and som1 pls help <3 thanks!!!!
12 Replies
- What's your exact discord.js
npm list discord.js and node node -v version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Creating several discord bots to work together to avoid the rate limit is not advisable
(2b) You will not (c) access or use the APIs in any way that (iv) exceeds any API rate, call, or other usage limits we set in our sole discretion
We will not support any TOS violations
Maybe split the operations of your bot? Afaik thats not against TOS. Imagine a bot like ProBot that does alot of things and you would exclude functionality into a seperate bot like "showing embedded messages and getting roles"-bot, "level-up"-bot etc. pp. instead of having them running in once instance
No but like
In servers like i.e Hypixel Ranked Bedwars
they have a single bot which oversees all 7 bots which makes channels and stuff
Its just dividing the actions between bots
Instead of a single bot doing 1000 tasks
Yeah exactly
Like lets say 1 bot controls another bot which has moderation commands
And another bot which makes channels and stuff
you right thats what i mean
Basicly the program will host multiple bots and one will send the messages, ione will manage the role, one will manage the channels and have a backup bot incase one fail ect
You can make multiple bots for different tasks, that's advised.
How would I do that tho i'm new to js, all the bots will need to run on the same program and complete the action caused by the comand of another bot
You can open multiple connection and handle them like seperate clients (in the same process/code), obviously you have to mange who does what and how they work with each other
Usually we use some bussystem doing stuff like this. In real world, where reliability matters and data loss means financial damage, usually people use some quque system like rabbitMQ or whatever (option 1)
If you don't care about data loss (in case your app turns off during "one bot calls another bot") then you can just use any objects to share data between your bots (option 2), which means they run on the same thread but with multiple connection instances
and last but not least would (option 3) would be to use
Workers who run in a separate threads (eg. each thread has 2 gb ram) but at the cost that they cant share the same variables, but need to communicate with each other on a different way (e.g. through database or rabbitMQ or whatever)
Obvisouly you can mix those options to create a solution that fits your need. Easiest way would be to stick with option 2, open multiple connection in the same code and go on from thereI'm very new to JS so
ill look into that thanks
I meant seperate bots on seperate processes. why would you need this anyways?
seperate bots that will do an action when a command is done on one on the same process
so on bot 1 i do the command
and bot 2 does the action (give roles EG)
i'd say a dirty workaround would be to declare a first bot, then a second bot exported from a separate file that you can call from other part of your code