Skip to content

Commit

Permalink
fix: add guildID property to giveaway
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Feb 23, 2020
1 parent ffe7059 commit d9124e7
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
69 changes: 69 additions & 0 deletions docs/Giveaway.html
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,75 @@ <h5>Type:</h5>



</div>



<div class="section-members">
<h4 class="name" id="guildID"><span class="type-signature"></span>guildID<span class="type-signature"> :Snowflake</span></h4>




<div class="description">
<p>The guild ID of the giveaway</p>
</div>





<dl class="details">
































</dl>



<h5>Type:</h5>
<ul>
<li>

<span class="param-type"><code>Snowflake</code></span>


</li>
</ul>





</div>


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 5 additions & 0 deletions src/Giveaway.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions src/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d9124e7

Please sign in to comment.