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
Types
simplydjs.bumpReminder(
client: Client,
message: Message | bumpOptions,
options: bumpOptions
): Promise<boolean>
client:
Client
message:
Message
|bumpOptions
options:
bumpOptions
Resolves:
boolean
(fired when it sends an embed)
Options
bumpOptions
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
strict | boolean | ❌ | false | Enables strict mode in bumpReminder |
content | string | ❌ | '\u200b' | The content of message that is sent to remind (useful for a ping) |
embed | BumpReminderEmbeds | ❌ | default embeds | The embeds to remind or thank the user who bumped |
toggle | boolean | ❌ | true | Toggle the bumpReminder on or off. |
channelId | string[] | ❌ | none | Array of Channel Id to check any bump messages |
export type bumpOptions = {
strict: boolean;
content?: string;
embed?: BumpReminderEmbeds;
toggle?: boolean;
channelId?: string[];
};
BumpReminderEmbeds
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
thank | EmbedBuilder | ❌ | EmbedBuilder | Override the default thank embed with custom one |
remind | EmbedBuilder | ❌ | EmbedBuilder | Override 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
})