Skip to content

Commit 2923fac

Browse files
author
xyzjesper
committed
Fix Embed Author adding
1 parent e080150 commit 2923fac

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/modules/vanity/modals/vanity-update-author-modal.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export default {
1717
flags: MessageFlags.Ephemeral
1818
});
1919

20-
const data = await database.vanityEmbed.findFirst({
20+
const data = await database.vanityEmbedAuthor.findFirst({
2121
where: {
22-
VanityId: interaction.customId.split(":")[1]
22+
VanityEmbedsId: interaction.customId.split(":")[1]
2323
}
2424
});
2525

@@ -35,20 +35,6 @@ export default {
3535
return;
3636
}
3737

38-
if (!icon.startsWith("http") && !icon.endsWith(".png") || !icon.endsWith(".jpg") || !icon.endsWith(".jpeg")) {
39-
await interaction.editReply({
40-
content: `## ${await convertToEmojiPng("error", client.user.id)} The icon URL must be a valid image URL ending with .png, .jpg, or .jpeg.`,
41-
});
42-
return;
43-
}
44-
45-
if (!newImage.startsWith("http")) {
46-
await interaction.editReply({
47-
content: `## ${await convertToEmojiPng("error", client.user.id)} The author URL must be a valid URL starting with http.`,
48-
});
49-
return;
50-
}
51-
5238
await database.vanityEmbedAuthor.update({
5339
where: {
5440
id: data.id,

0 commit comments

Comments
 (0)