This command lets you "kiss" a member of your server by typing your bot's prefix followed by "kiss <mentioned user>". It sends them a GIF and tells the mentioned user that you've kissed them. Easily change this command by editing lines 4 and 8 and changing the description on line 21 and 22. For a full list of possible uses please refer to https://waifu.pics/docs
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
if (context.params.event.content.startsWith(`${process.env.PREFIX}kiss`)) {
const author = context.params.event.mentions.length
? context.params.event.mentions[0]
: context.params.event.author;
const image = await axios('https://api.waifu.pics/sfw/kiss').then((res) =>
res.data ? res.data.url : null
);
if (!image)
return lib.discord.channels['@0.2.0'].messages.create({
content: `Error. Something went wrong.`,
channel_id: context.params.event.channel_id,
});
await lib.discord.channels['@0.2.0'].messages.create({
content:
author.id === context.params.event.author.id
? `<@${author.id}> kissed themselves.`
: `<@${context.params.event.author.id}> kissed <@${author.id}>`,
channel_id: context.params.event.channel_id,
embed: {
image: {url: image},
color: 0xbb00ff,
},
});
}