parco-discord 0.1.0

Parco Discord
Documentation
use crate::message::MessageBuilder;

/// A reusable client for interacting with the Discord API.
///
/// Created via the [`DiscordClient::new`] Method
#[derive(Clone, Debug)]
pub struct DiscordClient {
    client: reqwest::Client,
}

impl DiscordClient {
    /// Construct a new [`DiscordClient`]
    pub fn new(client: reqwest::Client) -> Self {
        Self { client }
    }

    /// Construct a message builder
    pub fn message(&self) -> MessageBuilder {
        MessageBuilder {
            client: self.client.clone(),
        }
    }
}