aboutsummaryrefslogtreecommitdiffstats
path: root/cogs
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-03-18 15:30:56 +0100
committersalmonik <raisersoft@proton.me>2026-03-18 15:30:56 +0100
commite4fb5510ace76456a49db049f69283f1b9e22876 (patch)
treed331cd928a8da7c94da31f8453812f0a33da3be1 /cogs
parentvoice doesn't work due to DAVE, but we got copyparty search (diff)
parentminor fixes (diff)
downloadsenator-sperma-e4fb5510ace76456a49db049f69283f1b9e22876.tar.gz
senator-sperma-e4fb5510ace76456a49db049f69283f1b9e22876.zip
Merge branch 'main' of https://codeberg.org/salmonik/senator-sperma
Diffstat (limited to 'cogs')
-rw-r--r--cogs/jarvis.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/cogs/jarvis.py b/cogs/jarvis.py
index 5417c5e..4f34ea8 100644
--- a/cogs/jarvis.py
+++ b/cogs/jarvis.py
@@ -12,6 +12,7 @@ import logging
12import shutil 12import shutil
13from dotenv import load_dotenv 13from dotenv import load_dotenv
14import os 14import os
15from tempfile import NamedTemporaryFile
15from cogs.downloader import Downloader 16from cogs.downloader import Downloader
16 17
17logger = logging.getLogger(__name__) 18logger = logging.getLogger(__name__)
@@ -48,7 +49,7 @@ class Jarvis(commands.Cog):
48 response_message, action = Jarvis._parse_response(response_data) 49 response_message, action = Jarvis._parse_response(response_data)
49 50
50 channel = message.channel 51 channel = message.channel
51 await channel.send(response_message) 52 await message.reply(response_message)
52 53
53 if action == "download": 54 if action == "download":
54 await Jarvis._handle_download_action(message, channel) 55 await Jarvis._handle_download_action(message, channel)
@@ -60,13 +61,14 @@ class Jarvis(commands.Cog):
60 "content": "You are an alter ego of Senator Sperma Armstrong.\n" 61 "content": "You are an alter ego of Senator Sperma Armstrong.\n"
61 "your task is to tell the program what to do and how to respond after receiving a message.\n" 62 "your task is to tell the program what to do and how to respond after receiving a message.\n"
62 "message field has to be filled out in polish.\n" 63 "message field has to be filled out in polish.\n"
63 "act like jarvis, be a personal assistant to user, do not use emojis\n" 64 "act like jarvis (only behavior wise), be a personal assistant to user, do not use emojis\n"
64 "do not ask the user if they want to do an action. the user will tell you that" 65 "do not ask the user if they want to do an action. the user will tell you that."
65 }] 66 }]
66 67
67 messages.append({ 68 messages.append({
68 "role": "user", 69 "role": "user",
69 "content": f"[from {message.author.display_name}]: {message.content}" 70 "content": f"{message.author.display_name}: {message.content}"
71
70 }) 72 })
71 73
72 if Jarvis._is_reply(message): 74 if Jarvis._is_reply(message):
@@ -84,11 +86,11 @@ class Jarvis(commands.Cog):
84 return [ 86 return [
85 { 87 {
86 "role": "user", 88 "role": "user",
87 "content": f"[original message from {original_msg.author.display_name}]: {original_msg.content}" 89 "content": f"{original_msg.author.display_name}: {original_msg.content}"
88 }, 90 },
89 { 91 {
90 "role": "user", 92 "role": "user",
91 "content": f"[reply from {message.author.display_name}]: {message.content}" 93 "content": f"{message.author.display_name}: {message.content}"
92 } 94 }
93 ] 95 ]
94 96