idlefox/FEATURES.md

51 lines
1.8 KiB
Markdown

# List of commands and their inner workings
## `/vote_modal`
*Creates a new discord modal to walk the user through the creation of a new vote*
### Input
* title (String): The title for the futur event;
* short_name (Option<String>): Optional short name for the event;
* group (Option<String>): If specified, **must** be among the existing guildRoles in order for the bot to tag said guildRole;
* description (String): Description for the event;
* hours(Option<String>): Time window for the event.
### Output
> ## {title}
> @{group} {description}
> **{short_name} ; **{hours}**
Should the optional fields be left out, it could look like this:
> ## {title}
> {description}
> **21h - 23h**
## `/vote_command`
*More comprehensive, only-textual, version of vote_modal to create a new vote*
### Input
* title (String): The title for the futur event;
* short_name (Option<String>): Optional short name for the event;
* group (Option<String>): If specified, **must** be among the existing guildRoles in order for the bot to tag said guildRole;
* description (String): Description for the event;
* hours(Option<String>): Time window for the event;
* start_date(Option<String>): Date after which the bot will publish the vote in the first open-voting window (if it exists);
* non_days(Option<String>): Days for which the bot should replace the reaction from a number to a neutral emoji.
### Parsing logic
30/10/2024
> lun mar mer jeu ven sam dim
> le prochain jour qui correspond (a ce jour)
> ex: lun -> lun 4 nov
> 10, 21, 2
> le prochain jour qui correspond (a cette date)
> ex: 10 -> dim 10 nov
> 30 nov, 1 jan, 10 aou
> cette date exacte
> ex: 30 nov -> sam 30 nov
### Long votes
> Nouvel event!
> Description
> id: xxx
[Voter mes dispos] -> t'ouvre un modal
-> /dispo id: xxx date: 10 jan - 20 jan, 23 jan, 25 jan, 1 fev - 30 fev omit: 15 fev
-> /dispo id: xxx omit: 30 fev