forked from kemonomimi/nyabot
main: Use username instead of ping when sending a gif
This commit is contained in:
parent
6edaf09909
commit
f6215ff69a
1 changed files with 3 additions and 5 deletions
8
main.py
8
main.py
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue