From 904259063831738d357a8092bee7c0e30988b0f6 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 6 Dec 2023 03:57:33 -0500 Subject: refactor: use reactboard-v2 yay! we don't need to fetch every single reaction from every guild whenever a new one is triggered --- src/commands/optional/copypasta.rs | 8 ++++---- src/commands/optional/teawiespam.rs | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/commands/optional') diff --git a/src/commands/optional/copypasta.rs b/src/commands/optional/copypasta.rs index 289a936..54b6194 100644 --- a/src/commands/optional/copypasta.rs +++ b/src/commands/optional/copypasta.rs @@ -41,13 +41,13 @@ fn get_copypasta(name: Copypastas) -> Result { let name = file .path() .file_stem() - .ok_or_else(|| eyre!("couldn't get file stem from {file:#?}"))? + .ok_or_else(|| eyre!("Couldn't get file stem from {file:#?}"))? .to_str() - .ok_or_else(|| eyre!("couldn't convert file stem to str!"))?; + .ok_or_else(|| eyre!("Couldn't convert file stem to str!"))?; let contents = file .contents_utf8() - .ok_or_else(|| eyre!("couldnt get contents from copypasta!"))?; + .ok_or_else(|| eyre!("Couldnt get contents from copypasta!"))?; // refer to files by their name w/o extension files.insert(name, contents); @@ -56,7 +56,7 @@ fn get_copypasta(name: Copypastas) -> Result { if files.contains_key(name.as_str()) { Ok(files[name.as_str()].to_string()) } else { - Err(eyre!("couldnt find copypasta {name}!")) + Err(eyre!("Couldnt find copypasta {name}!")) } } diff --git a/src/commands/optional/teawiespam.rs b/src/commands/optional/teawiespam.rs index bb8f32d..a876d09 100644 --- a/src/commands/optional/teawiespam.rs +++ b/src/commands/optional/teawiespam.rs @@ -6,8 +6,6 @@ use log::*; /// teawie will spam you. #[poise::command(slash_command, prefix_command)] pub async fn teawiespam(ctx: Context<'_>) -> Result<()> { - debug!("Running teawiespam command"); - let gid = ctx.guild_id().unwrap_or_default(); let settings = ctx.data().storage.get_guild_settings(&gid).await?; -- cgit v1.2.3