mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 14:15:51 +00:00
Add info message
This commit is contained in:
parent
2f7ddf660f
commit
ff654533e7
|
@ -180,6 +180,7 @@ async fn event_handler(
|
|||
match m.data.custom_id.as_str() {
|
||||
"register.global" | "unregister.global" | "register.guild" | "unregister.guild" => {
|
||||
}
|
||||
"info" => verify::info(ctx, m).await?,
|
||||
"start" => verify::start(ctx, m, data, true).await?,
|
||||
"restart" => verify::start(ctx, m, data, false).await?,
|
||||
"login_1" => verify::login_1(ctx, m).await?,
|
||||
|
|
|
@ -10,6 +10,26 @@ pub(crate) use membership::*;
|
|||
pub(crate) mod manual;
|
||||
pub(crate) use manual::*;
|
||||
|
||||
const INFO_MSG: &str = indoc::indoc! {"
|
||||
Nano is a Discord bot written with serenity-rs/poise and tokio-rs/axum.
|
||||
|
||||
It allows members and Imperial students to automatically verify themselves and gain access to the ICAS Discord server.
|
||||
|
||||
If you have any questions, feel free to ping or message <@99217900254035968>
|
||||
"};
|
||||
|
||||
pub(crate) async fn info(
|
||||
ctx: &serenity::Context,
|
||||
m: &serenity::MessageComponentInteraction,
|
||||
) -> Result<(), Error> {
|
||||
m.create_interaction_response(&ctx.http, |i| {
|
||||
i.kind(serenity::InteractionResponseType::ChannelMessageWithSource)
|
||||
.interaction_response_data(|d| d.content(INFO_MSG).ephemeral(true))
|
||||
})
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn unknown(
|
||||
ctx: &serenity::Context,
|
||||
m: &serenity::MessageComponentInteraction,
|
||||
|
|
Loading…
Reference in a new issue