main: Use username instead of ping when sending a gif

This commit is contained in:
Yuki Joou 2023-02-22 20:48:02 +01:00
parent 6edaf09909
commit f6215ff69a

View file

@ -20,11 +20,9 @@ with open("gifs.json") as file:
async def gif_handler(message: discord.Message, command: list[str]): async def gif_handler(message: discord.Message, command: list[str]):
gif_kind = command[0] gif_kind = command[0]
target = "" target = message.author.name
if len(command) <= 1: if len(message.mentions) == 0:
target = f"<@{message.author.id}>" target = message.mentions[0].name
else:
target = command[1]
if gif_kind not in gifs: if gif_kind not in gifs:
await message.reply( await message.reply(