change sing, removing double line breaks; cleanup jesusmemes
This commit is contained in:
		| @@ -3,7 +3,7 @@ | ||||
|  | ||||
| import traceback | ||||
| import logging | ||||
| from typing import Optional | ||||
| from typing import Optional, Union | ||||
| from regex import Pattern | ||||
| import urllib | ||||
| import discord | ||||
| @@ -100,7 +100,7 @@ class Sing(commands.Cog): | ||||
|                     #     section = section.upper() | ||||
|                     embed: discord.Embed = discord.Embed( | ||||
|                     title=f"{search_result_song} by {search_result_artist}", | ||||
|                     description=discord.utils.escape_markdown(section.replace("\n", "\n\n")) | ||||
|                     description=discord.utils.escape_markdown(section) | ||||
|                 ) | ||||
|                     embed.add_field(name="Confidence", value=search_result_confidence, | ||||
|                                     inline=True) | ||||
| @@ -139,7 +139,7 @@ class Sing(commands.Cog): | ||||
|             for _activity in ctx.interaction.guild.get_member(member_id).activities: | ||||
|                 if _activity.type == discord.ActivityType.listening: | ||||
|                     activity = _activity | ||||
|             parsed: tuple|bool = self.utility.parse_song_input(song=None, | ||||
|             parsed: Union[tuple, bool] = self.utility.parse_song_input(song=None, | ||||
|                                                                activity=activity) | ||||
|             if not parsed: | ||||
|                 return await ctx.respond(f"Could not parse activity of {member_display}.", ephemeral=True) | ||||
| @@ -174,7 +174,7 @@ class Sing(commands.Cog): | ||||
|                     #     section = section.upper() | ||||
|                     embed: discord.Embed = discord.Embed( | ||||
|                     title=f"{search_result_song} by {search_result_artist}", | ||||
|                     description=discord.utils.escape_markdown(section.replace("\n", "\n\n")) | ||||
|                     description=discord.utils.escape_markdown(section) | ||||
|                 ) | ||||
|                     embed.add_field(name="Confidence", value=search_result_confidence, inline=True) | ||||
|                     embed.add_field(name="Time Taken", value=search_result_time_taken, inline=True) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user