From f6215ff69a3b0f13d525d4a014f4aeff9242879f Mon Sep 17 00:00:00 2001 From: Yuki Joou Date: Wed, 22 Feb 2023 20:48:02 +0100 Subject: [PATCH] main: Use username instead of ping when sending a gif --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index a7aa257..daabe76 100755 --- a/main.py +++ b/main.py @@ -20,11 +20,9 @@ with open("gifs.json") as file: async def gif_handler(message: discord.Message, command: list[str]): gif_kind = command[0] - target = "" - if len(command) <= 1: - target = f"<@{message.author.id}>" - else: - target = command[1] + target = message.author.name + if len(message.mentions) == 0: + target = message.mentions[0].name if gif_kind not in gifs: await message.reply(