diff --git a/docs/Giveaway.html b/docs/Giveaway.html index 567d7ecb..a4205064 100644 --- a/docs/Giveaway.html +++ b/docs/Giveaway.html @@ -1048,6 +1048,75 @@
Type:
+ + + + +
+

guildID :Snowflake

+ + + + +
+

The guild ID of the giveaway

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+ + + + + +
diff --git a/package.json b/package.json index 7e31fff1..75ac82c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-giveaways", - "version": "3.2.0", + "version": "3.2.1", "description": "A complete framework to facilitate the creation of giveaways using discord.js", "main": "index.js", "scripts": { diff --git a/src/Giveaway.js b/src/Giveaway.js index e69578f9..e70fe0ed 100644 --- a/src/Giveaway.js +++ b/src/Giveaway.js @@ -51,6 +51,11 @@ class Giveaway extends EventEmitter { * @type {Snowflake} */ this.messageID = options.messageID; + /** + * The guild ID of the giveaway + * @type {Snowflake} + */ + this.guildID = options.guildID; /** * The number of winners for this giveaway * @type {number} diff --git a/src/Manager.js b/src/Manager.js index 41e656f2..7d27dee4 100644 --- a/src/Manager.js +++ b/src/Manager.js @@ -156,6 +156,7 @@ class GiveawaysManager extends EventEmitter { endAt: Date.now() + options.time, winnerCount: options.winnerCount, channelID: channel.id, + guildID: channel.guild.id, ended: false, prize: options.prize, hostedBy: (options.hostedBy ? options.hostedBy.toString() : null), @@ -340,6 +341,7 @@ class GiveawaysManager extends EventEmitter { let giveawayData = { messageID: giveaway.messageID, channelID: giveaway.channelID, + guildID: giveaway.guildID, startAt: giveaway.startAt, endAt: giveaway.endAt, ended: giveaway.ended,