feat: delete queued songs on message delete
This commit is contained in:
@@ -328,6 +328,17 @@ async def volume(message):
|
||||
await utils.add_check_reaction(message)
|
||||
|
||||
|
||||
def delete_queued(messages):
|
||||
found = []
|
||||
for message in messages:
|
||||
for queued in players[message.guild.id].queue:
|
||||
if queued.trigger_message.id == message.id:
|
||||
found.append(queued)
|
||||
for queued in found:
|
||||
if queued in players[messages[0].guild.id].queue:
|
||||
players[messages[0].guild.id].queue.remove(queued)
|
||||
|
||||
|
||||
def play_after_callback(e, message, once):
|
||||
if e:
|
||||
print(f"player error: {e}")
|
||||
|
Reference in New Issue
Block a user