mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Added and fixed a bunch of docs stuff (#1767)
- Fixed a common copy paste fail `the the <thing>` in various places - Apparently I can't type Resolvable correctly, Fixed that wherever applicable - Documented GroupDMChannel#nicks so that it will be displayed on the docs - GroupDMChannel#icon is nullable - Removed empty InviteOptions typdef, as its properties are now documented in GuildChannel#createInvite - MessageMentions#channels is no longer nullable - RoleData#permissions takes a PermissionResolvable or an array of them - Webhook#avatar is nullable - Added HTTPOptions typedef and added it to ClientOptions typedef - ClientUserChannelOverride#muted is for a channel and not a guild directly
This commit is contained in:
@@ -49,7 +49,7 @@ class GroupDMChannel extends Channel {
|
||||
|
||||
/**
|
||||
* A hash of this Group DM icon
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
*/
|
||||
this.icon = data.icon;
|
||||
|
||||
@@ -71,11 +71,13 @@ class GroupDMChannel extends Channel {
|
||||
*/
|
||||
this.applicationID = data.application_id;
|
||||
|
||||
/**
|
||||
* Nicknames for group members
|
||||
* @type {?Collection<Snowflake, string>}
|
||||
*/
|
||||
if (data.nicks) this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick]));
|
||||
if (data.nicks) {
|
||||
/**
|
||||
* Nicknames for group members
|
||||
* @type {?Collection<Snowflake, string>}
|
||||
*/
|
||||
this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick]));
|
||||
}
|
||||
|
||||
if (!this.recipients) {
|
||||
/**
|
||||
@@ -181,7 +183,7 @@ class GroupDMChannel extends Channel {
|
||||
/**
|
||||
* Adds an user to this Group DM.
|
||||
* @param {Object} options Options for this method
|
||||
* @param {UserResolveable} options.user User to add to this Group DM
|
||||
* @param {UserResolvable} options.user User to add to this Group DM
|
||||
* @param {string} [options.accessToken] Access token to use to add the user to this Group DM
|
||||
* (only available under a bot account)
|
||||
* @param {string} [options.nick] Permanent nickname to give the user (only available under a bot account)
|
||||
@@ -198,7 +200,7 @@ class GroupDMChannel extends Channel {
|
||||
|
||||
/**
|
||||
* Removes an user from this Group DM.
|
||||
* @param {UserResolveable} user User to remove
|
||||
* @param {UserResolvable} user User to remove
|
||||
* @returns {Promise<GroupDMChannel>}
|
||||
*/
|
||||
removeUser(user) {
|
||||
|
||||
Reference in New Issue
Block a user