const fn = require('../functions.js'); module.exports = { name: 'request', description: 'Submit a request to the bot developer.', usage: '.request', execute(message, commandData) { // Get the request information from the command data that was passed in const requestText = commandData.args; const messageUrl = message.url; const requester = message.author.username; try { fn.upload.request(requester, requestText, messageUrl, message.client); // Set the content to sent a text embed notifying the user of success commandData.content = `Your request has been submitted!\nRequest: ${request}`; message.reply(fn.embeds.text(commandData)); } catch(err) { console.error(err); commandData.content = "An error occurred while saving the request, please try again later."; message.reply(fn.embeds.text(commandData)); } }, };