Add !deleteall
This commit is contained in:
parent
26f317c250
commit
235865e74e
1 changed files with 11 additions and 1 deletions
|
|
@ -201,6 +201,9 @@ class Playlist:
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def deleteall(self):
|
||||||
|
self.waiting = []
|
||||||
|
|
||||||
# playlist info
|
# playlist info
|
||||||
|
|
||||||
def empty(self):
|
def empty(self):
|
||||||
|
|
@ -244,10 +247,11 @@ class ArgonDJBot(yaboli.Bot):
|
||||||
"!skip, !s - skip the currently playing video\n"
|
"!skip, !s - skip the currently playing video\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Advanced queue manipulation:\n"
|
"Advanced queue manipulation:\n"
|
||||||
"!detail, !info, !show <indices> - show more details for videos in the queue\n"
|
|
||||||
"!list, !l - display a list of currently queued videos\n"
|
"!list, !l - display a list of currently queued videos\n"
|
||||||
|
"!detail, !info, !show <indices> - show more details for videos in the queue\n"
|
||||||
"!delete, !del, !d <index> - deletes video at that index in the queue\n"
|
"!delete, !del, !d <index> - deletes video at that index in the queue\n"
|
||||||
"!insert, !ins, !i before|after <index> <urls or ids> - insert videos in the queue\n"
|
"!insert, !ins, !i before|after <index> <urls or ids> - insert videos in the queue\n"
|
||||||
|
"!deleteall, !dall, !da, !flush - remove the whole queue\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Fun stuff:\n"
|
"Fun stuff:\n"
|
||||||
"!dramaticskip, !dskip, !ds - dramatic version of !skip\n"
|
"!dramaticskip, !dskip, !ds - dramatic version of !skip\n"
|
||||||
|
|
@ -354,6 +358,7 @@ class ArgonDJBot(yaboli.Bot):
|
||||||
await self.command_dskip(room, message, command)
|
await self.command_dskip(room, message, command)
|
||||||
|
|
||||||
await self.command_list(room, message, command)
|
await self.command_list(room, message, command)
|
||||||
|
await self.command_deleteall(room, message, command)
|
||||||
|
|
||||||
await self.command_detail(room, message, command, argstr)
|
await self.command_detail(room, message, command, argstr)
|
||||||
|
|
||||||
|
|
@ -559,6 +564,11 @@ class ArgonDJBot(yaboli.Bot):
|
||||||
await room.send(text, message.mid)
|
await room.send(text, message.mid)
|
||||||
self.playlist.play(room)
|
self.playlist.play(room)
|
||||||
|
|
||||||
|
@yaboli.command("deleteall", "dall", "da", "flush")
|
||||||
|
async def command_deleteall(self, room, message):
|
||||||
|
self.playlist.deleteall()
|
||||||
|
await room.send("Queue deleted", message.mid)
|
||||||
|
|
||||||
|
|
||||||
def main(configfile):
|
def main(configfile):
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue