Skip to content

Commit

Permalink
print current initialization on startup (which can be somewhat slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
timlathy committed Aug 5, 2020
1 parent f9793d3 commit 07eb7a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,15 @@ fn main() {
.map_err(|e| format!("redis: {}", e))
.unwrap();

println!("{}", "* Starting command handlers");
let message_handlers = Mutex::new(init_handlers(bot_channel_id, &redis));
let handler = Handler {
bot_user: Mutex::new(RefCell::new(None)),
bot_channel_id: ChannelId(bot_channel_id),
message_handlers,
};

println!("{}", "* Connecting to Discord");
let mut client = Client::new(&bot_token, handler).unwrap();

if let Err(e) = client.start() {
Expand Down

0 comments on commit 07eb7a1

Please sign in to comment.