summaryrefslogtreecommitdiff
path: root/src/commands/optional/teawiespam.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-02 07:00:24 -0500
committerseth <[email protected]>2023-12-15 16:41:13 -0500
commit0025ad5ea8d412aacc3184d18063fd5ff3de0175 (patch)
tree1d2b5ac5c04a092756180722358d929feeae50aa /src/commands/optional/teawiespam.rs
parentac32ec2a0ba37deb0ad82b4f2ee9c1e1b359cc88 (diff)
feat: add per guild configuration
Diffstat (limited to 'src/commands/optional/teawiespam.rs')
-rw-r--r--src/commands/optional/teawiespam.rs20
1 files changed, 20 insertions, 0 deletions
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(())
+}