This is a very simple highfive command and you need to highfive people, so I made this. It also deletes the message, so they will not get a ping when you ping them. [ex:-highfive [user] that the example]
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
let mention = context.params.event?.mentions[0]?.id;
// you can change the prefix to anything you like
if (context.params.event.content.startsWith(`-highfive`)) {
const image = await axios('https://api.waifu.pics/sfw/highfive').then((res) =>
res.data ? res.data.url : null
);
if (!mention || !mention.startsWith('')) {
mention = context.params.event.content.split(' ')[0];
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `❌ **Error: you need to mention someone! when no one is mentioned**`
});
}
await lib.discord.channels['@0.2.0'].messages.create({
content: `**Highfive People!!!!**`,
channel_id: context.params.event.channel_id,
embed: {
description: `<@${context.params.event.author.id}> highfive **${context.params.event.mentions[0].username}**`,
image: {url: image},
color: 0xffc0cb,
},
});
}
// Thanks to Kimcheng#6928 for the help