Skip to content

Commit 00e563c

Browse files
authored
Merge pull request #170 from hpenney2/master
utils.manage_commands: Allow int values for create_choice
2 parents 8172477 + 4c2c852 commit 00e563c

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, SlashCommandPermissionType
77
from collections.abc import Callable
8+
from typing import Union
89

910

1011
async def add_slash_command(bot_id,
@@ -301,7 +302,7 @@ def generate_options(function: Callable, description: str = "No description.", c
301302
return options
302303

303304

304-
def create_choice(value: str, name: str):
305+
def create_choice(value: Union[str, int], name: str):
305306
"""
306307
Creates choices used for creating command option.
307308

0 commit comments

Comments
 (0)