From 2063a123156849b5f9f8e8686644a7255cc59cb6 Mon Sep 17 00:00:00 2001 From: xy Date: Sat, 24 Aug 2024 03:05:58 +0900 Subject: [PATCH] Update gateway to accept message from channel --- src/bin/bootstrap.rs | 5 +++-- src/discord/mod.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/bootstrap.rs b/src/bin/bootstrap.rs index 1a46101..a480101 100644 --- a/src/bin/bootstrap.rs +++ b/src/bin/bootstrap.rs @@ -14,8 +14,9 @@ async fn main() { load_environment_variables(); // Set the intents for the bot - let intents = GatewayIntents::GUILD_MESSAGES | GatewayIntents::DIRECT_MESSAGES; - + let intents = GatewayIntents::GUILD_MESSAGES + | GatewayIntents::MESSAGE_CONTENT + | GatewayIntents::DIRECT_MESSAGES; let handler_result = Handler::new(&get_env( "OPENAI_API_KEY", "Expected a OPEN AI key in the environment", diff --git a/src/discord/mod.rs b/src/discord/mod.rs index 0d7eac1..f351690 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -130,7 +130,7 @@ async fn update_message_interval( .edit_message( &http, processing_message.id, - EditMessage::new().content(&content), + EditMessage::new().content(content), ) .await {