Constructors
Methods
createGiveaway
- createGiveaway<T>(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
body: {
buttonLabel?: null | string;
bypassRequirementsRoles?: string[];
channelId: string;
currentEntries?: {
entries: number;
userId: string;
username: string;
}[];
disableDoubleVoteEntry?: null | boolean;
durationMinutes: number;
emojiUnicodeOrId?: null | string;
endedAt?: null | Date;
entryFilter?: null | {
roleMode: "whitelist" | "blacklist";
roles: string[];
};
giveawayId: string;
guildId: string;
hostId: null | string;
liveEntryCountUpdatedAt?: null | Date;
maxEntries?: null | number;
mentionRole?: null | string;
messageId?: null | string;
name: string;
requirements?: null | {
accountCreatedBefore: null | Date;
boostingServer: null | boolean;
joinedServerBefore: null | Date;
messageCount: null | number;
roles: string[];
};
roleBonusType?: null | "stackable" | "highest";
roleBonuses?: {
additionalEntries: number;
roles: string[];
}[];
startedAt?: null | Date;
winnerCount: number;
winnerIds?: string[];
} & {
startInMinutes: T extends "later"
? number
: 0;
};
guildId: string;
when: T;
}auth: string
body: {
buttonLabel?: null | string;
bypassRequirementsRoles?: string[];
channelId: string;
currentEntries?: {
entries: number;
userId: string;
username: string;
}[];
disableDoubleVoteEntry?: null | boolean;
durationMinutes: number;
emojiUnicodeOrId?: null | string;
endedAt?: null | Date;
entryFilter?: null | {
roleMode: "whitelist" | "blacklist";
roles: string[];
};
giveawayId: string;
guildId: string;
hostId: null | string;
liveEntryCountUpdatedAt?: null | Date;
maxEntries?: null | number;
mentionRole?: null | string;
messageId?: null | string;
name: string;
requirements?: null | {
accountCreatedBefore: null | Date;
boostingServer: null | boolean;
joinedServerBefore: null | Date;
messageCount: null | number;
roles: string[];
};
roleBonusType?: null | "stackable" | "highest";
roleBonuses?: {
additionalEntries: number;
roles: string[];
}[];
startedAt?: null | Date;
winnerCount: number;
winnerIds?: string[];
} & {
startInMinutes: T extends "later"
? number
: 0;
}
guildId: string
when: T
Returns Promise<WebResponse<string>>
deleteGiveaway
- deleteGiveaway(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
type: StateType;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>
endGiveaway
- endGiveaway(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>
getGuildGiveaway
- getGuildGiveaway(__namedParameters): Promise<WebResponse<GuildGiveawayWithEntry>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
getGuildGiveawayEntries
- getGuildGiveawayEntries(__namedParameters): Promise<WebResponse<{
dbId: string;
entries: number;
guildGiveawayId: string;
userId: string;
username: string;
}[]>> Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<{
dbId: string;
entries: number;
guildGiveawayId: string;
userId: string;
username: string;
}[]>>
getGuildGiveaways
- getGuildGiveaways(__namedParameters): Promise<WebResponse<GuildGiveawaysType>>
Parameters
- __namedParameters: {
auth: string;
guildId: string;
}auth: string
guildId: string
rerollGiveaway
- rerollGiveaway(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>
resendGiveawayMessage
- resendGiveawayMessage(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>
startScheduledGiveaway
- startScheduledGiveaway(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
giveawayId: string;
guildId: string;
}auth: string
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>
updateGiveaway
- updateGiveaway(__namedParameters): Promise<WebResponse<string>>
Parameters
- __namedParameters: {
auth: string;
body: Pick<{
buttonLabel?: null | string;
bypassRequirementsRoles?: string[];
channelId?: string;
currentEntries?: {
entries?: number;
userId?: string;
username?: string;
}[];
disableDoubleVoteEntry?: null | boolean;
durationMinutes?: number;
emojiUnicodeOrId?: null | string;
endedAt?: null | Date;
entryFilter?: null | {
roleMode?: "whitelist" | "blacklist";
roles?: string[];
};
giveawayId?: string;
guildId?: string;
hostId?: null | string;
liveEntryCountUpdatedAt?: null | Date;
maxEntries?: null | number;
mentionRole?: null | string;
messageId?: null | string;
name?: string;
requirements?: null | {
accountCreatedBefore?: null | Date;
boostingServer?: null | boolean;
joinedServerBefore?: null | Date;
messageCount?: null | number;
roles?: string[];
};
roleBonusType?: null | "stackable" | "highest";
roleBonuses?: {
additionalEntries?: number;
roles?: string[];
}[];
startedAt?: null | Date;
winnerCount?: number;
winnerIds?: string[];
}, "name" | "durationMinutes" | "winnerCount">;
giveawayId: string;
guildId: string;
}auth: string
body: Pick<{
buttonLabel?: null | string;
bypassRequirementsRoles?: string[];
channelId?: string;
currentEntries?: {
entries?: number;
userId?: string;
username?: string;
}[];
disableDoubleVoteEntry?: null | boolean;
durationMinutes?: number;
emojiUnicodeOrId?: null | string;
endedAt?: null | Date;
entryFilter?: null | {
roleMode?: "whitelist" | "blacklist";
roles?: string[];
};
giveawayId?: string;
guildId?: string;
hostId?: null | string;
liveEntryCountUpdatedAt?: null | Date;
maxEntries?: null | number;
mentionRole?: null | string;
messageId?: null | string;
name?: string;
requirements?: null | {
accountCreatedBefore?: null | Date;
boostingServer?: null | boolean;
joinedServerBefore?: null | Date;
messageCount?: null | number;
roles?: string[];
};
roleBonusType?: null | "stackable" | "highest";
roleBonuses?: {
additionalEntries?: number;
roles?: string[];
}[];
startedAt?: null | Date;
winnerCount?: number;
winnerIds?: string[];
}, "name" | "durationMinutes" | "winnerCount">
giveawayId: string
guildId: string
Returns Promise<WebResponse<string>>