diff options
Diffstat (limited to 'src/commands/optional')
| -rw-r--r-- | src/commands/optional/copypasta.rs | 8 | ||||
| -rw-r--r-- | src/commands/optional/teawiespam.rs | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/commands/optional/copypasta.rs b/src/commands/optional/copypasta.rs index ea23f5f..289a936 100644 --- a/src/commands/optional/copypasta.rs +++ b/src/commands/optional/copypasta.rs @@ -1,4 +1,4 @@ -use crate::{Context, Settings}; +use crate::Context; use std::collections::HashMap; @@ -66,11 +66,13 @@ pub async fn copypasta( ctx: Context<'_>, #[description = "the copypasta you want to send"] copypasta: Copypastas, ) -> Result<()> { + debug!("Running copypasta command with copypasta {copypasta}"); + let gid = ctx.guild_id().unwrap_or_default(); - let settings = Settings::from_redis(&ctx.data().redis, &gid).await?; + let settings = ctx.data().storage.get_guild_settings(&gid).await?; if !settings.optional_commands_enabled { - debug!("Not running copypasta command in {gid} since it's disabled"); + debug!("Exited copypasta command in {gid} since it's disabled"); return Ok(()); } diff --git a/src/commands/optional/teawiespam.rs b/src/commands/optional/teawiespam.rs index c1b3b29..bb8f32d 100644 --- a/src/commands/optional/teawiespam.rs +++ b/src/commands/optional/teawiespam.rs @@ -1,4 +1,4 @@ -use crate::{Context, Settings}; +use crate::Context; use color_eyre::eyre::Result; use log::*; @@ -6,8 +6,10 @@ 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 = Settings::from_redis(&ctx.data().redis, &gid).await?; + let settings = ctx.data().storage.get_guild_settings(&gid).await?; if !settings.optional_commands_enabled { debug!("Not running teawiespam in {gid} since it's disabled"); |
