Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev] Client:createInteractionResponse requires payload.data. Should be optional #301

Open
GitSparTV opened this issue Jul 13, 2021 · 1 comment

Comments

@GitSparTV
Copy link

https://github.com/SinisterRectus/Discordia/blob/dev/libs/client/CommandClient.lua#L232

With interactionResponseType.deferredChannelMessageWithSource (and probably deferredUpdateMessage) the payload.data is optional (it will be ignored).

Current implementation in Discordia doesn't allow this.

Fix:

-  local message, files = checkMessage(payload.data, self.defaultAllowedMentions)
+  local message, files = payload.data and checkMessage(payload.data, self.defaultAllowedMentions)
@SinisterRectus
Copy link
Owner

Thanks for the issue. I expect to fix this and related inconsistencies as I refactor much of the payload input checking/resolving. It's kind of a mess of functions and files right now. I'll keep this open as a reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants