mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Add Client.fetchInvite
This commit is contained in:
@@ -191,6 +191,15 @@ class Client extends EventEmitter {
|
||||
return this.rest.methods.getUser(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an invite object from an invite code.
|
||||
* @param {string} code the invite code.
|
||||
* @returns {Promise<Invite, Error>}
|
||||
*/
|
||||
fetchInvite(code) {
|
||||
return this.rest.methods.getInvite(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Collection, mapping Guild ID to Voice Connections.
|
||||
* @readonly
|
||||
|
||||
Reference in New Issue
Block a user