mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
docs: Fix some small typos or "missing" docs (#1943)
* Fix documentation for GuildAuditLogEntry.target * Update documentation for CategoryChannel#children * Add EntryTarget for audit logs I've done this to "fulfill" devsneks request while also showing all the possible results for the target of an AuditLogEntry * Oops Eslint * Private timeout sets gets set by BaseClient not WebhookClient * Fix the "Missing Docs" for Presence#activity * Small doc inconsistency Array<Number> instead of Array<number> for Activity * Client#emojis is an EmojiStore not a Collection * Document ClientPresenceStore Just so its clickable through the wiki, nothing else is documented * Small fix for BaseClient#setInterval You don't wait before executing, you execute every X ms * GuildChannelResolvable takes a GuildChannel/Snowflake * Typo in UserResolvable * Another typo for UserResolvable * Add the number to the Status and VoiceStatus docs Its probably not needed, but just so the user knows what each number means, its now documented.
This commit is contained in:
@@ -7,7 +7,7 @@ const GuildChannel = require('./GuildChannel');
|
||||
class CategoryChannel extends GuildChannel {
|
||||
/**
|
||||
* The channels that are part of this category
|
||||
* @type {?Collection}
|
||||
* @type {?Collection<Snowflake, GuildChannel>}
|
||||
* @readonly
|
||||
*/
|
||||
get children() {
|
||||
|
||||
@@ -97,6 +97,18 @@ class GuildAuditLogs {
|
||||
* @typedef {string} TargetType
|
||||
*/
|
||||
|
||||
/**
|
||||
* The target for an audit log entry. It can be one of:
|
||||
* * A guild
|
||||
* * A user
|
||||
* * A role
|
||||
* * An emoji
|
||||
* * An invite
|
||||
* * A webhook
|
||||
* * An object where the keys represent either the new value or the old value
|
||||
* @typedef {?Object|Guild|User|Role|Emoji|Invite|Webhook} EntryTarget
|
||||
*/
|
||||
|
||||
/**
|
||||
* Find target type from entry action.
|
||||
* @param {number} target The action target
|
||||
@@ -259,7 +271,7 @@ class GuildAuditLogsEntry {
|
||||
if (targetType === Targets.UNKNOWN) {
|
||||
/**
|
||||
* The target of this entry
|
||||
* @type {TargetType}
|
||||
* @type {EntryTarget}
|
||||
*/
|
||||
this.target = this.changes.reduce((o, c) => {
|
||||
o[c.key] = c.new || c.old;
|
||||
|
||||
@@ -23,6 +23,7 @@ class Presence {
|
||||
|
||||
const activity = data.game || data.activity;
|
||||
/**
|
||||
* The activity of the presence
|
||||
* @type {?Activity}
|
||||
*/
|
||||
this.activity = activity ? new Activity(this, activity) : null;
|
||||
@@ -108,7 +109,7 @@ class Activity {
|
||||
* Party of the activity
|
||||
* @type {?Object}
|
||||
* @prop {?string} id ID of the party
|
||||
* @prop {Number[]} size Size of the party as `[current, max]`
|
||||
* @prop {number[]} size Size of the party as `[current, max]`
|
||||
*/
|
||||
this.party = data.party || null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user