mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Rewrite presence a little bit (#1853)
* such presence many good * Update PresenceStore.js * Update index.js * Update ClientPresenceStore.js * Update Presence.js * Update ClientPresenceStore.js * Update ClientUser.js * Update Presence.js * add timestamps and party * Update Presence.js * Update PresenceStore.js * Update ClientPresenceStore.js * Update ClientPresenceStore.js
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
const TextBasedChannel = require('./interfaces/TextBasedChannel');
|
||||
const Constants = require('../util/Constants');
|
||||
const { Presence } = require('./Presence');
|
||||
const UserProfile = require('./UserProfile');
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
@@ -108,7 +107,7 @@ class User extends Base {
|
||||
*/
|
||||
avatarURL({ format, size } = {}) {
|
||||
if (!this.avatar) return null;
|
||||
return Constants.Endpoints.CDN(this.client.options.http.cdn).Avatar(this.id, this.avatar, format, size);
|
||||
return this.client.rest.cdn.Avatar(this.id, this.avatar, format, size);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +116,7 @@ class User extends Base {
|
||||
* @readonly
|
||||
*/
|
||||
get defaultAvatarURL() {
|
||||
return Constants.Endpoints.CDN(this.client.options.http.cdn).DefaultAvatar(this.discriminator % 5);
|
||||
return this.client.rest.cdn.DefaultAvatar(this.discriminator % 5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user