Trying to catch why my bot is getting disconnected after a few hours
This commit is contained in:
parent
cb378dd042
commit
e1c2710a3b
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue