Remove premium features
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ChatInputCommandInteraction, PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
|
||||
import { database, Badword } from "../data";
|
||||
import { IsNull } from "typeorm";
|
||||
import { getGuildSetting, isPremiumActive } from "../tools/data";
|
||||
import { getGuildSetting } from "../tools/data";
|
||||
import getDefaultEmbed, { getFailedEmbed, getSuccessEmbed } from "../tools/defaultEmbeds";
|
||||
import { getGuildChannel } from "../tools/discord";
|
||||
import { Color, Emoji } from "../tools/design";
|
||||
@@ -46,7 +46,6 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
|
||||
if (!interaction.guildId) throw new Error("Command was executed in DM context");
|
||||
|
||||
const settings = await getGuildSetting(interaction.guildId);
|
||||
const isPremium = isPremiumActive(settings.isPremiumUntil);
|
||||
|
||||
const logChannel = settings.notificationChannelID ? await getGuildChannel(interaction.guildId, settings.notificationChannelID) : null;
|
||||
|
||||
@@ -63,7 +62,7 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
|
||||
}
|
||||
});
|
||||
|
||||
const limit = isPremium ? 100 : 10;
|
||||
const limit = 100;
|
||||
if (count >= limit) {
|
||||
const embed = getFailedEmbed();
|
||||
embed.setDescription(`You reached the word limit for your guild. Please delete a word before adding a new one`);
|
||||
|
||||
Reference in New Issue
Block a user