mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
* [Audio] Disconnect from voice chat when every connected user is a bot
* Update condition according to code review
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
(cherry picked from commit 5a047bf979)
Co-authored-by: Parnassius <Parnassius@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Parnassius <Parnassius@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ class PlayerTasks(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
if await self.bot.cog_disabled_in_guild(self, server):
|
if await self.bot.cog_disabled_in_guild(self, server):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if [self.bot.user] == p.channel.members:
|
if p.channel.members and all(m.bot for m in p.channel.members):
|
||||||
stop_times.setdefault(server.id, time.time())
|
stop_times.setdefault(server.id, time.time())
|
||||||
pause_times.setdefault(server.id, time.time())
|
pause_times.setdefault(server.id, time.time())
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user