refactor(events/bot): fixing issues on print id on the start

This commit is contained in:
Raphael 2026-02-13 20:34:52 +01:00
parent 474af44a12
commit 672056a8a3
No known key found for this signature in database

View file

@ -59,9 +59,6 @@ async fn bot_activity(ctx: &Context, db: &PgPool) {
}; };
ctx.set_presence(Some(activity), presence); ctx.set_presence(Some(activity), presence);
println!("🎮 Status: \"{}\" | {:?} | {:?}", config.status, config.activity_type, config.presence);
} else {
println!("⚠️ Aucune config bot en DB — table `bots` vide ?");
} }
} }
@ -70,8 +67,9 @@ impl BotEvent for ReadyHandler {
fn event_type(&self) -> &'static str { "ready" } fn event_type(&self) -> &'static str { "ready" }
async fn on_ready(&self, ctx: &Context, ready: &Ready, commands: &[Box<dyn SlashCommand>], db: &PgPool) { async fn on_ready(&self, ctx: &Context, ready: &Ready, commands: &[Box<dyn SlashCommand>], db: &PgPool) {
println!("TTY is now running as: '{}'", ready.user.name); println!("TTY is now running as: '{}'\n", ready.user.name);
println!("Starting commands registration:");
let cmds: Vec<CreateCommand> = commands.iter().map(|c| c.register()).collect(); let cmds: Vec<CreateCommand> = commands.iter().map(|c| c.register()).collect();
Command::set_global_commands(&ctx.http, cmds) Command::set_global_commands(&ctx.http, cmds)
.await .await
@ -102,7 +100,6 @@ impl BotEvent for ReadyHandler {
} }
}; };
println!("\t✅ | Guild {}", guild_id); println!("\t✅ | Guild {}", guild_id);
for member in &members { for member in &members {
if member.user.bot { if member.user.bot {
@ -117,7 +114,7 @@ impl BotEvent for ReadyHandler {
eprintln!("\t\t❌ | GuildUser {}/{}{}", guild_id, member_id, e); eprintln!("\t\t❌ | GuildUser {}/{}{}", guild_id, member_id, e);
continue; continue;
} }
println!("\t\t✅ | Member {}", guild_id); println!("\t\t✅ | Member {}", member_id);
count += 1; count += 1;
} }
} }