minor_doc #3

Merged
vky merged 2 commits from minor_doc into dev 2024-10-31 11:56:19 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -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<String>,
/// 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<String>,
@ -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,