aboutsummaryrefslogtreecommitdiff
path: root/src/framework/configuration.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-06-06 11:25:28 -0700
committerZeyla Hellyer <[email protected]>2017-06-06 11:25:28 -0700
commit799038187d903a75d60f0c98d013ae87fb665d02 (patch)
treeb0d8ccff9a6e1fc4360a6eebfe5be2335d9936d4 /src/framework/configuration.rs
parentAdd User::direct_message example (diff)
downloadserenity-799038187d903a75d60f0c98d013ae87fb665d02.tar.xz
serenity-799038187d903a75d60f0c98d013ae87fb665d02.zip
Deprecate Client::login, add Client::new
Diffstat (limited to 'src/framework/configuration.rs')
-rw-r--r--src/framework/configuration.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/framework/configuration.rs b/src/framework/configuration.rs
index 1b8df30..0a1c351 100644
--- a/src/framework/configuration.rs
+++ b/src/framework/configuration.rs
@@ -19,7 +19,7 @@ use ::model::{GuildId, UserId};
/// use serenity::Client;
/// use std::env;
///
-/// let mut client = Client::login(&env::var("DISCORD_BOT_TOKEN").unwrap());
+/// let mut client = Client::new(&env::var("DISCORD_BOT_TOKEN").unwrap());
///
/// client.with_framework(|f| f
/// .configure(|c| c.on_mention(true).prefix("~")));
@@ -100,7 +100,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// use serenity::model::GuildId;
///
/// client.with_framework(|f| f.configure(|c| c
@@ -121,7 +121,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// use serenity::model::UserId;
///
/// client.with_framework(|f| f.configure(|c| c
@@ -155,7 +155,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
///
/// let disabled = vec!["ping"].into_iter().map(|x| x.to_owned()).collect();
///
@@ -182,7 +182,7 @@ impl Configuration {
/// ```rust,no_run
/// # use serenity::Client;
/// #
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// client.with_framework(|f| f
/// .command("ping", |c| c.exec_str("Pong!"))
/// .configure(|c| c.dynamic_prefix(|ctx| {
@@ -261,7 +261,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// use serenity::model::UserId;
///
/// client.with_framework(|f| f.configure(|c| c
@@ -272,7 +272,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// use serenity::model::UserId;
/// use std::collections::HashSet;
///
@@ -288,7 +288,7 @@ impl Configuration {
self
}
- /// Sets the prefix to respond to. A prefix can be a string slice of any
+ /// Sets the prefix to respond to. A prefix can be a string slice of any
/// non-zero length.
///
/// # Examples
@@ -297,7 +297,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// #
/// client.with_framework(|f| f.configure(|c| c
/// .prefix("!")));
@@ -317,7 +317,7 @@ impl Configuration {
///
/// ```rust
/// # use serenity::Client;
- /// # let mut client = Client::login("token");
+ /// # let mut client = Client::new("token");
/// #
/// client.with_framework(|f| f.configure(|c| c
/// .prefixes(vec!["!", ">", "+"])));