From 0a6a42159d033fa5d34a1189a49d12c79ea49e36 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 12 Feb 2026 19:51:25 +0100 Subject: [PATCH] style(commands): changing all_commands to import --- src/commands/mod.rs | 2 +- src/main.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index a41641e..1caa328 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -19,7 +19,7 @@ pub struct CommandEntry { inventory::collect!(CommandEntry); -pub fn all_commands() -> Vec> { +pub fn import() -> Vec> { inventory::iter:: .into_iter() .map(|entry| (entry.create)()) diff --git a/src/main.rs b/src/main.rs index ce04c6f..0a56c8d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,6 @@ mod commands; mod events; -use commands::all_commands; use events::Bot; use serenity::all::*; use std::env; @@ -16,7 +15,7 @@ async fn main() { let intents: GatewayIntents = GatewayIntents::empty(); let bot: Bot = Bot { - commands: all_commands(), + commands: commands::import(), }; let mut client: Client = Client::builder(&token, intents)