From 7403f531eb38a8c1ff0621d0c7f2fb30ecc919fd Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Tue, 24 Jun 2025 00:00:56 +0100 Subject: [PATCH] feat: the backend is pretty simple, just pull the rep link from teh config_toml and add on the path to the docs. Then its just linking it all up. Closes #37 --- src/commands/wolves.rs | 17 +++++++++++++++++ src/main.rs | 1 + 2 files changed, 18 insertions(+) diff --git a/src/commands/wolves.rs b/src/commands/wolves.rs index d790f9f..d78454b 100644 --- a/src/commands/wolves.rs +++ b/src/commands/wolves.rs @@ -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 { use super::*; 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::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.")) } diff --git a/src/main.rs b/src/main.rs index 9de027e..238777d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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, "unlink" => commands::wolves::unlink::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, &_ => format!("not implemented :( wolves {}", x.name.as_str()), },