This commit is contained in:
2022-11-24 16:25:20 +01:00
parent a26fb2df12
commit def44d2774
8 changed files with 113 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ import { IsNull } from "typeorm";
import { getGuildSetting, isPremiumActive } from "../tools/data";
import getDefaultEmbed, { getFailedEmbed, getSuccessEmbed } from "../tools/defaultEmbeds";
import { getGuildChannel } from "../tools/discord";
import { Color, Emoji } from "../tools/design";
const builder = new SlashCommandBuilder();
builder.setName("blocklist");
@@ -81,7 +82,7 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
const limit = isPremium ? 100 : 10;
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");
embed.setDescription(`You reached the word limit for your guild. Please delete a word before adding a new one`);
interaction.reply({
embeds: [embed],
ephemeral: true
@@ -122,7 +123,8 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
});
const logMessage = getDefaultEmbed();
logMessage.setTitle("Word added");
logMessage.setTitle(`${Emoji.SETTINGS} Word added`);
logMessage.setColor(Color.INFORMING_BLUE);
logMessage.setDescription(`"||${word}||" has been added to the blocklist`);
logMessage.addFields({
name: "This action was performed by",
@@ -168,7 +170,8 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
}).catch();
const logMessage = getDefaultEmbed();
logMessage.setTitle("Word removed");
logMessage.setTitle(`${Emoji.SETTINGS} Word removed`);
logMessage.setColor(Color.INFORMING_BLUE);
logMessage.setDescription(`"||${word}||" has been removed from the blocklist`);
logMessage.addFields({
name: "This action was performed by",