Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,10 @@ client.cooldowns = new Map();
client.helpers = { checkPermissions };
module.exports = client;

const { setupBumpReminder, handleMessage } = require("./events/notifications/bumpReminder");

// Example: configure on startup (or from a slash command)
setupBumpReminder(
"1392910932740538540",
"1467685229916455013",
"1467684301280907412" // the role to ping, e.g. @Bump Squad
);
const { loadConfig, handleMessage } = require("./events/notifications/bumpReminder");

client.on("messageCreate", (message) => {
handleMessage(client, message);
handleMessage(message);
});

async function InteractionHandler(interaction, type) {
Expand Down Expand Up @@ -170,6 +163,7 @@ client.helpers.InteractionHandler = InteractionHandler;

(async () => {
try {
loadConfig();
await Promise.all([connectToMongo(), loadEvents(client), loadComponents(client)]);

const token = process.env.DISCORD_TOKEN;
Expand Down
Loading