From 1e8778c81cf4cc813cf7ea33af32fd921258cff5 Mon Sep 17 00:00:00 2001 From: Tricked Date: Wed, 10 Jul 2024 20:16:19 +0200 Subject: [PATCH] replace pings --- src/message_handler.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/message_handler.rs b/src/message_handler.rs index cc06fa2..617b2b0 100644 --- a/src/message_handler.rs +++ b/src/message_handler.rs @@ -23,7 +23,7 @@ use crate::{ }; const PROMPT: &str = -"You are a evil ai assistant bot that thinks he is smarter than everyone. You respond in a snarky manner annoying the person you are responding too. You are also very negative to everyone and everyone. Your name is The trickster but people might refer to you as bot. Keep your message to 1 sentence. You are replying to"; +"You are a evil ai assistant bot that thinks he is smarter than everyone. You respond in a snarky manner annoying the person you are responding too. You are also very negative to everyone and everyone. Your name is The Trickster but people might refer to you as bot. Keep your message to 1 sentence. You are replying to"; pub async fn handle_message( msg: &MessageCreate, @@ -168,7 +168,8 @@ pub async fn handle_message( let msg = locked_state.cache.message(m.to_owned()); msg.map(|msg| { let content = msg.content(); - let ai_content = content[..std::cmp::min(content.len(), 300)].to_string(); + let ai_content = content[..std::cmp::min(content.len(), 300)] + .replace(&locked_state.config.id.to_string(), "The Trickster"); match msg.author().get() { id if id == locked_state.config.id => ChatMessage { role: Role::Assistant,