Skip to content

Commit

Permalink
🐛 update manager.default types
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico105 committed Jun 12, 2021
1 parent 7aaadd6 commit c78024f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ exports.LastChanceOptions = {
* @property {number} [updateCountdownEvery=5000] The giveaway update interval (in ms).
* @property {number} [endedGiveawaysLifetime=null] The time (in ms) after which a ended giveaway should get deleted from the DB. ⚠ Giveaways deleted from the DB cannot get rerolled anymore!
* @property {boolean} [hasGuildMembersIntent=false] Whether the client instance has access to the GUILD_MEMBERS intent. If set to true, everything will be faster.
* @property {GiveawayStartOptions} [default] The default options for new giveaways.
* @property {Object} [default] The default options for new giveaways.
* @property {Boolean} [default.botsCanWin=false] Whether the bots are able to win a giveaway.
* @property {Discord.PermissionResolvable[]} [default.exemptPermissions=[]] Members with any of these permissions won't be able to win a giveaway.
* @property {Function} [default.exemptMembers] Function to filter members. If true is returned, the member won't be able to win a giveaway.
Expand Down
12 changes: 10 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ declare module 'discord-giveaways' {
updateCountdownEvery?: number;
endedGiveawaysLifetime?: number;
hasGuildMembersIntent?: boolean;
default?: GiveawayStartOptions;
default?: {
botsCanWin?: boolean,
exemptPermissions?: PermissionResolvable[],
exemptMembers?: (member?: GuildMember) => boolean | Promise<boolean>,
embedColor?: ColorResolvable,
embedColorEnd?: ColorResolvable,
reaction?: EmojiIdentifierResolvable,
lastChance?: LastChanceOptions;
};
}
interface GiveawayStartOptions {
time: number;
Expand Down Expand Up @@ -126,7 +134,7 @@ declare module 'discord-giveaways' {
readonly embedColor: ColorResolvable;
readonly embedColorEnd: ColorResolvable;
readonly botsCanWin: boolean;
readonly reaction: string;
readonly reaction: EmojiIdentifierResolvable;
readonly lastChance: LastChanceOptions;

// getters calculated using other values
Expand Down

0 comments on commit c78024f

Please sign in to comment.