diff options
Diffstat (limited to '')
| -rw-r--r-- | src/events/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events/mod.rs b/src/events/mod.rs index 87333c8..1c8c0dc 100644 --- a/src/events/mod.rs +++ b/src/events/mod.rs | |||
| @@ -391,7 +391,7 @@ pub async fn handle_message( | |||
| 391 | // expire with "Unknown interaction". | 391 | // expire with "Unknown interaction". |
| 392 | let http = ctx.http.clone(); | 392 | let http = ctx.http.clone(); |
| 393 | let channel_id = new_message.channel_id; | 393 | let channel_id = new_message.channel_id; |
| 394 | let _reply_to_id = new_message.id; | 394 | let reply_to_id = new_message.id; |
| 395 | let bot_id = ctx.cache.current_user().id; | 395 | let bot_id = ctx.cache.current_user().id; |
| 396 | let (api_url, api_key, model) = data.config.resolve_llm(); | 396 | let (api_url, api_key, model) = data.config.resolve_llm(); |
| 397 | let assistant_prompt = lang::ASSISTANT_SYSTEM_PROMPT.to_string(); | 397 | let assistant_prompt = lang::ASSISTANT_SYSTEM_PROMPT.to_string(); |
| @@ -420,7 +420,7 @@ pub async fn handle_message( | |||
| 420 | tokio::spawn(async move { | 420 | tokio::spawn(async move { |
| 421 | let client = crate::openrouter::OpenRouterClient::new(api_url, api_key, model); | 421 | let client = crate::openrouter::OpenRouterClient::new(api_url, api_key, model); |
| 422 | if let Ok(response) = client.chat_with_history(&assistant_prompt, messages).await { | 422 | if let Ok(response) = client.chat_with_history(&assistant_prompt, messages).await { |
| 423 | let _ = channel_id.say(&http, response).await; | 423 | let _ = channel_id.send_message(&http, poise::serenity_prelude::CreateMessage::new().content(response).reference_message((channel_id, reply_to_id))).await; |
| 424 | } | 424 | } |
| 425 | }); | 425 | }); |
| 426 | } | 426 | } |
