This commit is contained in:
codey 2025-03-24 15:14:38 -04:00
parent e9d0065876
commit 6018de870d
2 changed files with 6 additions and 6 deletions

View File

@ -275,13 +275,15 @@ class Misc(commands.Cog):
@bridge.bridge_command()
async def compliment(self, ctx, *,
recipient: Optional[str] = None) -> None:
recipient: Optional[str] = None,
language: Optional[str] = 'en') -> None:
"""
Compliment someone (or yourself)
Args:
ctx (Any)
recipient (Optional[str])
language (Optional[str]) (default: 'en')
Returns:
None
"""
@ -305,7 +307,7 @@ class Misc(commands.Cog):
else:
recipient = discord.utils.escape_mentions(recipient.strip())
with ctx.channel.typing():
compliment: str = await self.util.get_compliment(recipient)
compliment: str = await self.util.get_compliment(recipient, language)
if compliment:
return await ctx.respond(compliment)
return await ctx.respond("Compliment failed :(")

View File

@ -207,19 +207,17 @@ class Util:
async def get_compliment(self, subject: str,
language: Optional[str] = None) -> str:
language: Optional[str] = 'en') -> str:
"""
Get Compliment
Args:
subject (str)
language (Optional[str])
language (Optional[str]) (default: 'en')
Returns:
str
"""
if not language:
return self.COMPLIMENT_GENERATOR.compliment(subject)
return self.COMPLIMENT_GENERATOR.compliment_in_language(subject, language)
async def get_whisky(self) -> Optional[tuple]: