Skip to content

Conversation

@Jaskowicz1
Copy link
Contributor

This PR adds warnings for some events (guild member events and presence update) if the user does not have the specific intent required.

As these events do not fire from Discord if the intent wasn't specified, I could not use the set_warning_callback feature.

This is to try and inform users about what went wrong and how they can fix it, to try be more user friendly as D++ is currently silent about it (see link a and link b).

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@Jaskowicz1 Jaskowicz1 self-assigned this Jun 13, 2024
@netlify
Copy link

netlify bot commented Jun 13, 2024

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 16917aa
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/666ab1bfecac7b000895c452
😎 Deploy Preview https://deploy-preview-1169--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the code Improvements or additions to code. label Jun 13, 2024
Copy link
Contributor

@braindigitalis braindigitalis left a comment

Choose a reason for hiding this comment

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

what about if the user hooks the event after starting the cluster?
also, while looking at this do we make the one for messages less spammy too? basically make them all emit once?

@Jaskowicz1
Copy link
Contributor Author

what about if the user hooks the event after starting the cluster?

Couldn't come up with a solution to that, that didn't involve constantly checking every second if the events have been bound to, when I was writing this (and I still don't have a solution).

also, while looking at this do we make the one for messages less spammy too? basically make them all emit once?

Either that or add something like bot.suppress_warnings(true); to prevent warning logs for this (for people who do know what they're doing)? I think being spammy drills in the idea that they're doing something wrong to people who might not understand.

@braindigitalis braindigitalis merged commit ec55d78 into brainboxdotcc:dev Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Improvements or additions to code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants