Get trending gifs from giphy using the prefix command !trending. (Note : the message delivered will be the trending gif at that moment and the command might send the same gif for few minutes)
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.startsWith(`!trending`)) {
let result = await lib.giphy.trending['@0.0.6'].gifs({});
console.log(result);
let tag = result[0].url;
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${tag}`,
});
}