Skip to content

Commit

Permalink
Insert the shard manager in example 7
Browse files Browse the repository at this point in the history
The `quit` requires the manager in the data map to work.
  • Loading branch information
arqunis committed Sep 5, 2020
1 parent b137f51 commit 7c2d4f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/e07_sample_bot_structure/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ async fn main() {
.await
.expect("Err creating client");

{
let mut data = client.data.write().await;
data.insert::<ShardManagerContainer>(client.shard_manager.clone());
}

if let Err(why) = client.start().await {
error!("Client error: {:?}", why);
}
Expand Down

0 comments on commit 7c2d4f7

Please sign in to comment.