Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.7 KiB

use crate::Context;
2 years ago
use crate::Error;
use poise::command;
3 years ago
use std::env;
// TODO: Implement proper help text for command-specific help,
// see https://github.com/kangalioo/poise/blob/90ac24a8ef621ec6dc3fc452762dc9cfa144f693/examples/framework_usage/main.rs#L18-L38
2 years ago
#[command(
prefix_command,
slash_command,
ephemeral,
2 years ago
description_localized("en-US", "Get help for the 字ちゃん Tegaki Tuesday bot")
)]
pub async fn help(ctx: Context<'_>) -> Result<(), Error> {
let p = env::var("PREFIX").unwrap();
3 years ago
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 <https://tegakituesday.com>
__**Tegaki Tuesday **__
:ballot_box: `{p}submit` Submit to the latest handwriting challenge.
:pencil: `{p}challenge` View the latest handwriting challenge info.
:frame_photo: `{p}images` List images in your current submission, if available.
:wastebasket: `{p}imageDelete <image number>` Delete images from your current submission using image numbers from -h images.
:bulb: `{p}suggest <suggestion>` Make a suggestion for future challenge prompts!
3 years ago
__**Kanji **__
:information_source: `{p}i <text>` Get category information and links to Jisho for character(s), along with with stroke a order diagram for single characters.
3 years ago
:paintbrush: `{p}so <text>` 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 <grade|all>` Random Kyōiku kanji
:game_die: `{p}jlpt <level|all>` Random JLPT kanji
:game_die: `{p}hyogai <group|all>` Random Hyōgai kanji"
3 years ago
);
ctx.say(message).await?;
3 years ago
Ok(())
}