mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[Audio] Fix for escape character prefixes (#2789)
This commit is contained in:
parent
beb16b81a9
commit
e854716236
@ -1630,7 +1630,7 @@ class Audio(commands.Cog):
|
|||||||
playlist_name_msg = await ctx.bot.wait_for(
|
playlist_name_msg = await ctx.bot.wait_for(
|
||||||
"message",
|
"message",
|
||||||
timeout=15.0,
|
timeout=15.0,
|
||||||
check=MessagePredicate.regex(fr"^(?!{ctx.prefix})", ctx),
|
check=MessagePredicate.regex(fr"^(?!{re.escape(ctx.prefix)})", ctx),
|
||||||
)
|
)
|
||||||
new_playlist_name = playlist_name_msg.content.split(" ")[0].strip('"')
|
new_playlist_name = playlist_name_msg.content.split(" ")[0].strip('"')
|
||||||
if len(new_playlist_name) > 20:
|
if len(new_playlist_name) > 20:
|
||||||
@ -1868,7 +1868,7 @@ class Audio(commands.Cog):
|
|||||||
playlist_name_msg = await ctx.bot.wait_for(
|
playlist_name_msg = await ctx.bot.wait_for(
|
||||||
"message",
|
"message",
|
||||||
timeout=15.0,
|
timeout=15.0,
|
||||||
check=MessagePredicate.regex(fr"^(?!{ctx.prefix})", ctx),
|
check=MessagePredicate.regex(fr"^(?!{re.escape(ctx.prefix)})", ctx),
|
||||||
)
|
)
|
||||||
playlist_name = playlist_name_msg.content.split(" ")[0].strip('"')
|
playlist_name = playlist_name_msg.content.split(" ")[0].strip('"')
|
||||||
if len(playlist_name) > 20:
|
if len(playlist_name) > 20:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user