From 6ac33142d2ef55f322d6179eff5d8914b2a13b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C4=A9nh=20Tu=E1=BA=A5n=20Ung?= <84364281+unglinh279@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:30:48 +1030 Subject: [PATCH] fix(chat): Remove @DuckBot in response (#79) --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 2b51e57..55b840b 100644 --- a/src/main.py +++ b/src/main.py @@ -195,7 +195,9 @@ async def on_message(message: Message): bot_response = await client.gemini_model.query( author_id=message.author.id, author=message.author.display_name, - message=message.clean_content.replace("d.chat", ""), + message=message.content.replace("d.chat", "") + .replace(f"<@{client.user.id}>", "") + .strip(), attachment=attachment, ) await message.reply(embeds=bot_response, mention_author=False)