Skip to content

Commit 97edea0

Browse files
authored
Merge pull request #98 from LordOfPolls/master
Makes temporary_auto_convert Case Insensitive
2 parents 9045b95 + 3cb854e commit 97edea0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord_slash/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ async def on_socket_response(self, msg):
738738
# does not give option type from API.
739739
temporary_auto_convert = {}
740740
for x in selected_cmd.options:
741-
temporary_auto_convert[x["name"]] = x["type"]
741+
temporary_auto_convert[x["name"].lower()] = x["type"]
742742

743743
args = await self.process_options(ctx.guild, to_use["data"]["options"], selected_cmd.connector, temporary_auto_convert) \
744744
if "options" in to_use["data"] else {}
@@ -778,7 +778,7 @@ async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
778778
# does not give option type from API.
779779
temporary_auto_convert = {}
780780
for n in selected.options:
781-
temporary_auto_convert[n["name"]] = n["type"]
781+
temporary_auto_convert[n["name"].lower()] = n["type"]
782782

783783
args = await self.process_options(ctx.guild, x["options"], selected.connector, temporary_auto_convert) \
784784
if "options" in x else {}
@@ -791,7 +791,7 @@ async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
791791
# does not give option type from API.
792792
temporary_auto_convert = {}
793793
for n in selected.options:
794-
temporary_auto_convert[n["name"]] = n["type"]
794+
temporary_auto_convert[n["name"].lower()] = n["type"]
795795

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

0 commit comments

Comments
 (0)