Skip to main content

giveawaySystem

A Powerful yet simple giveawaySystem | Requires: manageBtn()

note

This function requires you to connect() to the mongo database !

Program

const simplydjs = require("simply-djs");
simplydjs.giveawaySystem(client, interaction, { 
// options (optional)
})

Output

image

Arguments:

simplydjs.giveawaySystem(
client: Discord.Client
interaction: Discord.Message | Discord.CommandInteraction,
options: giveawayOptions
)

Options giveawayOptions

ParameterTypeRequiredDefaultDescription
prizestringnoneThe prize rewarded to the winner in the giveaway
winnersstring1The number of winners who will win at the end of the giveaway
timestring1hThe time of the end of that particular giveaway
channelTextChannelnoneChannel of a Discord TextChannel
buttonsgSysButtonsdefault buttonsPass a gSysButtons Object to customize the button
managerRole IDRolenone
reqRequirement ObjectnoneThe requirements to enter the giveaway
pingRole IDnonePing an role to let others know there is a giveaway
embedCustomizableEmbeddefault embedPass a CustomizableEmbed Object to customize the embed
fieldsEmbedFieldData[]default fieldsPass an Array of Embed Fields to customize the embed fields
disable'Label' (or) 'Emoji'labelRender the button with an emoji or a label.
requirement options

requirement

ParameterTypeDescription
type'Role' (or) 'Guild' (or) 'None'The type of the requirements whether its role required or guild joined.
idstringThe Role ID (if type: 'Role') or Guild ID (if type: 'Guild')
gSystButtons options

gSysButtons

ParameterTypeDescription
enterbtnTemplatePass an btnTemplate Object to customize the button
endbtnTemplatePass an btnTemplate Object to customize the button
rerollbtnTemplatePass an btnTemplate Object to customize the button