diff --git a/src/commands/challenge.rs b/src/commands/challenge.rs index 8e1010b..03d0149 100644 --- a/src/commands/challenge.rs +++ b/src/commands/challenge.rs @@ -15,6 +15,7 @@ use std::path::Path; #[command( prefix_command, slash_command, + ephemeral, description_localized("en-US", "View the latest handwriting challenge info.") )] pub async fn challenge(ctx: Context<'_>) -> Result<(), Error> { @@ -187,6 +188,7 @@ pub async fn submit(ctx: PrefixContext<'_>) -> Result<(), Error> { #[command( prefix_command, slash_command, + ephemeral, description_localized("en-US", "List images in your current submission, if available.") )] pub async fn images(ctx: Context<'_>) -> Result<(), Error> { @@ -231,6 +233,7 @@ pub async fn images(ctx: Context<'_>) -> Result<(), Error> { #[command( prefix_command, slash_command, + ephemeral, description_localized( "en-US", "Delete images from your current submission using image numbers from the images command." diff --git a/src/commands/meta.rs b/src/commands/meta.rs index f0905b3..31b41ae 100644 --- a/src/commands/meta.rs +++ b/src/commands/meta.rs @@ -9,6 +9,7 @@ use std::env; #[command( prefix_command, slash_command, + ephemeral, description_localized("en-US", "Get help for the 字ちゃん Tegaki Tuesday bot") )] pub async fn help(ctx: Context<'_>) -> Result<(), Error> { diff --git a/src/commands/owner.rs b/src/commands/owner.rs index 0e4cf70..8651677 100644 --- a/src/commands/owner.rs +++ b/src/commands/owner.rs @@ -9,7 +9,7 @@ use std::env; use crate::utils::*; -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] pub async fn sleep(ctx: Context<'_>) -> Result<(), crate::Error> { ctx.say("Good night!").await?; ctx.framework() @@ -21,7 +21,7 @@ pub async fn sleep(ctx: Context<'_>) -> Result<(), crate::Error> { Ok(()) } -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] pub async fn setsubmissionchannel(ctx: Context<'_>) -> Result<(), Error> { let mut guild_data = get_guild_data(); let guild = ctx.guild_id().unwrap().as_u64().to_string(); @@ -47,7 +47,7 @@ pub async fn setsubmissionchannel(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] pub async fn setsuggestionchannel(ctx: Context<'_>) -> Result<(), Error> { let channel = ctx.channel_id().as_u64().to_string(); let message = format!("Submission channel set to <#{}>.", channel); @@ -62,7 +62,7 @@ pub async fn setsuggestionchannel(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] #[allow(non_snake_case)] pub async fn setannouncementrole( ctx: Context<'_>, @@ -86,7 +86,7 @@ pub async fn setannouncementrole( Ok(()) } -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] pub async fn announce( ctx: Context<'_>, #[description = "Announcement text"] announcement: String, @@ -94,7 +94,7 @@ pub async fn announce( send(ctx, &announcement, true, false).await } -#[command(prefix_command, hide_in_help, owners_only)] +#[command(prefix_command, slash_command, hide_in_help, ephemeral, owners_only)] pub async fn announcechallenge(ctx: Context<'_>) -> Result<(), Error> { let challenge_number = get_challenge_number(); let message = format!("Welcome to the **{n}{th}** weekly **Tegaki Tuesday** (手書きの火曜日) handwriting challenge! :pen_fountain: The prompt is available in both Japanese and English on the website at . @@ -113,10 +113,3 @@ You can make submissions in both languages, but please submit in your target lan ctx.say("Announced!").await?; Ok(()) } - -#[command(prefix_command, hide_in_help, owners_only)] -pub async fn rebuildsite(ctx: Context<'_>) -> Result<(), Error> { - rebuild_site(); - ctx.say("Started site rebuild process!").await?; - Ok(()) -} diff --git a/src/main.rs b/src/main.rs index 057bae7..2643a2a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,6 @@ async fn main() { setannouncementrole(), announce(), announcechallenge(), - rebuildsite(), // challenge challenge(), submit(),