mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
types(Partial): add partial reactions (#6066)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -63,6 +63,16 @@ class Channel extends Base {
|
||||
return new Date(this.createdTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this Channel is a partial
|
||||
* <info>This is always false outside of DM channels.</info>
|
||||
* @type {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get partial() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
|
||||
* @returns {string}
|
||||
|
||||
@@ -16,8 +16,10 @@ class DMChannel extends Channel {
|
||||
*/
|
||||
constructor(client, data) {
|
||||
super(client, data);
|
||||
|
||||
// Override the channel type so partials have a known type
|
||||
this.type = 'DM';
|
||||
|
||||
/**
|
||||
* A manager of the messages belonging to this channel
|
||||
* @type {MessageManager}
|
||||
|
||||
@@ -65,7 +65,7 @@ class GuildMember extends Base {
|
||||
if ('user' in data) {
|
||||
/**
|
||||
* The user that this guild member instance represents
|
||||
* @type {User}
|
||||
* @type {?User}
|
||||
*/
|
||||
this.user = this.client.users._add(data.user, true);
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ class Message extends Base {
|
||||
/**
|
||||
* The message contents with all mentions replaced by the equivalent text.
|
||||
* If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
* @readonly
|
||||
*/
|
||||
get cleanContent() {
|
||||
|
||||
Reference in New Issue
Block a user