Sends a random quotes using my own api!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let events = context.params.event;
const axios = require('axios');
if (context.params.event.content.startsWith('!quote')) {
const {data} = await axios('https://quote.rektfx.repl.co/api/');
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: context.params.event.channel_id,
content: '',
embed: {
type: 'rich',
title: '',
description: data.quote + '\n\n **Author:** ' + data.author,
color: 0x1b00ff,
footer: {
text: `Requested by ${context.params.event.author.username}`,
},
},
});
}