From b3eb0c8a7375255bf388033b1d2ce508c3f53907 Mon Sep 17 00:00:00 2001 From: Vicky Date: Thu, 31 Oct 2024 11:46:14 +0100 Subject: [PATCH 1/2] added barebones doc --- src/io.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/io.rs b/src/io.rs index ac9fc8b..0282e63 100644 --- a/src/io.rs +++ b/src/io.rs @@ -1,5 +1,4 @@ //! All IO related functions, include all Discord IO functions -//! //! Features: //! All recv and send functions to discord //! Helper function for advanced checks @@ -39,7 +38,7 @@ struct VoteCreation { #[name = "Nom du jeu"] #[placeholder = "'FFXIV', 'MHW', 'D&D'..."] short_name: Option, - /// The group that shall be tagged by the bot + /// The group that will be tagged by the bot #[name = "Groupe"] #[placeholder = "groupe (sans le @)"] group: Option, @@ -62,6 +61,7 @@ struct VoteCreation { } #[poise::command(slash_command)] +/// Creates a Discord Modal for a user-friendly vote creation form pub async fn vote_modal( ctx: poise::ApplicationContext<'_, Data, GenericError>, ) -> Result<(), GenericError> { @@ -90,6 +90,7 @@ pub async fn vote_modal( #[derive(Debug, poise::ChoiceParameter)] pub enum ListOfRoles { // TODO: This needs to be a list of all guildRoles under Users (included) + /// placeholder for a role #[name = "hunters"] Hunters, } @@ -97,6 +98,7 @@ pub enum ListOfRoles { // Since this is a discord command and not a real rust command, this many arguments is "normal" #[allow(clippy::too_many_arguments)] #[poise::command(prefix_command, slash_command)] +/// Text command for extensive vote creation pub async fn vote_command( ctx: Context<'_>, #[description = "Titre"] title: String, -- 2.45.1 From 989f851eee929674b73078195e14637e65530692 Mon Sep 17 00:00:00 2001 From: Vicky Date: Thu, 31 Oct 2024 11:50:43 +0100 Subject: [PATCH 2/2] Updated readme for /vote_command --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1129ea6..b60d85b 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,4 @@ This bot also spins a web interface to allow real time monitoring of all activit ## List of commands * `/vote_modal` Pops up a modal (discord form) helping the user through creating a vote. +* `/vote_command` Comprehensive text command for creating a vote. -- 2.45.1