Add Client.fetchInvite

This commit is contained in:
Amish Shah
2016-09-11 18:19:49 +01:00
parent 07f4a20f77
commit 3dab19a3bc
4 changed files with 27 additions and 7 deletions

View File

@@ -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