Files
xiao/commands/response/motivate.js
T
Daniel Odendahl Jr 76907549df The Power of const
2017-04-03 22:31:19 +00:00

33 lines
1.1 KiB
JavaScript

const commando = require('discord.js-commando');
module.exports = class MotivateCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'motivate',
aliases: [
'encourage',
'justdoit'
],
group: 'response',
memberName: 'motivate',
description: 'Motivates someone. (;motivate @User)',
examples: [';motivate @User'],
args: [{
key: 'thing',
prompt: 'What do you want to motivate?',
type: 'string',
default: ''
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
const userToMotivate = args.thing || message.author;
return message.say(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
}
};