Skip to content

Commit

Permalink
Merge branch 'inactive-player-timeout'
Browse files Browse the repository at this point in the history
  • Loading branch information
itsTheFae committed Dec 9, 2023
2 parents 29f68a8 + 3378d10 commit 133f7c7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions musicbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,14 @@ async def disconnect_voice_client(self, guild):

if guild.id in self.players:
player = self.players.pop(guild.id)
if self.config.leave_player_inactive_for > 0:
await self.reset_player_inactivity(player)

await self.reset_player_inactivity(player)

if self.config.leave_inactive_channel:
event, active = self.server_specific_data[guild]["inactive_vc_timer"]
if active and not event.is_set():
event.set()

player.kill()

await self.update_now_playing_status()
Expand Down

0 comments on commit 133f7c7

Please sign in to comment.