diff --git a/src/commands/meta.rs b/src/commands/meta.rs new file mode 100644 index 0000000..adaab3a --- /dev/null +++ b/src/commands/meta.rs @@ -0,0 +1,32 @@ +use serenity::framework::standard::{macros::command, CommandResult}; +use serenity::model::prelude::*; +use serenity::prelude::*; + +use std::env; + +#[command] +async fn help(ctx: &Context, msg: &Message) -> CommandResult { + let prefix = env::var("PREFIX").unwrap(); + let message = format!( +"<:jichan:943336845637480478> Hello! I'm 字【じ】ちゃん (Ji-chan), the Tegaki Tuesday bot (and mascot!). +For more information about the challenge, check out the website at + +__**Tegaki Tuesday 手書きの火曜日**__ +:ballot_box: `{p}submit` Submit to the latest handwriting challenge. +:pencil: `{p}challenge` View the latest handwriting challenge info. +:trophy: `{p}leaderboard` ~~View the community leaderboard and challenge stats!~~ **(Coming back soon)** +:frame_photo: `{p}images` List images in your current submission, if available. +:wastebasket: `{p}imageDelete ` Delete images from your current submission using image numbers from -h images. + +__**Kanji 漢字**__ +:paintbrush: `{p}so ` Get stroke order diagrams for character(s), maximum 4 +:game_die: `{p}jinmeiyo` Random Jinmeiyō kanji +:game_die: `{p}joyo` Random Jōyō kanji +:game_die: `{p}kyoiku ` Random Kyōiku kanji +:game_die: `{p}jlpt ` Random JLPT kanji +:game_die: `{p}hyogai ` Random Hyōgai kanji", + p = prefix + ); + msg.reply(&ctx.http, message).await?; + Ok(()) +} diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 5268518..6bde374 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,3 +1,4 @@ pub mod challenge; pub mod kanji; +pub mod meta; pub mod owner; diff --git a/src/main.rs b/src/main.rs index 3e4d07f..6c20bfa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ mod commands; use std::{collections::HashSet, env, sync::Arc}; -use commands::{challenge::*, kanji::*, owner::*}; +use commands::{challenge::*, kanji::*, meta::*, owner::*}; use serenity::{ async_trait, client::bridge::gateway::ShardManager, @@ -54,6 +54,7 @@ impl EventHandler for Handler { submit, images, imageDelete, + help, sleep )] struct General;