~exprez135/muffinwoman

da6b1cd3f5a2929757f7892a7c266d0b7edcef03 — Nate Ijams 3 years ago 97aa349
Add pause and resume functions.
2 files changed, 13 insertions(+), 1 deletions(-)

M src/cogs/meta.py
M src/cogs/music.py
M src/cogs/meta.py => src/cogs/meta.py +1 -1
@@ 20,7 20,7 @@ class Meta (Cog):

  @command(name = "help")
  async def help(self, ctx):
      await ctx.send("Muffinwoman Help Page\n---\n.help: This help info.\n.play [url]: Play media from URL and join voice.\n.leave: Stop playing and leave voice channel.\n.join: Force the bot to join your channel.\n.skip: Skip current song.\n.queue: See the current playlist!\n.clearqueue: Reset queue!\n.info: Show software, developer, and license info.\n---\nTip: there is a queue! Just run the .play command to add to it.")
      await ctx.send("Muffinwoman Help Page\n---\n.help: This help info.\n.play [url]: Play media from URL and join voice.\n.leave: Stop playing and leave voice channel.\n.join: Force the bot to join your channel.\n.skip: Skip current song.\n.pause: Pause media.\n.resume: Resume media.\n.queue: See the current playlist!\n.clearqueue: Reset queue!\n.info: Show software, developer, and license info.\n---\nTip: there is a queue! Just run the .play command to add to it.")

  @command(name = "info")
  async def info(self, ctx):

M src/cogs/music.py => src/cogs/music.py +12 -0
@@ 84,6 84,18 @@ class Music (Cog):
        return

  @command()
  async def pause (self, ctx):
    botvoice = ctx.voice_client
    botvoice.pause()
    await ctx.send("Music paused!")

  @command()
  async def resume (self, ctx):
    botvoice = ctx.voice_client
    botvoice.resume()
    await ctx.send("Music resumed!")

  @command()
  async def queue (self, ctx):
    if self.playlist == []:
        await ctx.send("Playlist empty!")