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

feat: add automatic client build number update #1122

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

TheDevYellowy
Copy link
Contributor

Add the code from marioparaschiv that is found in this issue comment to the login function before websocket establishment

@TheDevYellowy
Copy link
Contributor Author

edited the code a little bit, I had it check 10 chars further then the start of the build number for a small bit of future proofing

@aiko-chan-ai
Copy link
Owner

there is a bit of problem, if djs-sb is used to run many bots it will spam a lot to discord and it will run very slow, it would be better if it is implemented as an api (like dpy-self)

@TheDevYellowy
Copy link
Contributor Author

That makes sense

@aiko-chan-ai
Copy link
Owner

Can it become optional in ClientOptions?

@marioparaschiv marioparaschiv mentioned this pull request Apr 5, 2024
3 tasks
@TheDevYellowy
Copy link
Contributor Author

TheDevYellowy commented Apr 6, 2024

Can it become optional in ClientOptions?

wdym by this, I changed the function to be static so people don't have to initialize the Client class they just need to do the following and it'll return the build number. or do you mean that if the option is selected it'll automatically update the build number

const { Client } = require("discord.js-selfbot-v13");

(async () => {
  const build_number = await Client.getClientBuildNumber();
})();

@TheDevYellowy
Copy link
Contributor Author

nvm I'm about to change it to automatically use the release_channel property in options if the user doesn't specify a release channel, which means it can't be static

src/client/Client.js Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

None yet

2 participants