aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-07-18 22:05:29 -0500
committerParker <contact@pkrm.dev>2024-07-18 22:05:29 -0500
commitd4c9ed99d0bb717606cfcbfe4f69523c6734a5b2 (patch)
treefb9b402cb799842aa7a411242ca4599386867dae /code
parentceb2da92d667f91bad33c6fb79c0c699d2a315ab (diff)
Prepare for another Custom Source
Diffstat (limited to 'code')
-rw-r--r--code/cogs/skip.py2
-rw-r--r--code/custom_sources.py (renamed from code/custom_source.py)12
-rw-r--r--code/tree.py2
3 files changed, 13 insertions, 3 deletions
diff --git a/code/cogs/skip.py b/code/cogs/skip.py
index 966a8c2..b3645fb 100644
--- a/code/cogs/skip.py
+++ b/code/cogs/skip.py
@@ -6,7 +6,7 @@ from cogs.music import Music
import asyncio
from config import BOT_COLOR
-from custom_source import LoadError
+from custom_sources import LoadError
class Skip(commands.Cog):
diff --git a/code/custom_source.py b/code/custom_sources.py
index 8ed2091..400c645 100644
--- a/code/custom_source.py
+++ b/code/custom_sources.py
@@ -5,6 +5,11 @@ class LoadError(Exception): # We'll raise this if we have trouble loading our t
pass
+"""
+Retrieve the playback URL for a custom track
+"""
+
+
class CustomAudioTrack(DeferredAudioTrack):
# A DeferredAudioTrack allows us to load metadata now, and a playback URL later.
# This makes the DeferredAudioTrack highly efficient, particularly in cases
@@ -36,7 +41,12 @@ class CustomAudioTrack(DeferredAudioTrack):
return base64
-class CustomSource(Source):
+"""
+Custom Source for Spotify links
+"""
+
+
+class SpotifySource(Source):
def __init__(self):
super().__init__(
name="custom"
diff --git a/code/tree.py b/code/tree.py
index a16f126..eff83b8 100644
--- a/code/tree.py
+++ b/code/tree.py
@@ -5,7 +5,7 @@ import datetime
from cogs.music import CheckPlayerError
from config import BOT_COLOR
-from custom_source import LoadError
+from custom_sources import LoadError
class Tree(app_commands.CommandTree):