refactor(commands/voice/queue): delay player creation

This commit is contained in:
2025-05-01 18:25:35 -04:00
parent b6d105a519
commit 1316fb593c

View File

@@ -15,9 +15,6 @@ from .utils import command_allowed, ensure_joined, play_next
async def queue_or_play(message, edited=False):
if message.guild.id not in players:
players[message.guild.id] = audio.queue.Player()
tokens = commands.tokenize(message.content)
parser = arguments.ArgumentParser(
tokens[0],
@@ -81,6 +78,9 @@ async def queue_or_play(message, edited=False):
elif not command_allowed(message):
return
if message.guild.id not in players:
players[message.guild.id] = audio.queue.Player()
if edited:
found = None
for queued in players[message.guild.id].queue: