From 80cb6a625c784e46f43135f3716b1e1b43cd05b7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 17 Mar 2026 17:16:37 +0100 Subject: minor fixes --- cogs/jarvis.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'cogs/jarvis.py') diff --git a/cogs/jarvis.py b/cogs/jarvis.py index b199c8a..bdb34f1 100644 --- a/cogs/jarvis.py +++ b/cogs/jarvis.py @@ -12,6 +12,7 @@ import logging import shutil from dotenv import load_dotenv import os +from tempfile import NamedTemporaryFile from cogs.downloader import Downloader logger = logging.getLogger(__name__) @@ -48,7 +49,7 @@ class Jarvis(commands.Cog): response_message, action = Jarvis._parse_response(response_data) channel = message.channel - await channel.send(response_message) + await message.reply(response_message) if action == "download": await Jarvis._handle_download_action(message, channel) @@ -57,15 +58,17 @@ class Jarvis(commands.Cog): def _build_messages(message): messages = [{ "role": "system", - "content": "your task is to tell the program what to do and how to respond after receiving a message.\n" + "content": "your name is Senator Sperma.\n" + "your task is to tell the program what to do and how to respond after receiving a message.\n" "message field has to be filled out in polish.\n" - "act like jarvis, be a personal assistant to user, do not use emojis\n" - "do not ask the user if they want to do an action. the user will tell you that" + "act like jarvis (only behavior wise), be a personal assistant to user, do not use emojis\n" + "do not ask the user if they want to do an action. the user will tell you that." }] messages.append({ "role": "user", - "content": f"[from {message.author.display_name}]: {message.content}" + "content": f"{message.author.display_name}: {message.content}" + }) if Jarvis._is_reply(message): @@ -83,11 +86,11 @@ class Jarvis(commands.Cog): return [ { "role": "user", - "content": f"[original message from {original_msg.author.display_name}]: {original_msg.content}" + "content": f"{original_msg.author.display_name}: {original_msg.content}" }, { - "role": "user", - "content": f"[reply from {message.author.display_name}]: {message.content}" + "role": "user", + "content": f"{message.author.display_name}: {message.content}" } ] -- cgit v1.2.3