This snippet will let the bot react with custom emoji to the last message sent in the specified channel. Note that you can change the schedule of the auto-reply in the endpoint trigger.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const CHANNEL_ID = `CHANNEL_ID`; //Channel ID where emoji will be sent
const GUILD_ID = `GUILD_ID`; //Guild or Server ID
let result = await lib.discord.guilds['@0.2.4'].emojis.list({
guild_id: `${GUILD_ID}`,
});
let emoji = result[Math.floor(Math.random() * result.length)];
let emojiBuilder = `<:${emoji.name}:${emoji.id}>`;
let lastMessage = await lib.discord.channels['@0.3.2'].messages.list({
channel_id: `${CHANNEL_ID}`,
limit: 1,
});
await lib.discord.channels['@0.3.2'].messages.reactions.create({
emoji: `${emojiBuilder}`,
message_id: `${lastMessage[0].id}`,
channel_id: `${CHANNEL_ID}`,
});