Skip to content

Commit 4c2c852

Browse files
committed
utils.manage_commands: Allow int values for create_choice
1 parent d5cba04 commit 4c2c852

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

discord_slash/utils/manage_commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from ..error import RequestFailure, IncorrectType
66
from ..model import SlashCommandOptionType
77
from collections.abc import Callable
8+
from typing import Union
89

910

1011
async def add_slash_command(bot_id,
@@ -223,7 +224,7 @@ def generate_options(function: Callable, description: str = "No description.", c
223224
return options
224225

225226

226-
def create_choice(value: str, name: str):
227+
def create_choice(value: Union[str, int], name: str):
227228
"""
228229
Creates choices used for creating command option.
229230

0 commit comments

Comments
 (0)