clean up
This commit is contained in:
parent
9dfc3b21ff
commit
0b0779f8b7
32 changed files with 137 additions and 181 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue