freyacodes / archived-bot

A Discord music bot serving music in over 3 million discord servers
https://fredboat.com/docs
MIT License
488 stars 207 forks source link

Check for other music bots playing already #181

Closed TobiTenno closed 7 years ago

TobiTenno commented 7 years ago

Requested: Check if a speaking user in the voice chat a user is in is a bot. If so, warn the user or don't join the voice chat Configurable:

What I mean: Before joining a voice chat to play music, check if there is a bot and if it is speaking. Marking this with a warning or not joining would help prevent accidental instances of multiple music bots playing in one channel.

freyacodes commented 7 years ago

There's no way to know if someone is speaking without joining the same voice channel. I don't see an elegant way of doing this. Most people just create separate channels to prevent this from happening.

TobiTenno commented 7 years ago

i'll check the docs on the jda library, but in the javascript library there is. we have several channels, but let users choose which room and which bot they wanna use.

knight-ryu12 commented 7 years ago

I honestly don't recommend this thing, because of how ;;join works. As Fred said.

TobiTenno commented 7 years ago

Looks like there's a "getVoiceState" on the "guildMember" object http://home.dv8tion.net:8080/job/JDA/javadoc/net/dv8tion/jda/core/entities/Member.html

TobiTenno commented 7 years ago

What about how ;;join works would prevent this from working?

knight-ryu12 commented 7 years ago

Currently ;;join is doing Just join. if you want include em, we need to change command too.

freyacodes commented 7 years ago

GuildVoiceState does not expose a method to tell if a user is speaking.

TobiTenno commented 7 years ago

I'll be more generic, then, just telling if it's in a voice channel would be enough, and just saying "there's another bot in there, just so you know"

freyacodes commented 7 years ago

To be honest, I don't really see the use of this. If a user is trying to troll the voice channel, moderation can step in, or mods can create separate channels.

knight-ryu12 commented 7 years ago

Also we can move CurrentPlayer with Discord default thing

TobiTenno commented 7 years ago

except when mods can't separate channels cause perms and admins are inactive in a massive server XD it's more that the mods can't do anything about it, and admins are unwilling to lock them to channels, so users end up accidentally using the wrong prefix and bringing another bot in and having them both play at once.

yes, i realize it's more of a moderation problem then yours, but it'd be helpful, is all i mean.

schnapster commented 7 years ago

Just use ;;leave to get rid of FredBoat in your channel if you invited it accidently.

TobiTenno commented 7 years ago

right, but we'd also rather not have random people popping in and ;;leave-ing the bot when others are listening to music

freyacodes commented 7 years ago

This issue has nothing to do with the ;;leave command

TobiTenno commented 7 years ago

i know, i didn't bring it up