pub struct HttpClient { /* private fields */ }
Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new(token: String) -> Self
pub async fn get_current_user(&self) -> Result<User>
pub async fn get_channel(&self, channel_id: Snowflake) -> Result<Channel>
pub async fn send_message( &self, channel_id: Snowflake, payload: Value, ) -> Result<Message>
pub async fn edit_message( &self, channel_id: Snowflake, message_id: Snowflake, payload: Value, ) -> Result<Message>
pub async fn delete_message( &self, channel_id: Snowflake, message_id: Snowflake, ) -> Result<()>
pub async fn get_message( &self, channel_id: Snowflake, message_id: Snowflake, ) -> Result<Message>
pub async fn add_reaction( &self, channel_id: Snowflake, message_id: Snowflake, emoji: &str, ) -> Result<()>
pub async fn remove_reaction( &self, channel_id: Snowflake, message_id: Snowflake, emoji: &str, ) -> Result<()>
pub async fn vote_poll( &self, channel_id: Snowflake, message_id: Snowflake, answer_id: u32, ) -> Result<()>
pub async fn typing(&self, channel_id: Snowflake) -> Result<()>
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more