potential fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use crate::{Context, Error};
|
use crate::{Context, Error};
|
||||||
|
use crate::commands::fun::AiChatKey;
|
||||||
use poise::serenity_prelude as serenity;
|
use poise::serenity_prelude as serenity;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serenity::prelude::TypeMapKey;
|
use serenity::prelude::TypeMapKey;
|
||||||
@@ -238,7 +239,7 @@ pub async fn summary(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let data = ctx.serenity_context().data.read().await;
|
let data = ctx.serenity_context().data.read().await;
|
||||||
let ai_chat_manager = data.get::<commands::fun::AiChatKey>().cloned().ok_or_else(|| anyhow::anyhow!("AI Chat manager not found"))?;
|
let ai_chat_manager = data.get::<AiChatKey>().cloned().ok_or_else(|| anyhow::anyhow!("AI Chat manager not found"))?;
|
||||||
let content = msg.content.trim();
|
let content = msg.content.trim();
|
||||||
|
|
||||||
if content.is_empty() {
|
if content.is_empty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user