diff options
| author | Austin Hellyer <[email protected]> | 2016-11-08 15:45:51 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-08 15:45:51 -0800 |
| commit | 388eb530c5631f80c245d3d29435ec35379063b5 (patch) | |
| tree | 3e2574fea3c845b420fe2f2d06b13242e5faca96 /src/lib.rs | |
| parent | Framework: fix command arg positioning (diff) | |
| download | serenity-388eb530c5631f80c245d3d29435ec35379063b5.tar.xz serenity-388eb530c5631f80c245d3d29435ec35379063b5.zip | |
Fix README example
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -48,12 +48,16 @@ //! //! fn main() { //! // Login with a bot token from the environment -//! let mut client = Client::login_bot(&env::var("DISCORD_TOKEN").expect("token")); +//! let mut client = Client::login_bot(&env::var("DISCORD_TOKEN") +//! .expect("token")); //! client.with_framework(|f| f -//! .configure(|c| c.prefix("~")) // set the bot's prefix to '~' -//! .on("ping", |_context, message| drop(message.reply("Pong!")))); +//! .configure(|c| c.prefix("~")) // set the bot's prefix to "~" +//! .on("ping", |_context, message, _arguments| { +//! let _ = message.reply("Pong!"); +//! })); //! -//! let _ = client.start(); // start listening for events by starting a connection +//! // start listening for events by starting a connection +//! let _ = client.start(); //! } //! ``` //! |