bugfix: sing
This commit is contained in:
parent
b2f216a575
commit
07f36c08bb
@ -818,7 +818,7 @@ class Misc(commands.Cog):
|
|||||||
recipient_normal = recipient
|
recipient_normal = recipient
|
||||||
if discord.utils.raw_mentions(recipient):
|
if discord.utils.raw_mentions(recipient):
|
||||||
# There are mentions
|
# There are mentions
|
||||||
recipient_id: int = discord.utils.raw_mentions(recipient)[0] # First mention
|
recipient_id = discord.utils.raw_mentions(recipient)[0] # First mention
|
||||||
guild: Optional[discord.Guild] = self.bot.get_guild(ctx.guild.id)
|
guild: Optional[discord.Guild] = self.bot.get_guild(ctx.guild.id)
|
||||||
if not guild:
|
if not guild:
|
||||||
return
|
return
|
||||||
|
@ -65,6 +65,7 @@ class Sing(commands.Cog):
|
|||||||
await ctx.respond("*Searching...*", ephemeral=True) # Must respond to interactions within 3 seconds, per Discord
|
await ctx.respond("*Searching...*", ephemeral=True) # Must respond to interactions within 3 seconds, per Discord
|
||||||
|
|
||||||
parsed = self.utility.parse_song_input(song, activity)
|
parsed = self.utility.parse_song_input(song, activity)
|
||||||
|
|
||||||
if isinstance(parsed, tuple):
|
if isinstance(parsed, tuple):
|
||||||
(search_artist, search_song, search_subsearch) = parsed
|
(search_artist, search_song, search_subsearch) = parsed
|
||||||
|
|
||||||
|
@ -24,13 +24,10 @@ class Utility:
|
|||||||
Returns:
|
Returns:
|
||||||
Union[bool, tuple]
|
Union[bool, tuple]
|
||||||
"""
|
"""
|
||||||
logging.debug("Activity? %s", activity)
|
|
||||||
try:
|
try:
|
||||||
if (not song or len(song) < 2) and not activity:
|
if (not song or len(song) < 2) and not activity:
|
||||||
# pylint: disable=superfluous-parens
|
|
||||||
return False
|
return False
|
||||||
# pylint: enable=superfluous-parens
|
if not song and activity:
|
||||||
if not song and isinstance(activity, Activity):
|
|
||||||
if not activity.name:
|
if not activity.name:
|
||||||
return False # No valid activity found
|
return False # No valid activity found
|
||||||
match activity.name.lower():
|
match activity.name.lower():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user