Skip to main content

starboard

Easiest starboard system ever existed !

This function should be used only in messageReactionAdd, messageReactionDelete and messageDelete events

Implementation

simplydjs.starboard(reaction, {
channelId: '01234567890123' // channelId (required)
// options (Optional)
})
tip

When using the function for messageDelete event, replace reaction to message

Example:

client.on('messageDelete', () => {
simplydjs.starboard(message, {
channelId: '01234567890123' // channelId (required)
// options (Optional)
})
})

Output

starboard

Types

simplydjs.starboard(
reactionOrMessage: MessageReaction | ExtendedMessage,
options: starboardOption
): Promise<void>

Options

starboardOption

ParameterTypeRequiredDefaultDescription
strictbooleanfalseEnables strict mode in starboard
channelIdstring-Channel Id to send the star board
embedCustomizableEmbeddefault embedPass a CustomizableEmbed Object to customize the embed
minnumber2The number of reactions required to list in the starboard
emojistringEmoji required as reaction to list the message on the starboard
export type starboardOption = {
embed?: CustomizableEmbed;
channelId?: string;
min?: number;
emoji?: string;

strict?: boolean;
};

Example

  • Default settings

messageReactionAdd.js
const simplydjs = require('simply-djs')

simplydjs.starboard(reaction, {
channelId: '1234567890123', // required
})

messageReactionRemove.js
simplydjs.starboard(reaction, {
channelId: '1234567890123', // required
})

messageDelete.js
simplydjs.starboard(message, {
channelId: '1234567890123', // required
})
  • Customized with options

messageReactionAdd.js
const simplydjs = require('simply-djs')

simplydjs.starboard(reaction, {
channelId: '1234567890123', // required
strict: true,
embed: {
title: "Starboard"
color: simplydjs.toRgb("#406dbc")
}
emoji: '⭐',
min: 2,
})

messageReactionRemove.js
simplydjs.starboard(reaction, {
channelId: '1234567890123', // required
strict: true,
emoji: '⭐',
min: 2,
})

messageDelete.js
simplydjs.starboard(message, {
channelId: '1234567890123', // required
strict: true,
})