|
|
@ -107,12 +107,21 @@ fn to_fullwidth(string: &str) -> String {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn rebuild_site() {
|
|
|
|
fn rebuild_site() {
|
|
|
|
Command::new("hugo")
|
|
|
|
Command::new("./build.sh")
|
|
|
|
.current_dir(get_hugo_path())
|
|
|
|
.current_dir(get_hugo_path())
|
|
|
|
.spawn()
|
|
|
|
.spawn()
|
|
|
|
.expect("Failed to rebuild site");
|
|
|
|
.expect("Failed to rebuild site");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[command]
|
|
|
|
|
|
|
|
#[owners_only]
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
|
|
|
|
async fn rebuildSite(ctx: &Context, msg: &Message) -> CommandResult {
|
|
|
|
|
|
|
|
rebuild_site();
|
|
|
|
|
|
|
|
msg.reply(&ctx.http, "Started site rebuild process!").await?;
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[command]
|
|
|
|
#[command]
|
|
|
|
async fn challenge(ctx: &Context, msg: &Message) -> CommandResult {
|
|
|
|
async fn challenge(ctx: &Context, msg: &Message) -> CommandResult {
|
|
|
|
msg.reply(
|
|
|
|
msg.reply(
|
|
|
|