Skip to content

Commit 8a2125e

Browse files
committed
docs: update cancellation message for moderators and streamline error handling
1 parent 3928968 commit 8a2125e

File tree

4 files changed

+1769
-1770
lines changed

4 files changed

+1769
-1770
lines changed

packages/bot/src/commands/tools/edit.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,14 @@ async function avatar(
224224
files = Array.from(new Set(files.map((f) => f.name))).map(
225225
(name) => files.find((f) => f.name === name)!
226226
);
227-
console.log(avatarURL);
228227
}
229228
if (!avatarURL || !verifyAvatarUrl(avatarURL))
230229
return await reply(interaction, {
231230
embeds: [embedError(ul("error.avatar.url"), ul)],
232231
});
233232
const embed = getEmbeds(message, "user");
234-
if (!embed) {
235-
// noinspection ExceptionCaughtLocallyJS
236-
throw new Error(ul("error.embed.notFound"));
237-
}
233+
if (!embed) throw new Error(ul("error.embed.notFound"));
234+
238235
embed.setThumbnail(avatarURL);
239236

240237
const embedsList = getEmbedsList({ embed, which: "user" }, message);

packages/bot/src/features/dice/validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ export async function cancelDiceAddModeration(
652652

653653
await interaction.message.delete();
654654
await reply(interaction, {
655-
content: ul("modals.cancelled"),
655+
content: ul("modals.cancelled_moderator"),
656656
flags: Djs.MessageFlags.Ephemeral,
657657
});
658658
//send a message to the user that the edition has been cancelled

0 commit comments

Comments
 (0)