Add comments
This commit is contained in:
parent
90b1d2a429
commit
7e3e940393
@ -20,6 +20,8 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
|
|||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
match rng.gen_bool(0.1) {
|
match rng.gen_bool(0.1) {
|
||||||
true => "woof",
|
true => "woof",
|
||||||
|
// Will never return None. The source is staticaly defined.
|
||||||
|
// We know it will always have items in it.
|
||||||
false => meows.choose(&mut rng).unwrap(),
|
false => meows.choose(&mut rng).unwrap(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -27,3 +29,4 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> {
|
|||||||
info!("Executed command `meow` successfully");
|
info!("Executed command `meow` successfully");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user