Skip to main content

giveawaySystem

This is an example of giveawaySystem

INFO

Fixed multiple bugs ;)

Required

quickmongo

With Customization

const simplydjs = require("simply-djs");

let { Database } = require('quickmongo')
let db = new Database('mongo String')

interactionCreate Event

//interactionCreate event
simplydjs.clickBtn(interaction, {
db: db
})

messageCreate Event (gstart command)

// messageCreate event

simplydjs.giveawaySystem(client, db, message, {
args: args, // only when using in messageCreate

time: args[0],
winners: args[1],
prize: args[2],
})
INFO

Without Customization

interactionCreate Event

//interactionCreate event
simplydjs.clickBtn(interaction, {
db: db
})

messageCreate Event (gstart command)

// messageCreate event
// g-start command
simplydjs.giveawaySystem(client, db, interaction, {
args: args // only when using in messageCreate
})
TIP

Slash Support.

The package supports Auto Slash Recognition ! So no more slash options.

Slash command format

{
name: 'giveaway',
description: 'Create giveaway using simply-djs',
options: [{
name: 'time',
type: 'STRING',
description: 'Time when to finish the giveaway',
required: true,
},
{
name: 'winners',
type: 'INTEGER',
description: 'Number of Winners for the giveaway',
required: true,
},
{
name: 'prize',
type: 'STRING',
description: 'Prize given to the giveaway winner',
required: true,
},
{
name: 'channel',
type: 'CHANNEL',
description: 'Channel to start the giveaway',
required: false,
}
],

}

Output

image

Options for giveawaySystem function

OptionsTypeRequiredDefaultDescription
slashBoolean✘falseSlash Support for the giveawaySystem (need to be in a slash command)

Options for Giveaway

OptionsTypeRequiredDefaultDescription
timeTime (1m/1h/1d)✘args[0]Time to when to finish the giveaway
winnerInteger✘args[1]Number of Winners for the giveaway
prizeString✘susPrize given to the giveaway winner

Slash Customization

OptionsTypeRequiredDefaultDescription
timeSlashString✘timeCustom Time Option name (Customizability++)
winSlashString✘winnersCustom Winners Option name
prizeSlashString✘prizeCustom Prize Option name
chSlashString✘channelCustom Channel Option name