Sends a message to a channel with a random gif inside the embed.
// authenticates you with the API standard library
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const gifs = [
'https://media.giphy.com/media/QY7iideG1WpthihFty/giphy.gif',
'https://media.giphy.com/media/lNByEO1uTbVAikv8oT/giphy.gif',
'https://media.giphy.com/media/spHCUbRqG4cjS/giphy.gif',
];
const randomGif = gifs[Math.floor(Math.random() * gifs.length)];
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embed: {
type: 'rich',
title: '',
description: '',
color: 0x00ffff,
image: {
url: randomGif,
},
},
});