Skip to main content

bumpReminder

A Very cool bump reminder system that reminds when a bump is necessary [Only Disboard].

This function requires connect() which connects to the mongo database !

Implementation

Requires you to have this in messageCreate and ready event

ready.js
simplydjs.bumpReminder(client, {
channelId: ["01234567890123"], // channelId (required)
// other options (optional)
})
INFO

When implementing in messageCreate event, It requires Message Intent !

messageCreate.js
client.on('messageCreate', async (message) => {

simplydjs.bumpReminder(client, message, {
channelId: ["01234567890123"], // channelId (required)
// other options (optional)
})

//...
})

Output

bump remind bump thank

Types

simplydjs.bumpReminder(
client: Client,
message: Message | bumpOptions,
options: bumpOptions
): Promise<boolean>

Options

bumpOptions

ParameterTypeRequiredDefaultDescription
strictbooleanfalseEnables strict mode in bumpReminder
contentstring'\u200b'The content of message that is sent to remind (useful for a ping)
embedBumpReminderEmbedsdefault embedsThe embeds to remind or thank the user who bumped
togglebooleantrueToggle the bumpReminder on or off.
channelIdstring[]noneArray of Channel Id to check any bump messages
export type bumpOptions = {
strict: boolean;
content?: string;
embed?: BumpReminderEmbeds;
toggle?: boolean;
channelId?: string[];
};

BumpReminderEmbeds

ParameterTypeRequiredDefaultDescription
thankEmbedBuilderEmbedBuilderOverride the default thank embed with custom one
remindEmbedBuilderEmbedBuilderOverride the default reminder embed with custom one
export interface BumpReminderEmbeds {
thank?: EmbedBuilder;
remind?: EmbedBuilder;
}

Example

  • Default settings

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

simplydjs.bumpReminder(client, {
channelId: ["01234567890123"]
})
messageCreate.js
const simplydjs = require('simply-djs')

simplydjs.bumpReminder(client, message, {
channelId: ["01234567890123"]
})
  • Customized with options

ready.js
const { EmbedBuilder } = require('discord.js')

const remindEmbed = new EmbedBuilder()
.setTitle("Bump this server")
.setColor(simplydjs.toRgb("#406dbc"))

simplydjs.bumpReminder(client, {
channelId: ["01234567890123"], // channelId (required)
strict: true,
content: "Bump this server",
embed: {
remind: remindEmbed
},
toggle: true
})
messageCreate.js
const { EmbedBuilder } = require('discord.js')

const thankEmbed = new EmbedBuilder()
.setTitle("Thank you")
.setColor(simplydjs.toRgb("#406dbc"))

simplydjs.bumpReminder(client, message, {
channelId: ["01234567890123"], // channelId (required)
strict: true,
content: "Bump this server",
embed: {
thank: thankEmbed
},
toggle: true
})