mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Organise structure methods
This commit is contained in:
@@ -74,17 +74,6 @@ class User {
|
||||
return new Date((this.id / 4194304) + 1420070400000);
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically concatenates the User's mention instead of the User object.
|
||||
* @returns {string}
|
||||
* @example
|
||||
* // logs: Hello from <@123456789>!
|
||||
* console.log(`Hello from ${user}!`);
|
||||
*/
|
||||
toString() {
|
||||
return `<@${this.id}>`;
|
||||
}
|
||||
|
||||
/**
|
||||
* A link to the user's avatar (if they have one, otherwise null)
|
||||
* @type {?string}
|
||||
@@ -125,17 +114,21 @@ class User {
|
||||
return equal;
|
||||
}
|
||||
|
||||
sendMessage() {
|
||||
return;
|
||||
/**
|
||||
* When concatenated with a string, this automatically concatenates the User's mention instead of the User object.
|
||||
* @returns {string}
|
||||
* @example
|
||||
* // logs: Hello from <@123456789>!
|
||||
* console.log(`Hello from ${user}!`);
|
||||
*/
|
||||
toString() {
|
||||
return `<@${this.id}>`;
|
||||
}
|
||||
|
||||
sendTTSMessage() {
|
||||
return;
|
||||
}
|
||||
|
||||
sendFile() {
|
||||
return;
|
||||
}
|
||||
// These are here only for documentation purposes - they are implemented by TextBasedChannel
|
||||
sendMessage() { return; }
|
||||
sendTTSMessage() { return; }
|
||||
sendFile() { return; }
|
||||
}
|
||||
|
||||
TextBasedChannel.applyToClass(User);
|
||||
|
||||
Reference in New Issue
Block a user