mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Backport documentation fixes (#3683)
* Presence does not extend Base, therefore presence.client was undocumented * Document Client#fetchVoiceRegions returning a promise
This commit is contained in:
@@ -349,7 +349,7 @@ class Client extends EventEmitter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains the available voice regions from Discord.
|
* Obtains the available voice regions from Discord.
|
||||||
* @returns {Collection<string, VoiceRegion>}
|
* @returns {Promise<Collection<string, VoiceRegion>>}
|
||||||
* @example
|
* @example
|
||||||
* client.fetchVoiceRegions()
|
* client.fetchVoiceRegions()
|
||||||
* .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`))
|
* .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`))
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ const { ActivityFlags, Endpoints } = require('../util/Constants');
|
|||||||
*/
|
*/
|
||||||
class Presence {
|
class Presence {
|
||||||
constructor(data = {}, client) {
|
constructor(data = {}, client) {
|
||||||
|
/**
|
||||||
|
* The client that instantiated this
|
||||||
|
* @name Presence#client
|
||||||
|
* @type {Client}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
Object.defineProperty(this, 'client', { value: client });
|
Object.defineProperty(this, 'client', { value: client });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user