diff --git a/cogs/poll_command.py b/cogs/poll_command.py index 341a119..718a062 100644 --- a/cogs/poll_command.py +++ b/cogs/poll_command.py @@ -43,7 +43,7 @@ async def transform( msg = f"Zadal jsi příliš mnoho odpovědí, můžeš maximálně {Poll.MAX_OPTIONS}!" raise TooManyOptionsError(msg, interaction) if len(answers) < Poll.MIN_OPTIONS: - msg = f"Zadal jsi příliš málo odpovědí, můžeš alespoň {Poll.MIN_OPTIONS}!" + msg = f"Zadal jsi příliš málo odpovědí, zadej alespoň {Poll.MIN_OPTIONS}!" raise TooFewOptionsError(msg, interaction) return answers @@ -64,12 +64,24 @@ async def transform(self, interaction: discord.Interaction, date_time: str) -> d class PollCreate(commands.Cog): + POLL_PARAMETERS = { + "name": "anketa", + "description": "Anketa pro hlasování. Jsou vidět všichni, kteří se zapojili.", + "question": "Otázka, na kterou potřebuješ znát odpověď", + "answers": f'Odpovědi, odpovědi rozděluj uvozovkami ("), maximálně až {Poll.MAX_OPTIONS} možností', + "date_time": "Datum, kdy anketa skončí", + "help": + f""" + Jednoduchá anketa, která obsahuje otázku a odpovědi. Povoleno je až {Poll.MAX_OPTIONS} možností. + """ + } + def __init__(self, bot: Jachym): self.bot = bot @app_commands.command( - name="anketa", - description="Anketa pro hlasování. Jsou vidět všichni hlasovatelé.", + name=POLL_PARAMETERS["name"], + description=POLL_PARAMETERS["description"], ) @app_commands.rename( question="otázka", @@ -77,9 +89,9 @@ def __init__(self, bot: Jachym): date_time="datum", ) @app_commands.describe( - question="Otázka, kterou chceš položit.", - answer='Odpovědi, rozděluješ odpovědi uvozovkou ("), maximálně pouze 10 možností', - date_time="Den, na který anketa skončí.", + question=POLL_PARAMETERS["question"], + answer=POLL_PARAMETERS["answers"], + date_time=POLL_PARAMETERS["date_time"], ) async def pool( self, diff --git a/src/UNKNOWN.egg-info/PKG-INFO b/src/UNKNOWN.egg-info/PKG-INFO new file mode 100644 index 0000000..527a06f --- /dev/null +++ b/src/UNKNOWN.egg-info/PKG-INFO @@ -0,0 +1,4 @@ +Metadata-Version: 2.1 +Name: UNKNOWN +Version: 0.0.0 +License-File: LICENSE diff --git a/src/UNKNOWN.egg-info/SOURCES.txt b/src/UNKNOWN.egg-info/SOURCES.txt new file mode 100644 index 0000000..b92166a --- /dev/null +++ b/src/UNKNOWN.egg-info/SOURCES.txt @@ -0,0 +1,19 @@ +LICENSE +pyproject.toml +src/__init__.py +src/helpers.py +src/jachym.py +src/UNKNOWN.egg-info/PKG-INFO +src/UNKNOWN.egg-info/SOURCES.txt +src/UNKNOWN.egg-info/dependency_links.txt +src/UNKNOWN.egg-info/top_level.txt +src/db_folder/databases.py +src/ui/__init__.py +src/ui/button.py +src/ui/embeds.py +src/ui/emojis.py +src/ui/error_view.py +src/ui/modals.py +src/ui/poll.py +src/ui/poll_view.py +tests/test_pool.py \ No newline at end of file diff --git a/src/UNKNOWN.egg-info/dependency_links.txt b/src/UNKNOWN.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/UNKNOWN.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/UNKNOWN.egg-info/top_level.txt b/src/UNKNOWN.egg-info/top_level.txt new file mode 100644 index 0000000..8e47b64 --- /dev/null +++ b/src/UNKNOWN.egg-info/top_level.txt @@ -0,0 +1,6 @@ +__init__ +db_folder +helpers +jachym +text_json +ui