Simple command where you can react by typing <customprefix> cringe.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
if (context.params.event.content.startsWith(`${process.env.PREFIX}cringe`)) {
const image = await axios('https://api.waifu.pics/sfw/cringe').then((res) =>
res.data ? res.data.url : null
);
if (!image)
return lib.discord.channels['@0.2.0'].messages.create({
content: `Uh? Something went wrong. Please try again.`,
channel_id: context.params.event.channel_id,
});
await lib.discord.channels['@0.2.0'].messages.create({
content: `**${context.params.event.author.username}** is dying from so much cringe 😖`,
channel_id: context.params.event.channel_id,
embed: {
image: {url: image},
color: 0xffc0cb,
},
});
}