Skip to main content

suggestSystem

This is an example of suggestSystem

With Customization

const simplydjs = require('simply-djs')

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

interactionCreate Event

// interactionCreate event
simplydjs.suggestBtn(interaction, db, {
yesEmoji: 'emoji id', // default: โ˜‘๏ธ
yesColor: 'buttonColor', // default: green
noEmoji: 'emoji id', // default: X
noColor: 'buttonColor', // default: red
denyEmbColor: 'hex color', // default: RED
agreeEmbColor: 'hex color', // default: GREEN
})

messageCreate Event (suggest command)

// messageCreate event
simplydjs.suggestSystem(client, message, args, {
chid: 'channel id',
embedColor: 'hex color', // defaultL #075FFF
yesEmoji: 'emoji id', // default: โ˜‘๏ธ
yesColor: 'buttonColor', // default: green
noEmoji: 'emoji id', // default: X
noColor: 'buttonColor', // default: red
})
info

Without Customization

interactionCreate Event

// interactionCreate event
simplydjs.suggestBtn(interaction, db)

messageCreate Event (suggest command)

// messageCreate event
simplydjs.suggestSystem(client, message, args, {
chid: 'channel id'
})
TIP

Slash Support.

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

Slash command format

{
name: 'suggest',
description: 'suggestSystem using simply-djs',
options: [{
name: 'suggestion',
type: 'STRING',
description: 'Suggestion',
required: true,
}],

},

Output

image

Options for suggestBtn function

Slash Customization

OptionsTypeRequiredDefaultDescription
sugSlashStringโœ˜suggestionCustom Suggestion Option name (Customizability++)

Embeds

OptionsTypeRequiredDefaultDescription
denyEmbColorHex Codeโœ˜REDColor of the denied suggestion embed
agreeEmbColorHex Codeโœ˜GREENColor of the accepted suggestion embed

Buttons

OptionsTypeRequiredDefaultDescription
yesEmojiEmoji IDโœ˜โ˜‘๏ธEmoji of the button which accepts suggestion
yesColorButton Styleโœ˜SUCCESSColor for the Accept Suggestion button
noEmojiEmoji IDโœ˜XEmoji of the button which denies suggestion
noColorButton Styleโœ˜DANGERColor for the Deny Suggestion button

Options for suggestSystem function

OptionsTypeRequiredDefaultDescription
slashBooleanโœ˜falseSlash Support for the suggestSystem (need to be in a slash command)
chidChannel IDโœ“noneChannel to send the sweet suggestions

Embeds

OptionsTypeRequiredDefaultDescription
embedColorHex Codeโœ˜#075FFFColor of the suggestion embed
creditsBooleanโœ˜trueCredit the package

Buttons

OptionsTypeRequiredDefaultDescription
yesEmojiEmoji IDโœ˜โ˜‘๏ธEmoji of the button which accepts suggestion
yesColorButton Styleโœ˜SUCCESSColor for the Accept Suggestion button
noEmojiEmoji IDโœ˜XEmoji of the button which denies suggestion
noColorButton Styleโœ˜DANGERColor for the Deny Suggestion button