Skip to content

Commit

Permalink
fix(blacklistAppeal): fix using wrong reply method
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Nov 6, 2024
1 parent 15bb578 commit 8f1c843
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/slash/Main/blacklist/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { logUserUnblacklist } from '#utils/hub/logger/ModLogs.js';
import { t } from '#utils/Locale.js';
import { sendBlacklistNotif } from '#utils/moderation/blacklistUtils.js';
import type { ChatInputCommandInteraction, User } from 'discord.js';
import ms from 'ms';
import BlacklistCommand from './index.js';
import ms from 'ms';

export default class extends BlacklistCommand {
async execute(interaction: ChatInputCommandInteraction) {
Expand Down
6 changes: 4 additions & 2 deletions src/interactions/BlacklistAppeal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export default class AppealInteraction {
const [type, hubId] = customId.args as ['user' | 'server', string];

const appealsConfig = await this.validateBlacklistAppealLogConfig(interaction, hubId);
if (!appealsConfig) return;

const { passedCheck } = await this.checkBlacklistOrSendError(interaction, hubId, type);
if (!appealsConfig || !passedCheck) return;
if (!passedCheck) return;

const { channelId: appealsChannelId, roleId: appealsRoleId } = appealsConfig;

Expand Down Expand Up @@ -218,7 +220,7 @@ export default class AppealInteraction {
const embed = new ErrorEmbed().setDescription(
`You can only appeal once every **${msToReadable(appealCooldown, false)}**.`,
);
await interaction.reply({ embeds: [embed], ephemeral: true });
await interaction.followUp({ embeds: [embed], ephemeral: true });
return { passedCheck: false };
}

Expand Down
3 changes: 2 additions & 1 deletion src/managers/HubSettingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import db from '#utils/Db.js';
import { Hub } from '@prisma/client';
import { EmbedBuilder } from 'discord.js';
import { InfoEmbed } from '#main/utils/EmbedUtils.js';

export default class HubSettingsManager {
private readonly hubId: string;
Expand Down Expand Up @@ -52,7 +53,7 @@ export default class HubSettingsManager {
}

get settingsEmbed(): EmbedBuilder {
const embed = new EmbedBuilder()
const embed = new InfoEmbed()
.setTitle('Hub Settings')
.setColor('#0099ff')
.setDescription('Current settings for this hub:');
Expand Down

0 comments on commit 8f1c843

Please sign in to comment.