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

fix: Prevent CannotSendMessages or CannotEmbedLinks on interaction #45

Conversation

DenverCoder1
Copy link
Collaborator

@DenverCoder1 DenverCoder1 commented Jul 29, 2022

Summary

Bots can send interaction responses even when the Send Messages permission is not enabled.

Bots can also send embeds even when Embed Links permission is not enabled.

This skips the check for the permission if an interaction is used instead of ctx.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@DenverCoder1 DenverCoder1 force-pushed the fix-CannotSendMessages-with-interaction branch from 94780e3 to 685f916 Compare July 29, 2022 00:48
@DenverCoder1 DenverCoder1 added t: bug Type: bug - something isn't working p: medium Priority: medium - should be worked on in the near future s: awaiting review Status: the issue or PR is awaiting reviews labels Jul 29, 2022
@DenverCoder1 DenverCoder1 changed the title fix: Don't show CannotSendMessages if not using ctx fix: Don't raise CannotSendMessages/CannotEmbedLinks if not using ctx Jul 30, 2022
@DenverCoder1 DenverCoder1 changed the title fix: Don't raise CannotSendMessages/CannotEmbedLinks if not using ctx fix: Don't raise CannotSendMessages or CannotEmbedLinks if not using ctx Jul 30, 2022
@DenverCoder1 DenverCoder1 changed the title fix: Don't raise CannotSendMessages or CannotEmbedLinks if not using ctx fix: Prevent CannotSendMessages or CannotEmbedLinks on interaction Jul 30, 2022
@DenverCoder1 DenverCoder1 merged commit a04cf2f into nextcord:master Jul 30, 2022
DenverCoder1 added a commit to DenverCoderOne/nextcord-ext-menus that referenced this pull request Oct 31, 2022
@DenverCoder1 DenverCoder1 removed the s: awaiting review Status: the issue or PR is awaiting reviews label Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: medium Priority: medium - should be worked on in the near future t: bug Type: bug - something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants