pub struct DiscordWebhook { /* private fields */ }Implementations§
Source§impl DiscordWebhook
impl DiscordWebhook
pub fn new(url: impl Into<String>) -> Result<Self, DiscordWebhookError>
pub fn from_url(url: Url) -> Self
Sourcepub async fn send(
&self,
message: &Message,
) -> Result<DiscordID, DiscordWebhookError>
pub async fn send( &self, message: &Message, ) -> Result<DiscordID, DiscordWebhookError>
Send the given Message object. Returns the ID of the sent message as a result
Sourcepub async fn send_with_files(
&self,
message: &Message,
files_entries: BTreeMap<String, Vec<u8>>,
) -> Result<DiscordID, DiscordWebhookError>
pub async fn send_with_files( &self, message: &Message, files_entries: BTreeMap<String, Vec<u8>>, ) -> Result<DiscordID, DiscordWebhookError>
Sends the given Message object. Returns the ID of the sent message as a result
Sourcepub async fn get(
&self,
message_id: &DiscordID,
) -> Result<Message, DiscordWebhookError>
pub async fn get( &self, message_id: &DiscordID, ) -> Result<Message, DiscordWebhookError>
Returns a previously sent webhook message from the same token.
Auto Trait Implementations§
impl Freeze for DiscordWebhook
impl !RefUnwindSafe for DiscordWebhook
impl Send for DiscordWebhook
impl Sync for DiscordWebhook
impl Unpin for DiscordWebhook
impl !UnwindSafe for DiscordWebhook
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