Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: Account for function definition of command groups #664

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

zevaryx
Copy link
Contributor

@zevaryx zevaryx commented Oct 14, 2022

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

An oversight in Client.interaction_tree and Extension.interaction_tree led to errors during extension registration.

Example of breakage:

@slash_command(name="base", description="I break you")
async def base(self, ctx: InteractionContext):
    ...

@base.slash_command(sub_cmd_name="sub", description="I was broken")
async def sub(self, ctx: InteractionContext):
    await ctx.send("I will never even load, let alone run")

Changes

  • Account for function definition of command groups to avoid errors

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@LordOfPolls LordOfPolls merged commit 3fa4b29 into 2.x Oct 14, 2022
@LordOfPolls LordOfPolls deleted the interaction_tree branch October 14, 2022 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants