mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
chore (#3348)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
parent
a105217e83
commit
d6936c87f3
1
changelog.d/audio/3345.enhance.1.rst
Normal file
1
changelog.d/audio/3345.enhance.1.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix an issues with the formatting of non existing local tracks.
|
||||||
@ -213,7 +213,7 @@ async def clear_react(bot: Red, message: discord.Message, emoji: MutableMapping
|
|||||||
def get_track_description(track) -> Optional[str]:
|
def get_track_description(track) -> Optional[str]:
|
||||||
if track and getattr(track, "uri", None):
|
if track and getattr(track, "uri", None):
|
||||||
query = Query.process_input(track.uri)
|
query = Query.process_input(track.uri)
|
||||||
if query.is_local:
|
if query.is_local or "localtracks/" in track.uri:
|
||||||
if track.title != "Unknown title":
|
if track.title != "Unknown title":
|
||||||
return f'**{escape(f"{track.author} - {track.title}")}**' + escape(
|
return f'**{escape(f"{track.author} - {track.title}")}**' + escape(
|
||||||
f"\n{query.to_string_user()} "
|
f"\n{query.to_string_user()} "
|
||||||
@ -229,7 +229,7 @@ def get_track_description(track) -> Optional[str]:
|
|||||||
def get_track_description_unformatted(track) -> Optional[str]:
|
def get_track_description_unformatted(track) -> Optional[str]:
|
||||||
if track and hasattr(track, "uri"):
|
if track and hasattr(track, "uri"):
|
||||||
query = Query.process_input(track.uri)
|
query = Query.process_input(track.uri)
|
||||||
if query.is_local:
|
if query.is_local or "localtracks/" in track.uri:
|
||||||
if track.title != "Unknown title":
|
if track.title != "Unknown title":
|
||||||
return escape(f"{track.author} - {track.title}")
|
return escape(f"{track.author} - {track.title}")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user