chore: Miscellaneous fixes
#9271 djs > Backports the following pull requests to version 13: > > * docs: describe private properties #8879 > * fix(snowflake): snowflakes length #9144 > * fix(Message): `bulkDeletable` permissions should be retrieved later for DMs #9146 > * fix(Message#editable): update editable check in threads locked #9216 > * fix: add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` #9219 > * fix(AutocompleteInteraction): Send `name_localizations` correctly #9238 > * fix(ThreadManager): Respect `cache` and `force` in fetching #9239 > * docs(FetchArchivedThreadOptions): `before` respects `archive_timestamp`, not creation timestamp #9240 > * refactor(FetchThreadsOptions): Remove `active` #9241 > * docs: differ `User#send` #9251 > * docs: add more examples #9252 > * fix(ClientUser): No mutation on edit #9259 > * fix: resolving string bitfield #9262 > * refactor: call `GuildBanManager#create()` directly #9263 > * docs(Role): Fix example for `comparePositionTo()` #9270 > * docs: fix compare position example #9272 > * fix: Keep symbols in actions manager #9293
This commit is contained in:
@@ -645,12 +645,22 @@ class User extends Base {
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
// These are here only for documentation purposes - they are implemented by TextBasedChannel
|
||||
/* eslint-disable no-empty-function */
|
||||
send() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to this user.
|
||||
* @method send
|
||||
* @memberof User
|
||||
* @instance
|
||||
* @param {string|MessagePayload|MessageOptions} options The options to provide
|
||||
* @returns {Promise<Message>}
|
||||
* @example
|
||||
* // Send a direct message
|
||||
* user.send('Hello!')
|
||||
* .then(message => console.log(`Sent message: ${message.content} to ${user.tag}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
|
||||
TextBasedChannel.applyToClass(User);
|
||||
|
||||
module.exports = User;
|
||||
|
||||
Reference in New Issue
Block a user