Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Fix a misplaced paren#3

Open
Seniru wants to merge 4 commits intomactul:mainfrom
Seniru:main
Open

Fix a misplaced paren#3
Seniru wants to merge 4 commits intomactul:mainfrom
Seniru:main

Conversation

@Seniru
Copy link
Copy Markdown

@Seniru Seniru commented Jul 15, 2021

This is related with and closes #2

Seniru added 4 commits July 15, 2021 12:54
- Fix a misplaced bracket which caused in malfunctions
- Add an "end" method to proporly ACK a slash interaction
- Minor fixes for some event emittor stuff
Copy link
Copy Markdown
Owner

@mactul mactul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reread the discord.py code to check and you are right, the @client.event decorator allows you to call functions from the client class, it's cleaner
For the end function, returning a callback didn't exist when I wrote the library, I had a quick look and I can see what it does.
However, I don't understand in your code when the end function is called?

If not, yes, I'll add you in the credits, when I'll get the code straight ^^

@Seniru
Copy link
Copy Markdown
Author

Seniru commented Jul 23, 2021

Oh I added your module as a git submodule to my repo and it looks like some extra changes have been commited to this branch I submitted the PR ^^

And the end function was actually an extra thing I added as I get The interaction failed error otherwise. Also it's intended to be called in user's code, something like this

@client.event
async def on_interaction(*args, **kwargs):
    # ...
    await interaction.end(content = "Handled the interaciton!")

Anyways, should I just remove those extra things as this is just supposed to fix a paren or leave it as it is according to your needs

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.

Module fails to work when it receives an interaction

2 participants