nodbot/dot-commands/request.js

18 lines
729 B
JavaScript
Raw Permalink Normal View History

2021-09-22 17:15:31 +00:00
const fn = require('../functions.js');
module.exports = {
name: 'request',
description: 'Submit a request to the bot developer.',
usage: '<request or feedback>.request',
execute(message, commandData) {
const request = commandData.args;
commandData.content = `Your request has been submitted!\nRequest: ${request}`;
2022-12-16 20:50:48 +00:00
commandData.requestUrl = message.url;
2021-09-22 17:15:31 +00:00
message.reply(fn.embeds.text(commandData));
commandData.content = `A new request has been submitted by ${message.author.tag}:\n${commandData.args}`;
message.client.users.fetch(process.env.ownerID).then(user => {
user.send(fn.embeds.text(commandData));
}).catch(error => { console.error(error); });
fn.upload.request(commandData, message.client);
},
};