From 0025ad5ea8d412aacc3184d18063fd5ff3de0175 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 2 Dec 2023 07:00:24 -0500 Subject: feat: add per guild configuration --- src/commands/optional/teawiespam.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/commands/optional/teawiespam.rs (limited to 'src/commands/optional/teawiespam.rs') diff --git a/src/commands/optional/teawiespam.rs b/src/commands/optional/teawiespam.rs new file mode 100644 index 0000000..c1b3b29 --- /dev/null +++ b/src/commands/optional/teawiespam.rs @@ -0,0 +1,20 @@ +use crate::{Context, Settings}; + +use color_eyre::eyre::Result; +use log::*; + +/// teawie will spam you. +#[poise::command(slash_command, prefix_command)] +pub async fn teawiespam(ctx: Context<'_>) -> Result<()> { + let gid = ctx.guild_id().unwrap_or_default(); + let settings = Settings::from_redis(&ctx.data().redis, &gid).await?; + + if !settings.optional_commands_enabled { + debug!("Not running teawiespam in {gid} since it's disabled"); + return Ok(()); + } + + let wies = "<:teawiesmile:1056438046440042546>".repeat(50); + ctx.say(wies).await?; + Ok(()) +} -- cgit v1.2.3