aboutsummaryrefslogtreecommitdiff
path: root/examples/06_voice
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-06 13:51:45 +0200
committeracdenisSK <[email protected]>2017-08-06 13:53:43 +0200
commit9b09481216105cf75375346a6e41edd7d5869e7c (patch)
treeafb80b707a08f119ce81e21e64ba29bb0b061dc4 /examples/06_voice
parentmake Travis test on OS X (#123) (diff)
downloadserenity-9b09481216105cf75375346a6e41edd7d5869e7c.tar.xz
serenity-9b09481216105cf75375346a6e41edd7d5869e7c.zip
Update examples
Diffstat (limited to 'examples/06_voice')
-rw-r--r--examples/06_voice/src/main.rs8
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));
}