fix queue being too long and other random issues
This commit is contained in:
parent
ca886b1c71
commit
662f25fab8
1 changed files with 4 additions and 5 deletions
9
bot.py
9
bot.py
|
@ -89,13 +89,12 @@ async def play(inter: disnake.AppCmdInter, link: str):
|
|||
)
|
||||
async def shuffleplay(inter: disnake.AppCmdInter, toggle: str = commands.Param(choices=["on", "off"])):
|
||||
await inter.response.defer(ephemeral=True)
|
||||
if toggle == "on":
|
||||
global shuffle
|
||||
if toggle == "on":
|
||||
shuffle = True
|
||||
await inter.edit_original_response(f"shuffle enabled")
|
||||
return
|
||||
else:
|
||||
global shuffle
|
||||
shuffle = False
|
||||
await inter.edit_original_response(f"shuffle disabled")
|
||||
return
|
||||
|
@ -114,7 +113,7 @@ async def getqueue(inter: disnake.AppCmdInter):
|
|||
message = message + f"Now playing: <{item}>\n"
|
||||
continue
|
||||
message = message + f"{idx}. <{item}>\n"
|
||||
await inter.edit_original_response(message)
|
||||
await inter.edit_original_response(message[:2000]) #its possible for the queue to be longer then discords max allowed
|
||||
|
||||
@bot.slash_command(
|
||||
name="toggleplayback",
|
||||
|
@ -134,7 +133,7 @@ async def toggleplayback(inter: disnake.AppCmdInter):
|
|||
description="skips the current video DON'T SKIP LESS THAN 18 SECONDS INTO A VIDEO",
|
||||
)
|
||||
async def skip(inter: disnake.AppCmdInter):
|
||||
await inter.response.defer(ephemeral=True)
|
||||
await inter.response.defer(ephemeral=False)
|
||||
global queuetask
|
||||
queuetask.cancel()
|
||||
try:
|
||||
|
@ -146,7 +145,7 @@ async def skip(inter: disnake.AppCmdInter):
|
|||
driver.fullscreen_window()
|
||||
else:
|
||||
queuetask = asyncio.create_task(queuehandler())
|
||||
await inter.edit_original_response("skipepd")
|
||||
await inter.edit_original_response("skipped")
|
||||
|
||||
@bot.slash_command(
|
||||
name="remove",
|
||||
|
|
Loading…
Reference in a new issue