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

View File

@ -1,6 +1,6 @@
import client from "../client";
import { Events } from "discord.js";
import { getGuildSetting, isPremiumActive } from "../tools/data";
import { getGuildSetting } from "../tools/data";
import { Badword, database } from "../data";
import { IsNull } from "typeorm";
import getDefaultEmbed, { getFailedEmbed } from "../tools/defaultEmbeds";
@ -14,7 +14,6 @@ client.on(Events.ChannelUpdate, async (oldChannel, newChannel) => {
const guild = oldChannel.guild;
const settings = await getGuildSetting(guild.id);
const isPremium = isPremiumActive(settings.isPremiumUntil);
const globalBlocklist = await database.getRepository(Badword).find({
where: {
@ -69,7 +68,7 @@ client.on(Events.ChannelUpdate, async (oldChannel, newChannel) => {
embed.setTitle(`${Emoji.SECURITY_CHALLENGE_FAILED} Blocked word detected`);
embed.setDescription(`<#${newChannel.id}> (${newChannel.id}) has been renamed because its name contained a blocked word.`);
embed.setColor(Color.WARNING_YELLOW);
if (isPremium) embed.addFields({
embed.addFields({
name: "Detected banned word:",
value: `||${found}||`,
inline: true