refactor: use from imports for constants

This commit is contained in:
2025-01-08 09:26:02 -05:00
parent 07b3bde22d
commit 7c2e17e0d3
4 changed files with 23 additions and 20 deletions

View File

@@ -1,8 +1,9 @@
import disnake_paginator
import arguments
import commands
import constants
import disnake_paginator
import utils
from constants import EMBED_COLOR
from state import players
from .utils import command_allowed
@@ -30,7 +31,7 @@ async def playing(message):
if description := source.description:
paginator = disnake_paginator.ButtonPaginator(
invalid_user_function=utils.invalid_user_handler,
color=constants.EMBED_COLOR,
color=EMBED_COLOR,
title=source.title,
segments=disnake_paginator.split(description),
)

View File

@@ -5,9 +5,9 @@ import disnake_paginator
import arguments
import commands
import constants
import utils
import youtubedl
from constants import EMBED_COLOR
from state import client, players
from .playback import resume
@@ -197,7 +197,7 @@ async def queue_or_play(message, edited=False):
def embed(description):
e = disnake.Embed(
description=description,
color=constants.EMBED_COLOR,
color=EMBED_COLOR,
)
if formatted_duration and len(players[message.guild.id].queue) > 1:
e.set_footer(text=f"{formatted_duration} in total")
@@ -205,7 +205,7 @@ async def queue_or_play(message, edited=False):
await disnake_paginator.ButtonPaginator(
invalid_user_function=utils.invalid_user_handler,
color=constants.EMBED_COLOR,
color=EMBED_COLOR,
segments=list(
map(
embed,