How can I add a cover image to a Discord Scheduled Event?

Viewed 140

I have created an event through the Discord JS Library, and would like to add a user option to add a cover image.

The code below is working fine, but the image isn't being added to the event. Any help would be great, thank you.

const event = await interaction.guild.scheduledEvents.create({
        name: name,
        description: description,
        image: 'https://i.imgur.com/2nvP4Lm.jpeg',
        scheduledStartTime: new Date(`${eventDate} ${startTime}`),
        scheduledEndTime: new Date(`${eventDate} ${endTime}`),
        privacyLevel: 2,
        entityType: 'EXTERNAL',
        entityMetadata: {
            location: location
        }
    });
1 Answers

So the first thing you are going to want to do is update your discord to v13.7.0 which just came out yesterday

npm i discord.js@latest

Then your code will work as is. Per github: Bug Fixes

GuildScheduledEvent: Handle missing image for v13 (#7627) (dfea9c2)

Related