refactor: make USER_QUEUE_MAX a constant

This commit is contained in:
2026-05-27 18:14:08 -04:00
parent a2580b211c
commit a962d42334
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import disnake
import disnake_paginator import disnake_paginator
from ... import arguments, audio, commands, utils from ... import arguments, audio, commands, utils
from ...constants import EMBED_COLOR from ...constants import EMBED_COLOR, USER_QUEUE_MAX
from ...state import client, players, trusted_users from ...state import client, players, trusted_users
from .playback import resume from .playback import resume
from .utils import command_allowed, ensure_joined, play_next from .utils import command_allowed, ensure_joined, play_next
@@ -142,13 +142,13 @@ async def queue_or_play(message, edited=False):
), ),
), ),
) )
>= 5 >= USER_QUEUE_MAX
and not len(message.guild.voice_client.channel.members) == 2 and not len(message.guild.voice_client.channel.members) == 2
and message.author.id not in trusted_users and message.author.id not in trusted_users
): ):
await utils.reply( await utils.reply(
message, message,
"you can only queue **5 items** without the manage channels permission!", f"you can only queue **{USER_QUEUE_MAX} items** without the manage channels permission!",
) )
return return
+1
View File
@@ -94,6 +94,7 @@ SPONSORBLOCK_CATEGORY_NAMES = {
"selfpromo": "self promotion", "selfpromo": "self promotion",
"sponsor": "sponsored", "sponsor": "sponsored",
} }
USER_QUEUE_MAX = 5
YTDL_OPTIONS = { YTDL_OPTIONS = {
"color": "never", "color": "never",
"default_search": "auto", "default_search": "auto",