diff options
Diffstat (limited to 'examples/01_basic_ping_bot')
| -rw-r--r-- | examples/01_basic_ping_bot/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/01_basic_ping_bot/src/main.rs | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/examples/01_basic_ping_bot/Cargo.toml b/examples/01_basic_ping_bot/Cargo.toml index deded6f..760ce2c 100644 --- a/examples/01_basic_ping_bot/Cargo.toml +++ b/examples/01_basic_ping_bot/Cargo.toml @@ -4,4 +4,6 @@ version = "0.1.0" authors = ["my name <[email protected]>"] [dependencies] -serenity = { path = "../../" } +serenity = { path = "../../", default-features = true } +env_logger = "*" +log= "*" diff --git a/examples/01_basic_ping_bot/src/main.rs b/examples/01_basic_ping_bot/src/main.rs index 477aea1..06f66fe 100644 --- a/examples/01_basic_ping_bot/src/main.rs +++ b/examples/01_basic_ping_bot/src/main.rs @@ -1,9 +1,13 @@ extern crate serenity; +#[macro_use] extern crate log; +extern crate env_logger; use serenity::Client; use std::env; fn main() { + env_logger::init().unwrap(); + // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN") .expect("Expected a token in the environment"); @@ -27,6 +31,8 @@ fn main() { if let Err(why) = msg.channel_id.say("Pong!") { println!("Error sending message: {:?}", why); } + + println!("{:?}", serenity::client::CACHE.read().unwrap().get_guild_channel(244567637332328450)); } }); |