Add opt out

This commit is contained in:
Supositware 2022-09-02 09:24:12 +02:00
parent 8ae824f025
commit 1edb4d8fef
2 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -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;