diff options
| author | acdenisSK <[email protected]> | 2017-08-06 13:51:45 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-06 13:53:43 +0200 |
| commit | 9b09481216105cf75375346a6e41edd7d5869e7c (patch) | |
| tree | afb80b707a08f119ce81e21e64ba29bb0b061dc4 /examples/06_voice | |
| parent | make Travis test on OS X (#123) (diff) | |
| download | serenity-9b09481216105cf75375346a6e41edd7d5869e7c.tar.xz serenity-9b09481216105cf75375346a6e41edd7d5869e7c.zip | |
Update examples
Diffstat (limited to 'examples/06_voice')
| -rw-r--r-- | examples/06_voice/src/main.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/06_voice/src/main.rs b/examples/06_voice/src/main.rs index d1a0c11..2faa207 100644 --- a/examples/06_voice/src/main.rs +++ b/examples/06_voice/src/main.rs @@ -29,7 +29,7 @@ fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN") .expect("Expected a token in the environment"); - let mut client = Client::new(&token); + let mut client = Client::new(&token, Handler); client.with_framework(|f| f .configure(|c| c @@ -43,11 +43,7 @@ fn main() { .on("ping", ping) .on("undeafen", undeafen) .on("unmute", unmute)); - - client.on_ready(|_context, ready| { - println!("{} is connected!", ready.user.name); - }); - + let _ = client.start().map_err(|why| println!("Client ended: {:?}", why)); } |