Fix doc example

This commit is contained in:
Victor Mignot 2022-11-19 21:47:40 -05:00
parent cf7a65674b
commit e12c3bfc3e
No known key found for this signature in database
GPG key ID: FFE4EF056FB5E0D0

View file

@ -10,14 +10,15 @@ use serenity::{prelude::GatewayIntents, Client as DiscordClient};
/// # Example
/// ```rust,no_run
/// # async fn run() {
/// use yorokobot::client::{Client, ClientCredentials};
/// use yorokobot::{Client, ClientCredentials, DatabaseCredentials};
///
/// let discord_token = String::from("Your discord token");
/// let mongo_uri = String::from("Your Mongo URI");
///
/// let credentials = ClientCredentials {
/// discord_token: &discord_token,
/// mongo_uri: &mongo_uri,
/// db_credentials: DatabaseCredentials::parse(mongo_uri).await.expect("Failed parsing
/// credentials"),
/// };
///
/// let mut client = Client::new(credentials).await.expect("Error creating client");