minor_doc #3
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue