Moved typing to proper channel

This commit is contained in:
2023-07-26 16:05:03 -04:00
parent da2dc6b3ba
commit 5bec27677e

View File

@@ -189,7 +189,6 @@ impl OAI {
pub async fn generate_response(ctx: &Context, msg: &Message, oai: &OAI, pool: &Pool<ConnectionManager<PgConnection>>) { pub async fn generate_response(ctx: &Context, msg: &Message, oai: &OAI, pool: &Pool<ConnectionManager<PgConnection>>) {
debug!("Generating response for message: {}", msg.content); debug!("Generating response for message: {}", msg.content);
let typing = msg.channel_id.start_typing(&ctx.http).unwrap();
let guild_id = msg.guild_id.unwrap(); let guild_id = msg.guild_id.unwrap();
let channel_id = msg.channel_id; let channel_id = msg.channel_id;
@@ -276,6 +275,8 @@ pub async fn generate_response(ctx: &Context, msg: &Message, oai: &OAI, pool: &P
} }
}; };
let typing = response_channel.start_typing(&ctx.http).unwrap();
// Get the OAI response and store message/response into the database // Get the OAI response and store message/response into the database
let response = match oai.get_request(request).await { let response = match oai.get_request(request).await {
Ok(r) => { Ok(r) => {