Files
reminder-bot/src/commands/info.rs
T

46 lines
1.2 KiB
Rust
Raw Normal View History

2024-02-17 18:55:16 +00:00
use poise::{serenity_prelude::CreateEmbed, CreateReply};
2024-02-18 11:04:43 +00:00
use serde::{Deserialize, Serialize};
2024-02-17 18:55:16 +00:00
2024-02-18 11:04:43 +00:00
use crate::{
consts::THEME_COLOR,
utils::{footer, Extract, Recordable},
2024-02-18 11:04:43 +00:00
Context, Error,
};
2024-02-17 18:55:16 +00:00
2024-02-18 11:04:43 +00:00
#[derive(Serialize, Deserialize, Extract)]
pub struct Options;
impl Recordable for Options {
async fn run(self, ctx: Context<'_>) -> Result<(), Error> {
let footer = footer(ctx);
2024-02-17 18:55:16 +00:00
ctx.send(
CreateReply::default().ephemeral(true).embed(
CreateEmbed::new()
.title("Info")
.description(
"Help: `/help`
2024-02-17 18:55:16 +00:00
**Welcome to Reminder Bot!**
Developer: <@203532103185465344>
Icon: <@253202252821430272>
Find me on https://discord.jellywx.com and on https://github.com/JellyWX :)
Invite the bot: https://invite.reminder-bot.com/
Use our dashboard: https://reminder-bot.com/",
)
.footer(footer)
.color(*THEME_COLOR),
),
)
.await?;
Ok(())
}
2024-02-17 18:55:16 +00:00
}
2024-02-18 11:04:43 +00:00
/// Get information about the bot
#[poise::command(slash_command, rename = "info", identifying_name = "info")]
2024-02-18 11:04:43 +00:00
pub async fn command(ctx: Context<'_>) -> Result<(), Error> {
(Options {}).run(ctx).await
2024-02-18 11:04:43 +00:00
}