Fix Client doc example

This commit is contained in:
Victor Mignot 2022-10-17 13:59:08 -04:00
parent bd87344834
commit 4e38843b3f
No known key found for this signature in database
GPG key ID: FFE4EF056FB5E0D0

View file

@ -5,17 +5,20 @@ use serenity::{prelude::GatewayIntents, Client as DiscordClient};
/// ///
/// # Example /// # Example
/// ```rust,no_run /// ```rust,no_run
/// # async fn run() {
/// use yorokobot::client::{Client, ClientCredentials}; /// use yorokobot::client::{Client, ClientCredentials};
/// ///
/// let discord_token = "Your discord token"; /// let token = String::from("Your discord token");
/// ///
/// let credentials = ClientCredentials { /// let credentials = ClientCredentials {
/// discord_token, /// discord_token: &token,
/// }; /// };
/// ///
/// let client = Client::new(credentials); /// let mut client = Client::new(credentials).await;
/// ///
/// client.connect().await /// client.connect().await;
///
/// # }
/// ``` /// ```
/// ///
pub struct Client { pub struct Client {