pylav.storage.controllers package

Subpackages

Submodules

pylav.storage.controllers.config module

pylav.storage.controllers.equalizers module

class pylav.storage.controllers.equalizers.EqualizerController(client)[source]

Bases: object

property client
async static count()[source]

Returns the number of equalizers in the database.

async create_or_update_channel_equalizer(text_channel, identifier, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async static create_or_update_equalizer(identifier, scope, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async create_or_update_global_equalizer(identifier, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async create_or_update_guild_equalizer(guild, identifier, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async create_or_update_user_equalizer(user_id, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async create_or_update_vc_equalizer(voice_channel, identifier, author, name, description=None, band_25=None, band_40=None, band_63=None, band_100=None, band_160=None, band_250=None, band_400=None, band_630=None, band_1000=None, band_1600=None, band_2500=None, band_4000=None, band_6300=None, band_10000=None, band_16000=None)[source]
async static delete_equalizer(equalizer_id)[source]
static get_all_equalizers()[source]
static get_all_equalizers_by_author(author)[source]
static get_all_equalizers_by_scope(scope)[source]
static get_all_equalizers_by_scope_and_author(scope, author)[source]
async get_all_for_user(requester, *, voice_channel=None, guild=None, channel=None)[source]

Gets all equalizers a user has access to in a given context.

Globals, User specific, Guild specific, Channel specific, VC specific.

async static get_equalizer_by_id(identifier)[source]
async static get_equalizer_by_name(equalizer_name, limit=None)[source]
async get_equalizer_by_name_or_id(equalizer_name_or_id, limit=None)[source]
async static get_equalizers_by_author(author)[source]
async static get_equalizers_by_scope(scope)[source]
async get_global_equalizers()[source]
async get_manageable_equalizers(requester, bot, *, name_or_id=None)[source]

pylav.storage.controllers.migrator module

class pylav.storage.controllers.migrator.MigrationController(client)[source]

Bases: object

async run_deferred_tasks_which_depend_on_node()[source]
async run_updates()[source]

Run through schema migrations

pylav.storage.controllers.nodes module

class pylav.storage.controllers.nodes.NodeController(client)[source]

Bases: object

bundled_node_config()[source]
property client
async static count()[source]

Return the number of unbundled nodes in the database.

currently_in_db
async delete(node_id)[source]
async get_all_nodes()[source]
async get_all_unmanaged_nodes(dedupe=True)[source]
async get_bundled_node_config()[source]
get_node_config(node_id)[source]
async update_node(host, port, password, unique_identifier, resume_timeout=60, name=None, reconnect_attempts=-1, ssl=False, search_only=False, managed=False, extras=None, yaml=None, disabled_sources=None)[source]

Add a new node to the database.

Parameters:
  • host (str) – The host of the node.

  • port (int) – The port of the node.

  • password (str) – The password of the node.

  • unique_identifier (int) – The unique identifier of the node.

  • name (str) – The name of the node.

  • resume_timeout (int) – The resume timeout of the node.

  • reconnect_attempts (int) – The reconnect attempts of the node.

  • ssl (bool) – Whether the node is using ssl.

  • search_only (bool) – Whether the node is search only.

  • managed (bool) – Whether the node is managed.

  • extras (dict) – The extras of the node.

  • disabled_sources (list[str]) – The disabled sources of the node.

  • yaml (dict) – The yaml of the node.

pylav.storage.controllers.playlists module

pylav.storage.controllers.queries module

Module contents