aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
774 stars 164 forks source link

feat: add automatic client build number update #1122

Closed TheDevYellowy closed 1 month ago

TheDevYellowy commented 6 months ago

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

TheDevYellowy commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

That makes sense

aiko-chan-ai commented 6 months ago

Can it become optional in ClientOptions?

TheDevYellowy commented 5 months ago

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 commented 5 months ago

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