Remove premium features

This commit is contained in:
2022-11-29 01:56:51 +01:00
parent 361326c31e
commit ee9039c239
8 changed files with 12 additions and 69 deletions
+2 -3
View File
@@ -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`);