Commit 4392105
feat(commands): add support for typing.Literal[...] as command choices (#2782)
* fix: add support for Literal type in typing annotations for Discord choices
* Update CHANGELOG.md
* Update CHANGELOG.md
Signed-off-by: Lumouille <[email protected]>
* Update CHANGELOG.md
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: Lumouille <[email protected]>
* 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 <[email protected]>
Signed-off-by: Lumouille <[email protected]>
* Update discord/commands/core.py
Co-authored-by: Paillat <[email protected]>
Signed-off-by: Lumouille <[email protected]>
* style(pre-commit): auto fixes from pre-commit.com hooks
---------
Signed-off-by: Lumouille <[email protected]>
Co-authored-by: JustaSqu1d <[email protected]>
Co-authored-by: Dorukyum <[email protected]>
Co-authored-by: Paillat <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent dd7d5a6 commit 4392105
2 files changed
+27
-2
lines changed| 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 | | |
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
809 | 829 | | |
810 | 830 | | |
811 | 831 | | |
| |||
908 | 928 | | |
909 | 929 | | |
910 | 930 | | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
911 | 934 | | |
912 | 935 | | |
913 | 936 | | |
| |||
0 commit comments