Compare commits

..

3 Commits

Author SHA1 Message Date
8a53715149 added more whitespace
Some checks failed
build / docker (push) Has been cancelled
2026-02-25 19:37:35 -05:00
d10a9a35aa added whitespace
Some checks failed
build / docker (push) Has been cancelled
for my own sanity
2026-02-25 19:34:23 -05:00
b80948c23d cleanup matrix
Some checks failed
build / docker (push) Has been cancelled
2026-02-22 18:27:29 -05:00
3 changed files with 5 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ use serenity::model::application::{CommandOptionType, ResolvedOption, ResolvedVa
pub fn run_core(input: Option<&str>) -> String {
let mut rng = RandomGen::new();
match input {
None => rng.range_random_from_one(999).to_string(),
Some(s) => match validate::parse_str_into_num::<i32>(s.trim()) {

View File

@@ -10,18 +10,22 @@ pub fn run_core(input: Option<&str>) -> String {
let Some(input) = input else {
return junk::get_random_insult();
};
let split = match input.split('d').nth(1) {
Some(s) => s,
None => return junk::get_random_insult(),
};
let die_num = match validate::parse_str_into_num::<i32>(split.trim()) {
Some(d) => d,
None => return junk::get_random_insult(),
};
match dietype::DieType::from_sides(die_num) {
Some(_) => {}
None => return junk::get_random_insult(),
};
let mut rng = random::RandomGen::new();
rng.range_random_from_one(die_num).to_string()
}

View File

@@ -97,8 +97,6 @@ pub async fn run() {
println!("Logged in to Matrix as {username}");
// Advance past existing messages before registering handlers so the bot
// doesn't reply to messages that ever existed in a given room.
let sync_response = client
.sync_once(SyncSettings::default())
.await