diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index ab3e6a10c..ad0d8e0d2 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -283,12 +283,13 @@ class GuildChannel extends Channel { * kicked after 24 hours if they have not yet received a role * @param {number} [options.maxAge=86400] How long the invite should last (in seconds, 0 for forever) * @param {number} [options.maxUses=0] Maximum number of uses + * @param {boolean} [options.unique=false] Create a unique invite, or use an existing one with similar settings * @param {string} [options.reason] Reason for creating this * @returns {Promise} */ - createInvite({ temporary = false, maxAge = 86400, maxUses = 0, reason } = {}) { + createInvite({ temporary = false, maxAge = 86400, maxUses = 0, unique, reason } = {}) { return this.client.api.channels[this.id].invites.post({ data: { - temporary, max_age: maxAge, max_uses: maxUses, + temporary, max_age: maxAge, max_uses: maxUses, unique, }, reason }) .then(invite => new Invite(this.client, invite)); }