aboutsummaryrefslogtreecommitdiff
path: root/examples/03_struct_utilities/src
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-24 08:55:49 -0800
committerAustin Hellyer <[email protected]>2017-01-24 08:55:49 -0800
commit47510594e5c939406ebccec8af7e3107a338c7bc (patch)
tree8def4138c4d6d33ae40e290c51a39c131ae2850d /examples/03_struct_utilities/src
parentCode style (diff)
downloadserenity-47510594e5c939406ebccec8af7e3107a338c7bc.tar.xz
serenity-47510594e5c939406ebccec8af7e3107a338c7bc.zip
Update examples for OOP style update
Diffstat (limited to 'examples/03_struct_utilities/src')
-rw-r--r--examples/03_struct_utilities/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/03_struct_utilities/src/main.rs b/examples/03_struct_utilities/src/main.rs
index 942d918..d31b840 100644
--- a/examples/03_struct_utilities/src/main.rs
+++ b/examples/03_struct_utilities/src/main.rs
@@ -5,7 +5,6 @@
//! ```toml
//! [dependencies.serenity]
//! git = "https://github.com/zeyla/serenity.git"
-//! features = ["methods"]
//! ```
extern crate serenity;
@@ -19,7 +18,7 @@ fn main() {
.expect("Expected a token in the environment");
let mut client = Client::login_bot(&token);
- client.on_message(|_context, message| {
+ client.on_message(|_ctx, message| {
if message.content == "!messageme" {
// If the `methods` feature is enabled, then model structs will
// have a lot of useful methods implemented, to avoid using an
@@ -35,7 +34,7 @@ fn main() {
}
});
- client.on_ready(|_context, ready| {
+ client.on_ready(|_ctx, ready| {
println!("{} is connected!", ready.user.name);
});