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

Make JMusicBot error & shut down if ran in an unsupported manner #1486

Merged

Conversation

MichailiK
Copy link
Collaborator

This PR adds a getUnsupportedBotReason utility, which determines if the bot JMusicBot is running under shows any remarks of being run in a manner that JMusicBot doesn't support. JDA will get shut down & JMusicBot will exit if there is a reason.

Right now, it only checks:

  • If the bot is verified
  • If the bot is public

It doesn't look like there's a way to check privileged intents with JDA 4? Thus its absent for now.

@MichailiK
Copy link
Collaborator Author

MichailiK commented Feb 28, 2024

Whoops, the GUI prompt immediately disappears when JDA shuts down. Not exactly sure how to tackle that right now, so any suggestions would be welcome!

@jagrosh jagrosh merged commit 23c2dfa into jagrosh:master Mar 2, 2024
1 of 2 checks passed
@tbodt
Copy link

tbodt commented Mar 10, 2024

I'm confused about why we have this, my bot is set to public and is working fine, at least as far as I can tell.

@sks316
Copy link

sks316 commented Mar 10, 2024

I'm confused as well. Until the latest update, my bot was set to public with absolutely no issues, then when I update, it stops working. I don't see the rationale behind this.
Fun fact, if the bot is set to auto start as a systemd service and meets one of these "unsupported" conditions, this new update causes it to hit the Discord API over 1,000 times in a short period, which makes Discord invalidate the bot token due to "potential abuse". That's the only way I knew anything was wrong, because I usually don't check the systemd logs after updating this.

@tbodt
Copy link

tbodt commented Mar 11, 2024

I just turned off update notifications - this one doesn't seem worth it.

Repository owner locked as too heated and limited conversation to collaborators Mar 11, 2024
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.

None yet

4 participants