Update meme.py with .lick meme command (#53)

* Update meme.py with .lick meme command

Never done this before.

* Update meme.py with lick meme v2

I used a web-based version of Black to fix the parsing error but couldn't get it to register the commands while indented?

* Add black formatting

* Apply suggestions from code review

Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>

---------

Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
This commit is contained in:
Aceofgods 2023-06-21 03:09:42 -04:00 committed by GitHub
parent 50c8b11f26
commit ed26c0f552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,19 @@ class Meme(Cog):
f"({fahrenheit}°F, {kelvin}K)." f"({fahrenheit}°F, {kelvin}K)."
) )
@commands.check(check_if_staff_or_ot)
@commands.command(hidden=True)
async def lick(self, ctx, user: Optional[discord.Member]):
"""licks a user :?"""
if user is None and ctx.message.reference is None:
await ctx.send(f"{ctx.author.mention} licks their lips! 👅")
else:
if user is None:
user = (
await ctx.channel.fetch_message(ctx.message.reference.message_id)
).author
await ctx.send(f"{user.mention} has been licked! 👅")
@commands.check(check_if_staff_or_ot) @commands.check(check_if_staff_or_ot)
@commands.command(hidden=True, name="chill", aliases=["cold"]) @commands.command(hidden=True, name="chill", aliases=["cold"])
async def chill_member(self, ctx, user: Optional[discord.Member]): async def chill_member(self, ctx, user: Optional[discord.Member]):