diff --git a/src/commands/slash/Main/blacklist/list.ts b/src/commands/slash/Main/blacklist/list.ts index b78293ed..7370e531 100644 --- a/src/commands/slash/Main/blacklist/list.ts +++ b/src/commands/slash/Main/blacklist/list.ts @@ -3,7 +3,8 @@ import db from '../../../../utils/Db.js'; import BlacklistCommand from './index.js'; import { stripIndents } from 'common-tags'; import { paginate } from '../../../../utils/Pagination.js'; -import { colors } from '../../../../utils/Constants.js'; +import { colors, emojis } from '../../../../utils/Constants.js'; +import { errorEmbed } from '../../../../utils/Utils.js'; export default class ListBlacklists extends BlacklistCommand { async execute(interaction: ChatInputCommandInteraction) { @@ -22,7 +23,13 @@ export default class ListBlacklists extends BlacklistCommand { }); if (!hubInDb) { - await interaction.editReply('Unknown hub. Make sure you are the owner or a moderator of the hub.'); + await interaction.editReply({ + embeds: [ + errorEmbed( + `${emojis.no} Unknown hub. Make sure you are the owner or a moderator of the hub.`, + ), + ], + }); return; } @@ -55,7 +62,9 @@ export default class ListBlacklists extends BlacklistCommand { name: data.serverName, value: stripIndents` **ServerId:** ${data.serverId} - **Moderator:** ${moderator ? `@${moderator.username} (${hubData?.moderatorId})` : 'Unknown'} + **Moderator:** ${ + moderator ? `@${moderator.username} (${hubData?.moderatorId})` : 'Unknown' +} **Reason:** ${hubData?.reason} **Expires:** ${ !hubData?.expires ? 'Never.' : `` @@ -96,9 +105,13 @@ export default class ListBlacklists extends BlacklistCommand { name: data.username, value: stripIndents` **UserID:** ${data.userId} - **Moderator:** ${moderator ? `@${moderator.username} (${hubData?.moderatorId})` : 'Unknown'} + **Moderator:** ${ + moderator ? `@${moderator.username} (${hubData?.moderatorId})` : 'Unknown' +} **Reason:** ${hubData?.reason} - **Expires:** ${!hubData?.expires ? 'Never.' : ``} + **Expires:** ${ + !hubData?.expires ? 'Never.' : `` +} `, }); diff --git a/src/commands/slash/Main/blacklist/server.ts b/src/commands/slash/Main/blacklist/server.ts index 07ff29d7..0d0ca782 100644 --- a/src/commands/slash/Main/blacklist/server.ts +++ b/src/commands/slash/Main/blacklist/server.ts @@ -6,6 +6,7 @@ import BlacklistCommand from './index.js'; import BlacklistManager from '../../../../managers/BlacklistManager.js'; import parse from 'parse-duration'; import NetworkLogger from '../../../../structures/NetworkLogger.js'; +import { errorEmbed } from '../../../../utils/Utils.js'; export default class UserBlacklist extends BlacklistCommand { async execute(interaction: ChatInputCommandInteraction) { @@ -25,9 +26,13 @@ export default class UserBlacklist extends BlacklistCommand { }); if (!hubInDb) { - return await interaction.editReply( - `${emojis.no} Unknown hub. Make sure you are the owner or a moderator of the hub.`, - ); + return await interaction.editReply({ + embeds: [ + errorEmbed( + `${emojis.no} Unknown hub. Make sure you are the owner or a moderator of the hub.`, + ), + ], + }); } const blacklistManager = interaction.client.getBlacklistManager(); diff --git a/src/commands/slash/Main/blacklist/user.ts b/src/commands/slash/Main/blacklist/user.ts index 3706bfa5..e2dc97a4 100644 --- a/src/commands/slash/Main/blacklist/user.ts +++ b/src/commands/slash/Main/blacklist/user.ts @@ -5,6 +5,7 @@ import BlacklistManager from '../../../../managers/BlacklistManager.js'; import parse from 'parse-duration'; import { emojis } from '../../../../utils/Constants.js'; import NetworkLogger from '../../../../structures/NetworkLogger.js'; +import { errorEmbed } from '../../../../utils/Utils.js'; export default class Server extends BlacklistCommand { async execute(interaction: ChatInputCommandInteraction) { @@ -23,9 +24,13 @@ export default class Server extends BlacklistCommand { }); if (!hubInDb) { - return await interaction.editReply( - `${emojis.no} Unknown hub. Make sure you are the owner or a moderator of the hub.`, - ); + return await interaction.editReply({ + embeds: [ + errorEmbed( + `${emojis.no} Unknown hub. Make sure you are the owner or a moderator of the hub.`, + ), + ], + }); } const networkLogger = new NetworkLogger(hubInDb.id);