Commit b27b662
feat(commands): add support for typing.Literal[...] as command choices (Pycord-Development#2782)
* fix: add support for Literal type in typing annotations for Discord choices
* Update CHANGELOG.md
* Update CHANGELOG.md
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
* Update CHANGELOG.md
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
* refactor: move condition to method
* docs: update changelog
* fix: ensure all literal values are of the same type in SlashCommand options
* Update discord/commands/core.py
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
* Update discord/commands/core.py
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
* style(pre-commit): auto fixes from pre-commit.com hooks
---------
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Co-authored-by: Paillat <jeremiecotti@ik.me>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 4392105)1 parent c706edc commit b27b662
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
782 | 802 | | |
783 | 803 | | |
784 | 804 | | |
| |||
866 | 886 | | |
867 | 887 | | |
868 | 888 | | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
869 | 892 | | |
870 | 893 | | |
871 | 894 | | |
| |||
0 commit comments