style: use tabs over spaces

This commit is contained in:
seth 2024-01-08 14:56:37 -05:00
parent f2979d4cde
commit f0550dd429
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
41 changed files with 1112 additions and 1109 deletions

View file

@ -4,48 +4,48 @@ use color_eyre::eyre::{eyre, Result};
/// Say something through the bot
#[poise::command(
slash_command,
prefix_command,
ephemeral,
default_member_permissions = "MODERATE_MEMBERS",
required_permissions = "MODERATE_MEMBERS"
slash_command,
prefix_command,
ephemeral,
default_member_permissions = "MODERATE_MEMBERS",
required_permissions = "MODERATE_MEMBERS"
)]
pub async fn say(ctx: Context<'_>, #[description = "Just content?"] content: String) -> Result<()> {
let guild = ctx.guild().ok_or_else(|| eyre!("Couldn't get guild!"))?;
let channel = ctx
.guild_channel()
.await
.ok_or_else(|| eyre!("Couldn't get channel!"))?;
let guild = ctx.guild().ok_or_else(|| eyre!("Couldn't get guild!"))?;
let channel = ctx
.guild_channel()
.await
.ok_or_else(|| eyre!("Couldn't get channel!"))?;
ctx.defer_ephemeral().await?;
channel.say(ctx, &content).await?;
ctx.say("I said what you said!").await?;
ctx.defer_ephemeral().await?;
channel.say(ctx, &content).await?;
ctx.say("I said what you said!").await?;
if let Some(channel_id) = ctx.data().config.discord.channels.say_log_channel_id {
let log_channel = guild
.channels
.iter()
.find(|c| c.0 == &channel_id)
.ok_or_else(|| eyre!("Couldn't get log channel from guild!"))?;
if let Some(channel_id) = ctx.data().config.discord.channels.say_log_channel_id {
let log_channel = guild
.channels
.iter()
.find(|c| c.0 == &channel_id)
.ok_or_else(|| eyre!("Couldn't get log channel from guild!"))?;
log_channel
.1
.clone()
.guild()
.ok_or_else(|| eyre!("Couldn't cast channel we found from guild as GuildChannel?????"))?
.send_message(ctx, |m| {
m.embed(|e| {
e.title("Say command used!")
.description(content)
.author(|a| {
a.name(ctx.author().tag()).icon_url(
ctx.author().avatar_url().unwrap_or("undefined".to_string()),
)
})
})
})
.await?;
}
log_channel
.1
.clone()
.guild()
.ok_or_else(|| eyre!("Couldn't cast channel we found from guild as GuildChannel?????"))?
.send_message(ctx, |m| {
m.embed(|e| {
e.title("Say command used!")
.description(content)
.author(|a| {
a.name(ctx.author().tag()).icon_url(
ctx.author().avatar_url().unwrap_or("undefined".to_string()),
)
})
})
})
.await?;
}
Ok(())
Ok(())
}