mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
docs: inconsistencies
This commit is contained in:
@@ -289,9 +289,8 @@ class Client extends BaseClient {
|
||||
* @returns {Promise<Invite>}
|
||||
* @example
|
||||
* client.fetchInvite('https://discord.gg/bRCvFy9')
|
||||
* .then(invite => {
|
||||
* console.log(`Obtained invite with code: ${invite.code}`);
|
||||
* }).catch(console.error);
|
||||
* .then(invite => console.log(`Obtained invite with code: ${invite.code}`)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetchInvite(invite) {
|
||||
const code = DataResolver.resolveInviteCode(invite);
|
||||
@@ -306,9 +305,8 @@ class Client extends BaseClient {
|
||||
* @returns {Promise<Webhook>}
|
||||
* @example
|
||||
* client.fetchWebhook('id', 'token')
|
||||
* .then(webhook => {
|
||||
* console.log(`Obtained webhook with name: ${webhook.name}`);
|
||||
* }).catch(console.error);
|
||||
* .then(webhook => console.log(`Obtained webhook with name: ${webhook.name}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetchWebhook(id, token) {
|
||||
return this.api.webhooks(id, token).get().then(data => new Webhook(this, data));
|
||||
@@ -319,9 +317,8 @@ class Client extends BaseClient {
|
||||
* @returns {Collection<string, VoiceRegion>}
|
||||
* @example
|
||||
* client.fetchVoiceRegions()
|
||||
* .then(regions => {
|
||||
* console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`);
|
||||
* }).catch(console.error);
|
||||
* .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetchVoiceRegions() {
|
||||
return this.api.voice.regions.get().then(res => {
|
||||
@@ -380,9 +377,8 @@ class Client extends BaseClient {
|
||||
* @returns {Promise<ClientApplication>}
|
||||
* @example
|
||||
* client.fetchApplication('id')
|
||||
* .then(application => {
|
||||
* console.log(`Obtained application with name: ${application.name}`);
|
||||
* }).catch(console.error);
|
||||
* .then(application => console.log(`Obtained application with name: ${application.name}`)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
fetchApplication(id = '@me') {
|
||||
return this.api.oauth2.applications(id).get()
|
||||
|
||||
Reference in New Issue
Block a user