diff --git a/pomice/enums.py b/pomice/enums.py index a6716a2..1f42de8 100644 --- a/pomice/enums.py +++ b/pomice/enums.py @@ -5,7 +5,12 @@ from enum import Enum __all__ = ( 'SearchType', 'TrackType', - 'PlaylistType' + 'PlaylistType', + 'NodeAlgorithm', + 'LoopMode', + 'RouteStrategy', + 'RouteIPType', + 'URLRegex' ) diff --git a/pomice/events.py b/pomice/events.py index cdc0606..adf8669 100644 --- a/pomice/events.py +++ b/pomice/events.py @@ -10,6 +10,16 @@ from typing import TYPE_CHECKING, Union if TYPE_CHECKING: from .player import Player +__all__ = ( + 'PomiceEvent', + 'TrackStartEvent', + 'TrackEndEvent', + 'TrackStuckEvent', + 'TrackExceptionEvent', + 'WebSocketClosedEvent', + 'WebSocketOpenEvent' +) + class PomiceEvent: diff --git a/pomice/exceptions.py b/pomice/exceptions.py index 9eeac42..ea1ce81 100644 --- a/pomice/exceptions.py +++ b/pomice/exceptions.py @@ -1,3 +1,26 @@ +__all__ = ( + 'PomiceException', + 'NodeException', + 'NodeCreationError', + 'NodeConnectionError', + 'NodeConnectionFailure', + 'NodeConnectionClosed', + 'NodeRestException', + 'NodeNotAvailable', + 'NoNodesAvailable', + 'TrackInvalidPosition', + 'TrackLoadError', + 'FilterInvalidArgument', + 'FilterTagInvalid', + 'FilterTagAlreadyInUse', + 'InvalidSpotifyClientAuthorization', + 'AppleMusicNotEnabled', + 'QueueException', + 'QueueFull', + 'QueueEmpty', + 'LavalinkVersionIncompatible' +) + class PomiceException(Exception): """Base of all Pomice exceptions.""" @@ -56,21 +79,6 @@ class FilterTagAlreadyInUse(PomiceException): pass -class SpotifyAlbumLoadFailed(PomiceException): - """The pomice Spotify client was unable to load an album.""" - pass - - -class SpotifyTrackLoadFailed(PomiceException): - """The pomice Spotify client was unable to load a track.""" - pass - - -class SpotifyPlaylistLoadFailed(PomiceException): - """The pomice Spotify client was unable to load a playlist.""" - pass - - class InvalidSpotifyClientAuthorization(PomiceException): """No Spotify client authorization was provided for track searching.""" pass diff --git a/pomice/filters.py b/pomice/filters.py index e60efb9..43389d7 100644 --- a/pomice/filters.py +++ b/pomice/filters.py @@ -1,6 +1,18 @@ import collections from .exceptions import FilterInvalidArgument +__all__ = ( + 'Filter', + 'Equalizer', + 'Timescale', + 'Karaoke', + 'Tremolo', + 'Vibrato', + 'Rotation', + 'ChannelMix', + 'Distortion', + 'LowPass' +) class Filter: """ diff --git a/pomice/objects.py b/pomice/objects.py index 4f96101..3d13c61 100644 --- a/pomice/objects.py +++ b/pomice/objects.py @@ -7,6 +7,7 @@ from discord.ext import commands from .enums import SearchType, TrackType, PlaylistType from .filters import Filter +__all__ = ('Track', 'Playlist') class Track: diff --git a/pomice/player.py b/pomice/player.py index 272e335..c3a99c6 100644 --- a/pomice/player.py +++ b/pomice/player.py @@ -23,6 +23,8 @@ from .filters import Filter from .objects import Track from .pool import Node, NodePool +__all__ = ('Filters', 'Player') + class Filters: """Helper class for filters""" __slots__ = ('_filters') diff --git a/pomice/pool.py b/pomice/pool.py index 7525d68..9479583 100644 --- a/pomice/pool.py +++ b/pomice/pool.py @@ -37,8 +37,7 @@ from .routeplanner import RoutePlanner if TYPE_CHECKING: from .player import Player -_log = logging.getLogger(__name__) - +__all__ = ('Node', 'NodePool') class Node: """The base class for a node. @@ -168,7 +167,6 @@ class Node: if data["t"] == "VOICE_SERVER_UPDATE": guild_id = int(data["d"]["guild_id"]) - _log.debug(f"Recieved voice server update message from guild ID: {guild_id}") try: player = self._players[guild_id] await player.on_voice_server_update(data["d"]) @@ -180,7 +178,6 @@ class Node: return guild_id = int(data["d"]["guild_id"]) - _log.debug(f"Recieved voice state update message from guild ID: {guild_id}") try: player = self._players[guild_id] await player.on_voice_state_update(data["d"]) diff --git a/pomice/utils.py b/pomice/utils.py index 36486a9..31f4a3a 100644 --- a/pomice/utils.py +++ b/pomice/utils.py @@ -8,10 +8,13 @@ from itertools import zip_longest from datetime import datetime -__all__ = [ - "ExponentialBackoff", - "NodeStats" -] +__all__ = ( + 'ExponentialBackoff', + 'NodeStats', + 'FailingIPBlock', + 'RouteStats', + 'Ping' +) class ExponentialBackoff: