giveawaySystem
A Powerful yet simple giveawaySystem | Requires: manageBtn()
note
This function requires you to connect() to the mongo database !
Program
- Javascript
- Typescript
const simplydjs = require("simply-djs");
import simplydjs from "simply-djs";
simplydjs.giveawaySystem(client, interaction, {
// options (optional)
})
Output
Arguments:
simplydjs.giveawaySystem(
client: Discord.Client
interaction: Discord.Message | Discord.CommandInteraction,
options: giveawayOptions
)
- client:
Discord.Client
- interaction
Discord.Message
|Discord.CommandInteraction
- options:
giveawayOptions
Options giveawayOptions
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
prize | string | ❌ | none | The prize rewarded to the winner in the giveaway |
winners | string | ❌ | 1 | The number of winners who will win at the end of the giveaway |
time | string | ❌ | 1h | The time of the end of that particular giveaway |
channel | TextChannel | ❌ | none | Channel of a Discord TextChannel |
buttons | gSysButtons | ❌ | default buttons | Pass a gSysButtons Object to customize the button |
manager | Role ID | Role | ❌ | none |
req | Requirement Object | ❌ | none | The requirements to enter the giveaway |
ping | Role ID | ❌ | none | Ping an role to let others know there is a giveaway |
embed | CustomizableEmbed | ❌ | default embed | Pass a CustomizableEmbed Object to customize the embed |
fields | EmbedFieldData[] | ❌ | default fields | Pass an Array of Embed Fields to customize the embed fields |
disable | 'Label' (or) 'Emoji' | ❌ | label | Render the button with an emoji or a label. |
requirement options
requirement
Parameter | Type | Description |
---|---|---|
type | 'Role' (or) 'Guild' (or) 'None' | The type of the requirements whether its role required or guild joined. |
id | string | The Role ID (if type: 'Role') or Guild ID (if type: 'Guild') |
gSystButtons options
gSysButtons
Parameter | Type | Description |
---|---|---|
enter | btnTemplate | Pass an btnTemplate Object to customize the button |
end | btnTemplate | Pass an btnTemplate Object to customize the button |
reroll | btnTemplate | Pass an btnTemplate Object to customize the button |