mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
add new unique property (#1659)
This commit is contained in:
parent
39a3e72894
commit
7f809395af
1 changed files with 3 additions and 2 deletions
|
|
@ -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<Invite>}
|
||||
*/
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue