Prepare for another Custom Source
This commit is contained in:
parent
ceb2da92d6
commit
d4c9ed99d0
@ -6,7 +6,7 @@ from cogs.music import Music
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from config import BOT_COLOR
|
from config import BOT_COLOR
|
||||||
from custom_source import LoadError
|
from custom_sources import LoadError
|
||||||
|
|
||||||
|
|
||||||
class Skip(commands.Cog):
|
class Skip(commands.Cog):
|
||||||
|
@ -5,6 +5,11 @@ class LoadError(Exception): # We'll raise this if we have trouble loading our t
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Retrieve the playback URL for a custom track
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class CustomAudioTrack(DeferredAudioTrack):
|
class CustomAudioTrack(DeferredAudioTrack):
|
||||||
# A DeferredAudioTrack allows us to load metadata now, and a playback URL later.
|
# A DeferredAudioTrack allows us to load metadata now, and a playback URL later.
|
||||||
# This makes the DeferredAudioTrack highly efficient, particularly in cases
|
# This makes the DeferredAudioTrack highly efficient, particularly in cases
|
||||||
@ -36,7 +41,12 @@ class CustomAudioTrack(DeferredAudioTrack):
|
|||||||
return base64
|
return base64
|
||||||
|
|
||||||
|
|
||||||
class CustomSource(Source):
|
"""
|
||||||
|
Custom Source for Spotify links
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class SpotifySource(Source):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
name="custom"
|
name="custom"
|
@ -5,7 +5,7 @@ import datetime
|
|||||||
|
|
||||||
from cogs.music import CheckPlayerError
|
from cogs.music import CheckPlayerError
|
||||||
from config import BOT_COLOR
|
from config import BOT_COLOR
|
||||||
from custom_source import LoadError
|
from custom_sources import LoadError
|
||||||
|
|
||||||
|
|
||||||
class Tree(app_commands.CommandTree):
|
class Tree(app_commands.CommandTree):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user