Comments (4)
second approach sounds better to me than having master slave relationship. I think this can be implemented with REST adding endpoints to the api, or socket for faster response time. The config can contain a list of bot domain uri where each bot can connect to, so when any instance of the same bot got a command it will behave consistently based on its situation. Although such small feature with a lot of work to solve user laziness. Searching for unused instance of one of your bot won't be too hard is it?
from discord-musicbot.
I think implementing a sort of mesh network topology might be the best approach, at least theoretically, it would allow for each bot to communicate with each other without a single point of failure in case one of them goes down.
This isn't considering the actual implementation aspects of the whole ordeal, since deploying such a thing in a doable and easy manner, so as to not have our support channels clogged, might be a bit difficult
https://en.m.wikipedia.org/wiki/Network_topology
This might be somewhat doable using docker scaling, allocating a single env.secrets file to hold a multitude of configurations for each bot you'd like to deploy, a parsing script for validity and integrity check and then having the bot, on startup, check by itself which id are not yet taken, Picking the first one available. This way you can use the --scale
flag from compose to run the same bot n
times and they'd be ready to run with their dedicated configurations
This also doesn't consider the cases and the logic for when bots of the same type aren't in the same server.
Example:
Bot A is in server A, but Bot B isn't. The case explained in the OP would mean it throws an error cause Bot B doesn't have access to the server;
Instead, Bot A should send a message saying "I'm already occupied, invite Bot B if you want more bots..."
from discord-musicbot.
Another option could be that all the bots have access to a local database in which the bots will say when they join a channel, in which channel and when they leave that channel. In this way, if Bot B sees that Bot A is already in a room and that a user in another channel calls the Bot, B will be able to go. I think it could be done with SqLite and a couple of scripts.
from discord-musicbot.
Another option could be that all the bots have access to a local database in which the bots will say when they join a channel, in which channel and when they leave that channel. In this way, if Bot B sees that Bot A is already in a room and that a user in another channel calls the Bot, B will be able to go. I think it could be done with SqLite and a couple of scripts.
This is not a viable solution as it could lead to transaction failures. It'd be the typical semaphore problem causing locks
from discord-musicbot.
Related Issues (20)
- Support for a lavalink-client which has lavalink v4 support HOT 9
- Allow /play command in the control channel
- Dashboard login loop HOT 10
- Issue with fastify v4.26.0 HOT 1
- Multi-language support and interface buttons
- SUSPICIOUS - Could not load track. HOT 7
- Support for DockerFile for fly.io deployment HOT 2
- WS and API port interverted in config.js default HOT 4
- Error while output the queue command HOT 1
- command.setCategory is not a function
- Music not playing | There was an error while searching HOT 5
- There was an error while searching HOT 1
- Lavalink error when playing? HOT 1
- New lavalink v4
- Discord resets Bot token because of to many requests HOT 1
- Cannot play music "There was an error while searching" HOT 5
- Error: Used disallowed intents HOT 3
- Update to Lavalink 4.x server HOT 2
- [ERROR] | [FATAL] Possibly Uncaught Exception, Reason: ReferenceError: player is not defined HOT 11
- /search shows wrong song data in "added to queue" message HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-musicbot.