Skip to content

Commit

Permalink
feat(node): add most ws wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Oct 19, 2022
1 parent 6556139 commit b6edd13
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions mafic/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,41 @@ def play(

return self.__send(data)

# TODO: play
# TODO: stop
# TODO: pause
# TODO: seek
# TODO: volume
def stop(self, guild_id: int) -> Coro[None]:
return self.__send(
{
"op": "stop",
"guildId": str(guild_id),
}
)

def pause(self, guild_id: int, pause: bool) -> Coro[None]:
return self.__send(
{
"op": "pause",
"guildId": str(guild_id),
"pause": pause,
}
)

def seek(self, guild_id: int, position: int) -> Coro[None]:
return self.__send(
{
"op": "seek",
"guildId": str(guild_id),
"position": position,
}
)

def volume(self, guild_id: int, volume: int) -> Coro[None]:
return self.__send(
{
"op": "volume",
"guildId": str(guild_id),
"volume": volume,
}
)

# TODO: filter
# TODO: API routes:

Expand Down

0 comments on commit b6edd13

Please sign in to comment.