mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add InviteResolvable (#766)
* Add InviteResolvable Add InviteResolvable * Return data as fallback instead * Rename resolver method
This commit is contained in:
committed by
Schuyler Cebulskie
parent
77e37b62ef
commit
c4e1e4f50f
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user