betterBtnRole
This is an example of betterBtnRole
info
This is a slash only function | You can't use this function with normal message
With Customization
const simplydjs = require("simply-djs");
interactionCreate
Event (btn-add command)
// interactionCreate event
simplydjs.betterBtnRole(client, interaction, {
type: "add",
// Slash Option Customization
chSlash: 'channel', // Custom Channel Option [Names]
idSlash: 'message ID', // Custom ID Option [Names]
roleSlash: 'role', // Custom Role Option [Names]
labelSlash: 'name', // Custom Label Option [Names]
styleSlash: 'color', // Custom Style Option [Names]
emojiSlash: 'emoji' // Custom Emoji Option [Names]
});
interactionCreate
Event (btn-remove command)
simplydjs.betterBtnRole(client, interaction, {
type: "remove",
// Slash Option Customization
chSlash: 'channel', // Custom Channel Option [Names]
idSlash: 'message ID', // Custom ID Option [Names]
roleSlash: 'role', // Custom Role Option [Names]
});
Slash Command Type
// btnrole-add
{
name: 'btnrole-add',
description: 'Button roles is slash ?!',
options: [
{
name: 'channel',
type: 'CHANNEL',
description: 'channel of that message',
required: true,
},
{
name: 'message',
type: 'STRING',
description: 'the message',
required: true,
},
{
name: 'role',
type: 'ROLE',
description: 'what role',
required: true,
},
{
name: 'label',
type: 'STRING',
description: 'name of the button ?',
required: false,
},
{
name: 'style',
type: 'STRING',
description: 'color of the button',
required: false,
choices: [
{
name: 'PRIMARY',
value: 'PRIMARY'
},
{
name: 'SECONDARY',
value: 'SECONDARY'
},
{
name: 'SUCCESS',
value: 'SUCCESS'
},
{
name: 'DANGER',
value: 'DANGER'
},
]
},
{
name: 'emoji',
type: 'STRING',
description: 'emoji maybe ?',
required: false,
},
],
}
// btnrole-remove
{
name: 'btnrole-remove',
description: 'Button roles removal is slash ?!',
options: [
{
name: 'channel',
type: 'CHANNEL',
description: 'channel of that message',
required: true,
},
{
name: 'message',
type: 'STRING',
description: 'the message',
required: true,
},
{
name: 'role',
type: 'ROLE',
description: 'what role',
required: true,
},
],
}
Output
Options for betterBtnRole function
Options | Type | Required | Default | Description |
---|---|---|---|---|
type | String (add/remove) | โ | none | Type of the betterBtnRole to use |
Slash Customization.
Options | Type | Required | Default | Description |
---|---|---|---|---|
chSlash | String | โ | channel | Custom Channel Option name (Customizability++) |
idSlash | String | โ | message | Custom Message ID Option name |
roleSlash | String | โ | role | Custom Role Option name |
labelSlash | String | โ | label | Custom Label Option name |
roleSlash | String | โ | style | Custom Style Option name |
emojiSlash | String | โ | emoji | Custom Emoji Option name |