mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
User settings (#1337)
* user settings bruh * remove development dump * emit stuff * i am so done * Update ClientUserSettings.js * modularize * Update ClientUserSettings.js * Update Constants.js * Update ClientUserSettings.js * Update RESTMethods.js * Update ClientUserSettings.js * <.<
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const User = require('./User');
|
||||
const Collection = require('../util/Collection');
|
||||
|
||||
const ClientUserSettings = require('./ClientUserSettings');
|
||||
/**
|
||||
* Represents the logged in client's Discord user
|
||||
* @extends {User}
|
||||
@@ -44,13 +44,6 @@ class ClientUser extends User {
|
||||
*/
|
||||
this.notes = new Collection();
|
||||
|
||||
/**
|
||||
* Discord client settings, such as guild positions
|
||||
* <warn>This is only filled when using a user account.</warn>
|
||||
* @type {Object}
|
||||
*/
|
||||
this.settings = {};
|
||||
|
||||
/**
|
||||
* If the user has discord premium (nitro)
|
||||
* <warn>This is only filled when using a user account.</warn>
|
||||
@@ -71,6 +64,13 @@ class ClientUser extends User {
|
||||
* @type {?boolean}
|
||||
*/
|
||||
this.mobile = typeof data.mobile === 'boolean' ? data.mobile : null;
|
||||
|
||||
/**
|
||||
* Various settings for this user
|
||||
* @type {?ClientUserSettings}
|
||||
* <warn>This is only filled when using a user account</warn>
|
||||
*/
|
||||
if (data.user_settings) this.settings = new ClientUserSettings(this, data.user_settings);
|
||||
}
|
||||
|
||||
edit(data) {
|
||||
|
||||
Reference in New Issue
Block a user