feat(Client): ClientUserSettingManager => ClientSettingManager

client.setting => client.settings

...
This commit is contained in:
March 7th
2022-08-20 20:26:56 +07:00
parent 3ec6bf45fb
commit cbc3fbb7b8
8 changed files with 207 additions and 59 deletions

View File

@@ -11,7 +11,7 @@ const WebSocketManager = require('./websocket/WebSocketManager');
const { Error, TypeError, RangeError } = require('../errors');
const BaseGuildEmojiManager = require('../managers/BaseGuildEmojiManager');
const ChannelManager = require('../managers/ChannelManager');
const ClientUserSettingManager = require('../managers/ClientUserSettingManager');
const ClientSettingManager = require('../managers/ClientSettingManager');
const DeveloperPortalManager = require('../managers/DeveloperPortalManager');
const GuildManager = require('../managers/GuildManager');
const RelationshipsManager = require('../managers/RelationshipsManager');
@@ -146,9 +146,9 @@ class Client extends BaseClient {
this.relationships = new RelationshipsManager(this);
/**
* All of the settings {@link Object}
* @type {ClientUserSettingManager}
* @type {ClientSettingManager}
*/
this.setting = new ClientUserSettingManager(this);
this.settings = new ClientSettingManager(this);
/**
* All of the guilds the client is currently handling, mapped by their ids -
* as long as sharding isn't being used, this will be *every* guild the bot is a member of

View File

@@ -111,7 +111,7 @@ module.exports = (client, { d: data }, shard) => {
client.user.setAFK(false);
client.setting._patch(data.user_settings);
client.settings._patch(data.user_settings);
client.user.connectedAccounts = data.connected_accounts ?? [];

View File

@@ -1,7 +1,7 @@
'use strict';
const { Events } = require('../../../util/Constants');
module.exports = (client, { d: data }) => {
client.setting._patch(data);
client.settings._patch(data);
if (('status' in data || 'custom_status' in data) && client.options.readyStatus) {
client.customStatusAuto(client);
}