Compare commits

..

2 Commits

Author SHA1 Message Date
6018de870d minor 2025-03-24 15:14:38 -04:00
e9d0065876 fix casing 2025-03-24 09:08:29 -04:00
2 changed files with 7 additions and 7 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

@ -62,7 +62,7 @@ class Util:
'a chocolate frappuccino', 'a butter pecan coffee', 'a maple pecan latte',
'a sea salt caramel mocha', 'a nitro cold brew', 'a pumpkin cold brew',
'a honey almond flat white', 'a sweet cream cold brew', 'a matcha latte',
'a golden latte', 'a turmeric latte', 'a beetroot latte', 'a Kopi luwak']
'a golden latte', 'a turmeric latte', 'a beetroot latte', 'a kopi luwak']
self.LAST_5_COFFEES: list = []
@ -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]: