mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
refactor: remove user bot methods (#2559)
* [WIP] Remove user bots * more backend userbot removal * Add mfaEnabled back * revert client presences store removal * partially revert getAuth changes * remove more no longer used children of ClientUserGuildSettings * fix a bug with this pr and TextBasedChannel.applyToClass * remove a syncGuilds reference * more user bot data handling * various guildSync cleanup * bots can't call logout Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore? * make ClientManager#destroy() sync It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell. * requested change * Fix massive error * no longer used as it's userbot only
This commit is contained in:
@@ -170,26 +170,6 @@ class ClientApplication extends Base {
|
||||
} });
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the app's secret.
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @returns {Promise<ClientApplication>}
|
||||
*/
|
||||
resetSecret() {
|
||||
return this.client.api.oauth2.applications[this.id].reset.post()
|
||||
.then(app => new ClientApplication(this.client, app));
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the app's bot token.
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @returns {Promise<ClientApplication>}
|
||||
*/
|
||||
resetToken() {
|
||||
return this.client.api.oauth2.applications[this.id].bot.reset.post()
|
||||
.then(app => new ClientApplication(this.client, Object.assign({}, this, { bot: app })));
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically returns the application's name instead of the
|
||||
* ClientApplication object.
|
||||
|
||||
Reference in New Issue
Block a user