diff options
| author | Austin Hellyer <[email protected]> | 2016-10-23 15:25:57 -0700 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-10-23 15:25:57 -0700 |
| commit | 517076461cd772f92a20925fff0b748df363ac6b (patch) | |
| tree | 9102210e56958a1b8ff3cd7d2b7a57e0f32a9894 | |
| parent | Abstract opcodes to enums (diff) | |
| download | serenity-517076461cd772f92a20925fff0b748df363ac6b.tar.xz serenity-517076461cd772f92a20925fff0b748df363ac6b.zip | |
Fix readme example to properly use framework
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | src/lib.rs | 5 |
2 files changed, 5 insertions, 4 deletions
@@ -50,8 +50,8 @@ use serenity::Client; fn main() { // Login with a bot token from the environment let client = Client::login_bot(env::var("DISCORD_TOKEN").expect("token")); - client.with_framework(|c| c - .prefix("~") // set the bot's prefix to '~' + client.with_framework(|f| f + .configure(|c| c.prefix("~")) // set the bot's prefix to "~" .on("ping", |_context, message| drop(message.reply("Pong!")))); let _ = client.start(); // start listening for events by starting a connection @@ -48,8 +48,9 @@ //! fn main() { //! // Login with a bot token from the environment //! let client = Client::login_bot(env::var("DISCORD_TOKEN").expect("token")); -//! client.with_framework(|c| c -//! .prefix("~") // set the bot's prefix to '~' +//! client.with_framework(|f| f +//! .configure(|c| c.prefix("~")) // set the bot's prefix to "~" +//! .prefix("~") //! .on("ping", |_context, message| drop(message.reply("Pong!")))); //! //! let _ = client.start(); // start listening for events by starting a connection |