This commit is contained in:
seth 2024-03-31 17:26:16 -04:00
parent 9dfc3b21ff
commit 0b0779f8b7
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
32 changed files with 137 additions and 181 deletions

View file

@ -1,6 +1,5 @@
use crate::{utils, Context};
use crate::{utils, Context, Error};
use eyre::Result;
use log::trace;
use poise::serenity_prelude::{CreateEmbed, CreateMessage};
@ -15,18 +14,12 @@ use poise::serenity_prelude::{CreateEmbed, CreateMessage};
pub async fn say(
ctx: Context<'_>,
#[description = "the message content"] content: String,
) -> Result<()> {
) -> Result<(), Error> {
let channel = ctx.channel_id();
channel.say(ctx, &content).await?;
ctx.say("I said what you said!").await?;
if let Some(channel_id) = ctx
.data()
.config
.discord_config()
.channels()
.log_channel_id()
{
if let Some(channel_id) = ctx.data().config.discord.channels.log_channel_id {
let author = utils::embed_author_from_user(ctx.author());
let embed = CreateEmbed::default()