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 devel;
|
||||||
|
pub mod fun;
|
||||||
pub mod util;
|
pub mod util;
|
||||||
|
@ -24,6 +24,8 @@ mod command;
|
|||||||
use crate::command::{
|
use crate::command::{
|
||||||
// Commands for development and testing
|
// Commands for development and testing
|
||||||
devel::*,
|
devel::*,
|
||||||
|
// Fun!!!
|
||||||
|
fun::*,
|
||||||
// Useful commands for mods
|
// Useful commands for mods
|
||||||
util::*,
|
util::*,
|
||||||
};
|
};
|
||||||
@ -75,13 +77,17 @@ async fn main() {
|
|||||||
// | ADD COMMANDS HERE |
|
// | ADD COMMANDS HERE |
|
||||||
// +---------------------------------------------------------+
|
// +---------------------------------------------------------+
|
||||||
commands: vec![
|
commands: vec![
|
||||||
|
// Util
|
||||||
age(),
|
age(),
|
||||||
info(),
|
info(),
|
||||||
add_channel(),
|
add_channel(),
|
||||||
remove_channel(),
|
remove_channel(),
|
||||||
list_channels(),
|
list_channels(),
|
||||||
|
// Dev
|
||||||
shutdown(),
|
shutdown(),
|
||||||
restart(),
|
restart(),
|
||||||
|
// Fun
|
||||||
|
meow(),
|
||||||
],
|
],
|
||||||
initialize_owners: true,
|
initialize_owners: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
Loading…
Reference in New Issue
Block a user