When you type "!fortnite-news", it will send battle royale updates in a gif! Credits to CTK Warrior for giving me this idea :)
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
require('fortnite-api')
const news = `https://cdn.fortnite-api.com/news/v2/30303832b897b7bdb169510e1f384ea4d46f5089.gif`;
if (context.params.event.content.startsWith('!fortnite-news')) {
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: context.params.event.channel_id,
content: `<@!${context.params.event.author.id}> here's the news! \n ${news}`,
});
}
console.log(`The person recieved the message`);