Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nové funkcionality, novější věci! #30

Merged
merged 42 commits into from
Sep 3, 2023
Merged

Nové funkcionality, novější věci! #30

merged 42 commits into from
Sep 3, 2023

Conversation

TheXer
Copy link
Owner

@TheXer TheXer commented Aug 25, 2023

Hlavní pull-request na to, aby se nakonec všechny věci zrecenzovaly a byly na jednom místě, než tyto věci dáme na produkci.

Co je nového?

Co dál dělat?

  • Počkat, až bude PR Úpravy anket #24 hotový, teprve pak můžeme kód otestovat a mergnout ho.

Kdo si zaslouží dík?

TheXer and others added 30 commits June 1, 2023 23:41
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Added Black formatter
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
…efore commiting to main

Signed-off-by: robertsokola <robertsokola2@gmail.com>
## Popis:
Spravení error handlingu z 
```py
if error_handling(answers):
            return await message.edit(embed=PollEmbedBase(error_handling(answers)))
```
na 
```py
if len(answer) > Poll.MAX_OPTIONS:
        raise TooManyOptionsError(f"Zadal jsi příliš mnoho odpovědí, můžeš maximálně {Poll.MAX_OPTIONS}!")
```        

## Proč?
Zvýšení čtitelnosti, jednodušší práce s error handlingem a přehlednost.

## Co dodělat?

- [x] #16
- New emoji class, inherited from Enum this time
- Corrected embeds and errors for using the new emoji style
- main.py has debug logger now
- Now you can add new options using new button

known bugs:
- Raising errors in buttons/modals doesn't work properly due to a bug in attributes. Maybe raise an issue on discord.py pages

Signed-off-by: robertsokola <robertsokola2@gmail.com>
TheXer and others added 9 commits July 4, 2023 16:22
Try to make a embed that displays whether a user added a new option

Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
…t commit should aim for tasks.loop and database overlay fixes.

Signed-off-by: robertsokola <robertsokola2@gmail.com>
oprava pomoci black
- fixed bug with databases where two people clicking at the same time could break entire bot
- added new functionality with looping, where the bot can check if the embed is due date
- added new transformer for transferring dates, it's a little more dumbproof than previous versions
- added new error handling... more beautiful!

Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Pull request míří na úpravu anket podle issues. Zejména se jedná o tyto
věci:

- Přidání možnosti po vytvoření ankety
- Anketa, když jí vyprší čas, by se měla automaticky smazat a odeslat
prázdný embed s pouze hlasy.
- Malé grafické úpravy

Tyto změny by měly obecně prospět anketám a byly by mnohem přehlednější.

Související issues: 

- [x] #29 
- [x] #22 
- [x] #21 

TODO: 

- [x] Code cleanup
- [x] Přidat type hinting
- [ ] Ozkoušet a otestovat kód
- [x] Přidat error handling
- [x] Vyřešit bug, že `raise` keyword automaticky nepošle error. 

#30 bude místo, kde se bude hromadně testovat každá funkcionalita Jáchyma. Pro teď merguji.
@TheXer TheXer marked this pull request as ready for review September 3, 2023 19:18
@TheXer
Copy link
Owner Author

TheXer commented Sep 3, 2023

Kód otestovanej, všechno se zdá být OK, v databázi na produkci je všechno připravený na tuto verzi.

Hurá!

@TheXer TheXer merged commit 05f95a0 into master Sep 3, 2023
1 check passed
@TheXer TheXer deleted the jachym_2.0 branch September 3, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants