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
Options for giveawaySystem function
Options | Type | Required | Default | Description |
---|---|---|---|---|
slash | Boolean | ✘ | false | Slash Support for the giveawaySystem (need to be in a slash command) |
Options for Giveaway
Options | Type | Required | Default | Description |
---|---|---|---|---|
time | Time (1m/1h/1d) | ✘ | args[0] | Time to when to finish the giveaway |
winner | Integer | ✘ | args[1] | Number of Winners for the giveaway |
prize | String | ✘ | sus | Prize given to the giveaway winner |