diff --git a/commands/burn.js b/commands/burn.js index 8ae2df2..9daf24d 100644 --- a/commands/burn.js +++ b/commands/burn.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, AttachmentBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType } = require("discord.js"); const { Card, User, Group, Character } = require("../models"); -const { QUALITY_VALUES, QUALITY_NAMES, CURRENCY_SYMBOLS } = require("../config/constants"); +const { QUALITY_VALUES, QUALITY_NAMES, CURRENCY_SYMBOLS, PATREON } = require("../config/constants"); const { UserUtils } = require("../util"); const fs = require("fs"); const edit = require("./edit"); @@ -42,6 +42,10 @@ module.exports = { interaction.editReply({ content: "This card is already burned" }); return; } + if (card.Character.Group.id == PATREON.customsGID) { + interaction.editReply({ content: "Custom cards can't be burned" }); + return; + } const embed = new EmbedBuilder() .setTitle(`${interaction.member.displayName} burned ${card.identifier}`) diff --git a/commands/drop.js b/commands/drop.js index 0f2c9cf..1ca576a 100644 --- a/commands/drop.js +++ b/commands/drop.js @@ -2,7 +2,7 @@ const { SlashCommandBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, Compo const { Card, User, Character, DropHistory, Wishlist, sequelize } = require("../models"); const { customAlphabet } = require("nanoid"); const { CardUtils, UserUtils, ReplyUtils, GeneralUtils, Rendering } = require("../util"); -const { QUALITY } = require("../config/constants"); +const { QUALITY, PATREON } = require("../config/constants"); const Sequelize = require('sequelize'); const card = require("../models/card"); @@ -33,7 +33,8 @@ module.exports = { const cards = []; let characters = await Character.findAll({ where: { - enabled: true + enabled: true, + groupId: { [Sequelize.Op.not] : PATREON.customsGID } }, order: sequelize.random(), limit: 3 diff --git a/config/constants.js b/config/constants.js index 8f97eed..19802d1 100644 --- a/config/constants.js +++ b/config/constants.js @@ -70,6 +70,7 @@ const DAILY_REWARDS = { const PATREON = { roleServer : '441300798819794944', + customsGID : 4, tiers : { 1 : { modifiers: {