Hotfix: Check if remix file has a file type

This commit is contained in:
Ninjdai1 2023-09-10 09:09:12 +02:00
parent c36304da5b
commit a8cbfc050f

View File

@ -4,7 +4,7 @@ const { AttachmentBuilder } = require('discord.js')
module.exports = {
async execute(interaction){
const file = interaction.options.getAttachment('image');
if(!file.contentType.startsWith("image")) return interaction.reply({ content: "Merci d'envoyer une image", ephemeral: true });
if(!file.contentType || !file.contentType.startsWith("image")) return interaction.reply({ content: "Merci d'envoyer une image", ephemeral: true });
await interaction.deferReply();
const filter = interaction.options.getString('filter');