Borrow context here
This commit is contained in:
parent
b1d0927ff0
commit
6729695714
|
|
@ -21,7 +21,7 @@ impl Handler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn standard_startup(ctx: Context, data_about_bot: Ready) {
|
pub async fn standard_startup(ctx: &Context, data_about_bot: Ready) {
|
||||||
let data = ctx.data.read().await;
|
let data = ctx.data.read().await;
|
||||||
let config = match data.get::<ManifoldConfig>() {
|
let config = match data.get::<ManifoldConfig>() {
|
||||||
Some(c) => c.lock().await,
|
Some(c) => c.lock().await,
|
||||||
|
|
@ -56,6 +56,6 @@ impl Handler {
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl EventHandler for Handler {
|
impl EventHandler for Handler {
|
||||||
async fn ready(&self, ctx: Context, data_about_bot: Ready) {
|
async fn ready(&self, ctx: Context, data_about_bot: Ready) {
|
||||||
Handler::standard_startup(ctx, data_about_bot).await;
|
Handler::standard_startup(&ctx, data_about_bot).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue