Remove premium features
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user