PyDrocsid / cogs

The official cog library used by PyDrocsid bots
GNU General Public License v3.0
13 stars 5 forks source link

Feature/poll rewrite #211

Open inf-inity opened 2 years ago

inf-inity commented 2 years ago

Description rewrote polls

Issue Closes #140 #162

Akzeptanzkriterien

Grundsätzliches

Parameter der Polls

--deadline DEADLINE, -D DEADLINE           |time in hours| 0 for server default
--anonymous {True,False}, -A {True,False}  |public who voted| True or False
--choices CHOICES, -C CHOICES              |amount of choices per user| 0 for multiple choice
--roles ROLES, -R ROLES                    |which roles can participate| ("role1, role2, role3, ...") "0" for all
--weights WEIGHTS, -W WEIGHTS              |role weights| ("role1: weight, role2: weight, ...") "0" for server default / "1" for fair

Poll mit Default-Settings erstellen:

.poll quick <TITEL> \n
<EMOJI> <OPTION> \n
<EMOJI> <OPTION> \n

Poll mit zwei Optionen, anonym, 3 Tage Dauer, 2 Stimmen und ein Gewicht von "2" für Teammitglieder und Ruby:

.poll new <TITEL> \n
<EMOJI> <OPTION> \n
<EMOJI> <OPTION> \n

Der Bot bietet Parameter an und lauscht für zwei Minuten auf die nächste Nachricht:

-A true -D 3 -C 2 -W "team_role:2,ruby:2"

Standardpolls

cloudflare-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: beedaa0
Status: ✅  Deploy successful!
Preview URL: https://ce0e54e6.pydrocsid-cogs.pages.dev
Branch Preview URL: https://feature-poll-rewrite.pydrocsid-cogs.pages.dev

View logs

Tristan-H11 commented 2 years ago

@4norak Die Akzeptanzkriterien sind in einer sehr abgespeckten Version hochgeladen, falls du raufschauen magst. Es ist eine txt wegen des Linters.

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit beedaa04 and detected 0 issues on this pull request.

View more on Code Climate.