pylav.storage.models.player package#
Submodules#
pylav.storage.models.player.config module#
- class pylav.storage.models.player.config.PlayerConfig(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
CachedModel
- bot#
- async bulk_add_dj_roles(*roles)[source]#
Add disc jockey roles to the player.
- Parameters:
roles (
discord.Role
) – The roles to add
- async bulk_remove_dj_roles(*roles)[source]#
Remove disc jockey roles from the player.
- Parameters:
roles (
discord.Role
) – The roles to add.
- async bulk_remove_dj_users(*users)[source]#
Remove disc jockey users from the player.
- Parameters:
users (
discord.Member
) – The users to add
- id#
- async is_dj(user, *, additional_role_ids=None, additional_user_ids=None)[source]#
Check if a user is a disc jockey.
- Parameters:
user (
discord.Member
) – The user to check.additional_role_ids (
list
) – The additional disc jockey role ids to check.additional_user_ids (
list
) – The additional disc jockey user ids to check.
- Returns:
Whether the user is a disc jockey.
- Return type:
- async update_auto_play_playlist_id(auto_play_playlist_id)[source]#
Update the auto play playlist ID of the player
- async update_forced_channel_id(forced_channel_id)[source]#
Update the forced channel ID of the player
pylav.storage.models.player.state module#
- class pylav.storage.models.player.state.PlayerState(id, bot, channel_id, volume, position, auto_play_playlist_id, text_channel_id, notify_channel_id, forced_channel_id, paused, repeat_current, repeat_queue, shuffle, auto_shuffle, auto_play, playing, effect_enabled, self_deaf, current, queue, history, effects, extras, pk=None)[source]#
Bases:
CachedModel
A class to represent the state of a player in the database
- auto_play#
- auto_play_playlist_id#
- auto_shuffle#
- bot#
- channel_id#
- current#
- effect_enabled#
- effects#
- extras#
- forced_channel_id#
- history#
- id#
- notify_channel_id#
- paused#
- pk = None#
- playing#
- position#
- queue#
- repeat_current#
- repeat_queue#
- self_deaf#
- shuffle#
- text_channel_id#
- volume#