Added auto-disconnect feature
This commit is contained in:
1 parent
8ff36532cc
commit
7ce9e51155
1 file changed
+2
-2
+2
-2
@@ -203,9 +203,9 @@ else:
|
||||
ctx.voice_client.play(
|
||||
player, after=lambda e: print(f"Player error: {e}") if e else None
|
||||
)
|
||||
while ctx.is_playing():
|
||||
while ctx.voice_client:
|
||||
await asyncio.sleep(1)
|
||||
await ctx.disconnect()
|
||||
await ctx.voice_client.disconnect()
|
||||
await ctx.respond(f"{success}Now playing: `{player.title}`\nRequested by {ctx.author.mention}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user