Add InviteResolvable (#766)

* Add InviteResolvable

Add InviteResolvable

* Return data as fallback instead

* Rename resolver method
This commit is contained in:
Programmix
2016-10-02 16:21:08 -07:00
committed by Schuyler Cebulskie
parent 77e37b62ef
commit c4e1e4f50f
2 changed files with 23 additions and 2 deletions

View File

@@ -265,10 +265,11 @@ class Client extends EventEmitter {
/**
* Fetches an invite object from an invite code.
* @param {string} code the invite code.
* @param {InviteResolvable} invite An invite code or URL
* @returns {Promise<Invite>}
*/
fetchInvite(code) {
fetchInvite(invite) {
const code = this.resolver.resolveInviteCode(invite);
return this.rest.methods.getInvite(code);
}