diff --git a/v6d3music/commands.py b/v6d3music/commands.py index 81273d1..d53fedf 100644 --- a/v6d3music/commands.py +++ b/v6d3music/commands.py @@ -351,16 +351,34 @@ presets: {shlex.join(allowed_presets)} case _: raise Explicit("misformatted") + @at("||") + @at("⏸") + @at("⏸️") @at("pause") async def pause(ctx: Context, _args: list[str]) -> None: vc = await mainservice.context(ctx, create=False, force_play=False).vc() vc.pause() + @at("|>") + @at(">") + @at("⏵") @at("resume") async def resume(ctx: Context, _args: list[str]) -> None: vc = await mainservice.context(ctx, create=False, force_play=True).vc() vc.resume() + @at(".") + @at("⏯") + @at("⏯️") + @at("pp") + @at("playpause") + async def playpause(ctx: Context, _args: list[str]) -> None: + vc = await mainservice.context(ctx, create=False, force_play=True).vc() + if vc.is_paused(): + vc.resume() + else: + vc.pause() + @at("leave") async def leave(ctx: Context, _args: list[str]) -> None: async with mainservice.lock_for(ctx.guild):