[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
590f292275
commit
ef3b8f4b1d
|
|
@ -333,7 +333,7 @@ class Music(commands.Cog):
|
|||
"""Moves a track's position in the queue (e.g., !move 5 1)."""
|
||||
player: Player = ctx.voice_client
|
||||
if not player or player.queue.is_empty:
|
||||
return await ctx.send("The queue is empty.")
|
||||
return await ctx.send("The queue is empty.")
|
||||
|
||||
try:
|
||||
player.queue.move(from_index - 1, to_index - 1)
|
||||
|
|
@ -371,7 +371,7 @@ class Music(commands.Cog):
|
|||
"boost": pomice.Equalizer.boost(),
|
||||
"nightcore": pomice.Timescale.nightcore(),
|
||||
"vaporwave": pomice.Timescale.vaporwave(),
|
||||
"bass": pomice.Equalizer.bass_boost_light()
|
||||
"bass": pomice.Equalizer.bass_boost_light(),
|
||||
}
|
||||
|
||||
if preset not in presets:
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@ class IntegratedMusic(commands.Cog):
|
|||
return await ctx.send("Queue is empty.")
|
||||
|
||||
pomice.PlaylistManager.export_queue(
|
||||
player.queue, f"playlists/{filename}", name=f"{ctx.guild.name}'s Playlist",
|
||||
player.queue,
|
||||
f"playlists/{filename}",
|
||||
name=f"{ctx.guild.name}'s Playlist",
|
||||
)
|
||||
await ctx.send(f"✅ Queue exported to `playlists/{filename}`")
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ class TrackInvalidPosition(PomiceException):
|
|||
|
||||
class TrackLoadError(PomiceException):
|
||||
"""There was an error while loading a track."""
|
||||
|
||||
def __init__(self, message: str = "Sorry, I ran into trouble trying to load that track."):
|
||||
super().__init__(message)
|
||||
|
||||
|
|
@ -111,13 +112,17 @@ class QueueException(Exception):
|
|||
|
||||
class QueueFull(QueueException):
|
||||
"""Exception raised when attempting to add to a full Queue."""
|
||||
|
||||
def __init__(self, message: str = "Whoops! The queue is completely full right now."):
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class QueueEmpty(QueueException):
|
||||
"""Exception raised when attempting to retrieve from an empty Queue."""
|
||||
def __init__(self, message: str = "It looks like the queue is empty. There's no more music to play!"):
|
||||
|
||||
def __init__(
|
||||
self, message: str = "It looks like the queue is empty. There's no more music to play!",
|
||||
):
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -169,9 +169,21 @@ class Equalizer(Filter):
|
|||
Perfect for mainstream hits.
|
||||
"""
|
||||
levels = [
|
||||
(0, -0.02), (1, -0.01), (2, 0.08), (3, 0.1), (4, 0.15),
|
||||
(5, 0.1), (6, 0.05), (7, 0.0), (8, 0.0), (9, 0.0),
|
||||
(10, 0.05), (11, 0.1), (12, 0.15), (13, 0.1), (14, 0.05)
|
||||
(0, -0.02),
|
||||
(1, -0.01),
|
||||
(2, 0.08),
|
||||
(3, 0.1),
|
||||
(4, 0.15),
|
||||
(5, 0.1),
|
||||
(6, 0.05),
|
||||
(7, 0.0),
|
||||
(8, 0.0),
|
||||
(9, 0.0),
|
||||
(10, 0.05),
|
||||
(11, 0.1),
|
||||
(12, 0.15),
|
||||
(13, 0.1),
|
||||
(14, 0.05),
|
||||
]
|
||||
return cls(tag="pop", levels=levels)
|
||||
|
||||
|
|
@ -181,9 +193,21 @@ class Equalizer(Filter):
|
|||
Ideal for acoustic tracks or when you just want a more relaxed listening experience.
|
||||
"""
|
||||
levels = [
|
||||
(0, 0.0), (1, 0.0), (2, 0.0), (3, -0.05), (4, -0.1),
|
||||
(5, -0.1), (6, -0.05), (7, 0.0), (8, 0.05), (9, 0.1),
|
||||
(10, 0.1), (11, 0.05), (12, 0.0), (13, 0.0), (14, 0.0)
|
||||
(0, 0.0),
|
||||
(1, 0.0),
|
||||
(2, 0.0),
|
||||
(3, -0.05),
|
||||
(4, -0.1),
|
||||
(5, -0.1),
|
||||
(6, -0.05),
|
||||
(7, 0.0),
|
||||
(8, 0.05),
|
||||
(9, 0.1),
|
||||
(10, 0.1),
|
||||
(11, 0.05),
|
||||
(12, 0.0),
|
||||
(13, 0.0),
|
||||
(14, 0.0),
|
||||
]
|
||||
return cls(tag="soft", levels=levels)
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ class Queue(Iterable[Track]):
|
|||
Where you want to put the track.
|
||||
"""
|
||||
if from_index == to_index:
|
||||
return
|
||||
return
|
||||
|
||||
track = self._queue.pop(from_index)
|
||||
self._queue.insert(to_index, track)
|
||||
|
|
|
|||
Loading…
Reference in New Issue