Compare commits
2 Commits
55f8f29a31
...
6018de870d
Author | SHA1 | Date | |
---|---|---|---|
6018de870d | |||
e9d0065876 |
@ -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 :(")
|
||||
|
@ -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]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user