From 122f273246ff5a2de67e8b9c6e8f12d3ea83baa1 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 12 Feb 2026 23:16:40 +0100 Subject: [PATCH] feat(commands/utils): adding the database field to the SlashCommand trait --- src/commands/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 1caa328..0cb6500 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,4 +1,5 @@ use serenity::all::{CommandInteraction, Context, CreateCommand}; +use sqlx::PgPool; include!("./mod_gen.rs"); @@ -9,7 +10,7 @@ pub trait SlashCommand: Send + Sync { fn register(&self) -> CreateCommand; - async fn run(&self, ctx: &Context, command: &CommandInteraction) + async fn run(&self, ctx: &Context, command: &CommandInteraction, database: &PgPool) -> Result<(), serenity::Error>; }