Merge pull request 'Add command for link to documentation' (#38) from #37_add-documentation-command into main
Reviewed-on: #38
This commit is contained in:
commit
d27befdac6
2 changed files with 18 additions and 0 deletions
|
@ -279,6 +279,22 @@ pub mod link {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod link_docs {
|
||||||
|
use super::*;
|
||||||
|
pub mod users {
|
||||||
|
use super::*;
|
||||||
|
use serenity::all::CommandInteraction;
|
||||||
|
|
||||||
|
pub async fn run(_command: &CommandInteraction, _ctx: &Context) -> String {
|
||||||
|
"https://forgejo.skynet.ie/Skynet/discord-bot/src/branch/main/doc/User.md".to_string()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// pub mod committee {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
pub mod verify {
|
pub mod verify {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::commands::wolves::link::{db_pending_clear_expired, get_server_member_discord, get_verify_from_db};
|
use crate::commands::wolves::link::{db_pending_clear_expired, get_server_member_discord, get_verify_from_db};
|
||||||
|
@ -522,4 +538,5 @@ pub fn register() -> CreateCommand {
|
||||||
.add_sub_option(CreateCommandOption::new(CommandOptionType::String, "minecraft_username", "Your Minecraft username").required(true))
|
.add_sub_option(CreateCommandOption::new(CommandOptionType::String, "minecraft_username", "Your Minecraft username").required(true))
|
||||||
.add_sub_option(CreateCommandOption::new(CommandOptionType::Boolean, "bedrock_account", "Is this a Bedrock account?").required(false)),
|
.add_sub_option(CreateCommandOption::new(CommandOptionType::Boolean, "bedrock_account", "Is this a Bedrock account?").required(false)),
|
||||||
)
|
)
|
||||||
|
.add_option(CreateCommandOption::new(CommandOptionType::SubCommand, "docs", "Link to where the documentation can be found."))
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ Sign up on [UL Wolves]({}) and go to https://discord.com/channels/{}/{} and use
|
||||||
"verify" => commands::wolves::verify::run(&command, &ctx).await,
|
"verify" => commands::wolves::verify::run(&command, &ctx).await,
|
||||||
"unlink" => commands::wolves::unlink::run(&command, &ctx).await,
|
"unlink" => commands::wolves::unlink::run(&command, &ctx).await,
|
||||||
"link_minecraft" => commands::minecraft::user::add::run(&command, &ctx).await,
|
"link_minecraft" => commands::minecraft::user::add::run(&command, &ctx).await,
|
||||||
|
"docs" => commands::wolves::link_docs::users::run(&command, &ctx).await,
|
||||||
// "link" => commands::count::servers::run(&command, &ctx).await,
|
// "link" => commands::count::servers::run(&command, &ctx).await,
|
||||||
&_ => format!("not implemented :( wolves {}", x.name.as_str()),
|
&_ => format!("not implemented :( wolves {}", x.name.as_str()),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue