From 4fa4907c3da23249ddec2bcb50e48f708152059e Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sat, 5 Oct 2024 13:11:46 -0600 Subject: Rudimentary message parsing and upgraded time dep for 1.80.0 --- src/system/bot/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/system/bot/mod.rs') diff --git a/src/system/bot/mod.rs b/src/system/bot/mod.rs index 6bf8d78..3c4585f 100644 --- a/src/system/bot/mod.rs +++ b/src/system/bot/mod.rs @@ -5,6 +5,7 @@ use std::sync::Arc; use tokio::sync::mpsc::Sender; use tokio::sync::RwLock; use twilight_http::error::Error as TwiError; +use twilight_http::request::channel::reaction::RequestReactionType; pub use super::types::*; pub use client::MessageDuplicateError; @@ -73,6 +74,10 @@ impl Bot { self.client.delete_message(channel_id, message_id).await } + pub async fn react_message(&self, channel_id: ChannelId, message_id: MessageId, react: &'_ RequestReactionType<'_>) -> Result<(), TwiError> { + self.client.react_message(channel_id, message_id, react).await + } + pub async fn duplicate_message(&self, message_id: &TwiMessage, content: &str) -> Result { self.client.duplicate_message(message_id, content).await } -- cgit 1.4.1