Compare commits

...

2 commits

Author SHA1 Message Date
1edb4d8fef Add opt out 2022-09-02 09:24:12 +02:00
8ae824f025 Update description 2022-09-02 09:24:03 +02:00
3 changed files with 9 additions and 1 deletions

View file

@ -4,7 +4,7 @@ import db from '../../models/index.js';
export default {
data: new SlashCommandBuilder()
.setName('optout')
.setDescription('Opt out of the quotation command.'),
.setDescription('Opt out of the non commands features.'),
category: 'utility',
async execute(interaction, args, client) {
const isOptOut = await db.optout.findOne({ where: { userID: interaction.user.id } });

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;