Skip to content

Commit

Permalink
🐛 ts update getters
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico105 committed Jun 4, 2021
1 parent 4a8de63 commit db9a38e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ declare module 'discord-giveaways' {
}
interface BonusEntry {
bonus(member?: GuildMember): number | Promise<number>;
cumulative: boolean;
cumulative?: boolean;
}
interface LastChanceOptions {
enabled: boolean;
Expand Down Expand Up @@ -105,7 +105,6 @@ declare module 'discord-giveaways' {

public channelID: Snowflake;
public client: Client;
public data: GiveawayData;
public endAt: number;
public ended: boolean;
public guildID: Snowflake;
Expand All @@ -122,28 +121,28 @@ declare module 'discord-giveaways' {

// getters calculated using default manager options
readonly exemptPermissions: PermissionResolvable[];
readonly giveawayDuration: number;
readonly embedColor: ColorResolvable;
readonly embedColorEnd: ColorResolvable;
readonly botsCanWin: boolean;
readonly reaction: string;
readonly lastChance: LastChanceOptions;

// getters calculated using other values
readonly remainingTime: number;
readonly giveawayDuration: number;
readonly messageURL: string;
readonly content: string;
readonly remainingTimeText: string;
readonly channel: TextChannel;
readonly exemptMembersFunction: Function | null;
readonly bonusEntries: BonusEntry[];
readonly data: GiveawayData;

public exemptMembers(member: GuildMember): Promise<boolean>;
public edit(options: GiveawayEditOptions): Promise<Giveaway>;
public end(): Promise<GuildMember[]>;
// @ts-ignore-next-line
public async fetchMessage(): Promise<Message>;
public fetchMessage(): Promise<Message>;
public reroll(options: GiveawayRerollOptions): Promise<GuildMember[]>;
// @ts-ignore-next-line
public async roll(winnerCount?: number): Promise<GuildMember[]>;
public roll(winnerCount?: number): Promise<GuildMember[]>;
}
interface GiveawayEditOptions {
newWinnerCount?: number;
Expand Down

0 comments on commit db9a38e

Please sign in to comment.