manageGiveaway
A Giveaway Handler for simplydjs giveaway system.
This function requires
connect()which connects to the mongo database !
caution
You should use giveaway() before this function. Because handlers are like back-end (core), They just handle things. But giveaway is like front-end. without this, handlers are useless.
Implementation
simplydjs.manageGiveaway(interaction, {
// options (optional)
})
Output


Types
simplydjs.manageGiveaway(
button: ButtonInteraction,
options: manageGiveawayOptions
): Promise<RerollResolve | EndResolve>
- button:
ButtonInteraction - options:
manageGiveawayOptions
- Resolves:
RerollResolve|EndResolve
Options
manageGiveawayOptions
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
strict | boolean | ❌ | false | Enables strict mode in manageGiveaway |
export type manageGiveawayOptions = {
strict?: boolean;
};
Info
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
})