blob: 3a9a387b32c31fb49081cdf27719abf3e8b7200d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
use crate::{Context, Error};
use log::debug;
/// teawie will spam you.
#[poise::command(slash_command)]
pub async fn teawiespam(ctx: Context<'_>) -> Result<(), Error> {
if let Some(guild_id) = ctx.guild_id() {
if let Some(storage) = &ctx.data().storage {
let settings = storage.get_guild_settings(&guild_id).await?;
if !settings.optional_commands_enabled {
debug!("Not running command in {guild_id} since it's disabled");
ctx.say("I'm not allowed to do that here").await?;
return Ok(());
}
} else {
debug!("Ignoring restrictions on command; no storage backend is attached!");
}
} else {
debug!("Ignoring restrictions on command; we're not in a guild.");
}
let wies = "<:teawiesmile:1056438046440042546>".repeat(50);
ctx.say(wies).await?;
Ok(())
}
|