24 lines
615 B
Rust
24 lines
615 B
Rust
use crate::{util::debug_say, DbConnPool};
|
|
use serenity::framework::standard::{macros::command, CommandResult};
|
|
use serenity::model::channel::Message;
|
|
use serenity::prelude::Context;
|
|
|
|
#[command]
|
|
async fn heck(ctx: &Context, msg: &Message) -> CommandResult {
|
|
let db_pool = ctx.data.clone();
|
|
let db_pool = db_pool.read().await;
|
|
let db_pool = db_pool
|
|
.get::<DbConnPool>()
|
|
.expect("No db pool in context?!");
|
|
let value = db_pool.get_heck().await;
|
|
|
|
debug_say(
|
|
msg,
|
|
ctx,
|
|
format!("This command has been hecked {} times", value?),
|
|
)
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|