chore: update

This commit is contained in:
Elysia 2024-01-24 18:17:15 +07:00
parent 742263ad8d
commit ae25ab6941
2 changed files with 5 additions and 3 deletions

View File

@ -34,6 +34,7 @@ class ClientUserSettingManager extends BaseManager {
*/
_patch(data = {}) {
this.#rawSetting = Object.assign(this.#rawSetting, data);
this.client.emit('debug', `[SETTING > ClientUser] Sync setting`);
if ('locale' in data) {
/**
* The user's chosen language option

View File

@ -7,7 +7,7 @@ const BaseManager = require('./BaseManager');
* @see {@link https://luna.gitlab.io/discord-unofficial-docs/user_settings.html}
*/
class GuildSettingManager extends BaseManager {
#raw = {};
#rawSetting = {};
constructor(guild) {
super(guild.client);
/**
@ -22,7 +22,7 @@ class GuildSettingManager extends BaseManager {
* @type {Object}
*/
get raw() {
return this.#raw;
return this.#rawSetting;
}
/**
@ -40,7 +40,8 @@ class GuildSettingManager extends BaseManager {
* @param {Object} data Raw Data to patch
*/
_patch(data = {}) {
this.#raw = Object.assign(this.#raw, data);
this.#rawSetting = Object.assign(this.#rawSetting, data);
this.client.emit('debug', `[SETTING > Guild ${this.guildId}] Sync setting`);
if ('suppress_everyone' in data) {
/**
* Notification setting > Suppress `@everyone` and `@here`