diff options
| author | Zeyla Hellyer <[email protected]> | 2017-06-06 11:25:28 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-06 11:25:28 -0700 |
| commit | 799038187d903a75d60f0c98d013ae87fb665d02 (patch) | |
| tree | b0d8ccff9a6e1fc4360a6eebfe5be2335d9936d4 /src/lib.rs | |
| parent | Add User::direct_message example (diff) | |
| download | serenity-799038187d903a75d60f0c98d013ae87fb665d02.tar.xz serenity-799038187d903a75d60f0c98d013ae87fb665d02.zip | |
Deprecate Client::login, add Client::new
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2,7 +2,7 @@ //! //! View the [examples] on how to make and structure a bot. //! -//! Serenity supports bot user authentication via the use of [`Client::login`]. +//! Serenity supports bot user authentication via the use of [`Client::new`]. //! //! Once logged in, you may add handlers to your client to dispatch [`Event`]s, //! such as [`Client::on_message`]. This will cause your handler to be called @@ -37,7 +37,7 @@ //! //! fn main() { //! // Login with a bot token from the environment -//! let mut client = Client::login(&env::var("DISCORD_TOKEN").expect("token")); +//! let mut client = Client::new(&env::var("DISCORD_TOKEN").expect("token")); //! client.with_framework(|f| f //! .configure(|c| c.prefix("~")) // set the bot's prefix to "~" //! .on("ping", ping)); @@ -72,7 +72,7 @@ //! ``` //! //! [`Cache`]: cache/struct.Cache.html -//! [`Client::login`]: client/struct.Client.html#method.login +//! [`Client::new`]: client/struct.Client.html#method.new //! [`Client::on_message`]: client/struct.Client.html#method.on_message //! [`Context`]: client/struct.Context.html //! [`Event`]: model/event/enum.Event.html |