This commit is contained in:
shibedrill 2024-04-23 16:50:19 -04:00
parent 870414ac42
commit 90b1d2a429
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,29 @@
use crate::Context;
use crate::Error;
use rand::prelude::SliceRandom;
use rand::*;
/// mrow
#[poise::command(slash_command)]
pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
let meows = [
"meow",
"mrow",
"mrrrp",
"mraaw",
"bwrrrr",
"mrrghh",
"waoaugh,,,,",
];
let response = {
let mut rng = rand::thread_rng();
match rng.gen_bool(0.1) {
true => "woof",
false => meows.choose(&mut rng).unwrap(),
}
};
ctx.say(response).await?;
info!("Executed command `meow` successfully");
Ok(())
}

View File

@ -1,2 +1,3 @@
pub mod devel;
pub mod fun;
pub mod util;

View File

@ -24,6 +24,8 @@ mod command;
use crate::command::{
// Commands for development and testing
devel::*,
// Fun!!!
fun::*,
// Useful commands for mods
util::*,
};
@ -75,13 +77,17 @@ async fn main() {
// | ADD COMMANDS HERE |
// +---------------------------------------------------------+
commands: vec![
// Util
age(),
info(),
add_channel(),
remove_channel(),
list_channels(),
// Dev
shutdown(),
restart(),
// Fun
meow(),
],
initialize_owners: true,
..Default::default()