diff --git a/events/client/messageReactionAdd.js b/events/client/messageReactionAdd.js index cb0b6ba..dd80c13 100644 --- a/events/client/messageReactionAdd.js +++ b/events/client/messageReactionAdd.js @@ -1,5 +1,6 @@ import { EmbedBuilder } from 'discord.js'; import fs from 'node:fs'; +import db from '../../models/index.js'; global.boards = {}; export default { @@ -19,6 +20,9 @@ export default { }); } + const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author } }); + if (isOptOut) return; + let starboardChannel, shameboardChannel; let reactionCount = reaction.count; diff --git a/events/client/messageReactionRemove.js b/events/client/messageReactionRemove.js index 9ed92d2..f3326c3 100644 --- a/events/client/messageReactionRemove.js +++ b/events/client/messageReactionRemove.js @@ -1,5 +1,6 @@ import { EmbedBuilder } from 'discord.js'; import fs from 'node:fs'; +import db from '../../models/index.js'; global.boards = {}; export default { @@ -19,6 +20,9 @@ export default { }); } + const isOptOut = await db.optout.findOne({ where: { userID: reaction.message.author } }); + if (isOptOut) return; + let starboardChannel, shameboardChannel; let reactionCount = reaction.count;