more fun
This commit is contained in:
parent
870414ac42
commit
90b1d2a429
@ -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(())
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
pub mod devel;
|
||||
pub mod fun;
|
||||
pub mod util;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user