Skip to content

Commit 2e8cbaa

Browse files
authored
Make temporary_auto_convert case insensitive
1 parent 9045b95 commit 2e8cbaa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

discord_slash/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ async def process_options(self, guild: discord.Guild, options: list, connector:
649649

650650
# This is to temporarily fix Issue #97, that on Android device
651651
# does not give option type from API.
652+
print(temporary_auto_convert)
652653
if "type" not in x:
653654
x["type"] = temporary_auto_convert[x["name"]]
654655

@@ -778,7 +779,7 @@ async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
778779
# does not give option type from API.
779780
temporary_auto_convert = {}
780781
for n in selected.options:
781-
temporary_auto_convert[n["name"]] = n["type"]
782+
temporary_auto_convert[n["name"].lower()] = n["type"]
782783

783784
args = await self.process_options(ctx.guild, x["options"], selected.connector, temporary_auto_convert) \
784785
if "options" in x else {}
@@ -791,7 +792,7 @@ async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
791792
# does not give option type from API.
792793
temporary_auto_convert = {}
793794
for n in selected.options:
794-
temporary_auto_convert[n["name"]] = n["type"]
795+
temporary_auto_convert[n["name"].lower()] = n["type"]
795796

796797
args = await self.process_options(ctx.guild, sub_opts, selected.connector, temporary_auto_convert) \
797798
if "options" in sub else {}

0 commit comments

Comments
 (0)