Skip to content

Commit

Permalink
#864: Fix parsing in command_cog
Browse files Browse the repository at this point in the history
  • Loading branch information
butteredwaffles committed Nov 13, 2023
1 parent 715322b commit d1394c0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions ClemBot.Bot/bot/utils/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ async def convert(self, ctx: Context[BotT], argument: str) -> ext.ClemBotCommand
except (AttributeError, KeyError):
raise ConversionError()

for i, name in enumerate(self.accu[1:]):
# Check if the newly parsed command is a group which means we need to check the next
# value to see if it's a valid sub-command

if not isinstance(command, ext.ClemBotGroup):
raise ConversionError()

try:
command = command.all_commands[name]
except (AttributeError, KeyError):
raise ConversionError()

# All Clembot commands should be ClemBotCommands by default so this should never fail
return t.cast(ext.ClemBotCommand, command)

Expand Down

0 comments on commit d1394c0

Please sign in to comment.