diff --git a/src/main.rs b/src/main.rs index 6e073b9..fee62b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use crate::commands::{ use async_trait::async_trait; use serde_json::Value; use serenity::{ - client::bridge::gateway::ShardManager, + client::bridge::gateway::{event::ShardStageUpdateEvent, ShardManager}, framework::standard::{ help_commands, macros::{help, hook}, @@ -155,7 +155,7 @@ async fn main() -> IoResult<()> { }) } - client.start().await.unwrap(); + client.start_autosharded().await.unwrap(); Ok(()) } @@ -200,6 +200,7 @@ impl Messages { }*/ } + #[async_trait] impl EventHandler for Messages { async fn reaction_add(&self, _ctx: Context, reaction: Reaction) { @@ -210,6 +211,10 @@ impl EventHandler for Messages { }*/ } + async fn shard_stage_update(&self, _ctx: Context, s: ShardStageUpdateEvent) { + println!("Shard stage update : {:?}",s ); + } + async fn ready(&self, ctx: Context, ready: Ready) { println!("{} connected to discord", ready.user.name);