Skip to main content

manageGiveaway

A Giveaway Handler for simplydjs giveaway system.

Implementation

simplydjs.manageGiveaway(interaction, { 
// options (optional)
})

Output

giveaway panel

giveaway winner

Types

simplydjs.manageGiveaway(
button: ButtonInteraction,
options: manageGiveawayOptions
): Promise<RerollResolve | EndResolve>

Options

manageGiveawayOptions

ParameterTypeRequiredDefaultDescription
strictbooleanfalseEnables strict mode in manageGiveaway
export type manageGiveawayOptions = {
strict?: boolean;
};
Info

Customization for manageGiveaway

You can customize the buttons and embeds by passing the options in giveaway function. We export these options to manageGiveaway to match the embeds the same.


Resolve

RerollResolve

export type RerollResolve = {
type?: 'Reroll';
user?: GuildMember[];
url?: string;
};

EndResolve

export type EndResolve = {
type?: 'End';
user?: GuildMember[];
url?: string;
};

Example

  • Default settings

interactionCreate.js
const simplydjs = require('simply-djs')

simplydjs.manageGiveaway(interaction)
  • Customized with options

interactionCreate.js
const simplydjs = require('simply-djs')

simplydjs.manageGiveaway(interaction, {
strict: true
})