mirror of
https://github.com/deadcxap/YandexMusicDiscordBot.git
synced 2026-01-14 09:41:55 +03:00
feat: Add vote functionality.
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
from typing import TypedDict, Any
|
||||
from typing import TypedDict, Literal, Any
|
||||
|
||||
class MessageVotes(TypedDict):
|
||||
positive_votes: list[int]
|
||||
negative_votes: list[int]
|
||||
total_members: int
|
||||
action: Literal['next', 'add_track', 'add_album', 'add_artist', 'add_playlist']
|
||||
vote_content: dict[str, Any] | list[dict[str, Any]] | None
|
||||
|
||||
class Guild(TypedDict, total=False):
|
||||
next_tracks: list[dict[str, Any]]
|
||||
@@ -8,7 +15,6 @@ class Guild(TypedDict, total=False):
|
||||
is_stopped: bool
|
||||
allow_explicit: bool
|
||||
always_allow_menu: bool
|
||||
vote_add: bool
|
||||
vote_next_track: bool
|
||||
vote_add_track: bool
|
||||
vote_add_album: bool
|
||||
@@ -16,6 +22,7 @@ class Guild(TypedDict, total=False):
|
||||
vote_add_playlist: bool
|
||||
shuffle: bool
|
||||
repeat: bool
|
||||
votes: dict[str, MessageVotes]
|
||||
|
||||
class ExplicitGuild(TypedDict):
|
||||
_id: int
|
||||
@@ -26,11 +33,11 @@ class ExplicitGuild(TypedDict):
|
||||
is_stopped: bool # Prevents the `after` callback of play_track
|
||||
allow_explicit: bool
|
||||
always_allow_menu: bool
|
||||
vote_add: bool
|
||||
vote_next_track: bool
|
||||
vote_add_track: bool
|
||||
vote_add_album: bool
|
||||
vote_add_artist: bool
|
||||
vote_add_playlist: bool
|
||||
shuffle: bool
|
||||
repeat: bool
|
||||
repeat: bool
|
||||
votes: dict[str, MessageVotes]
|
||||
Reference in New Issue
Block a user