feat(commands/utils): adding the database field to the SlashCommand trait

This commit is contained in:
Raphael 2026-02-12 23:16:40 +01:00
parent bdaf252df5
commit 122f273246
No known key found for this signature in database

View file

@ -1,4 +1,5 @@
use serenity::all::{CommandInteraction, Context, CreateCommand}; use serenity::all::{CommandInteraction, Context, CreateCommand};
use sqlx::PgPool;
include!("./mod_gen.rs"); include!("./mod_gen.rs");
@ -9,7 +10,7 @@ pub trait SlashCommand: Send + Sync {
fn register(&self) -> CreateCommand; 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>; -> Result<(), serenity::Error>;
} }