Default functions

This commit is contained in:
Daniel Odendahl Jr
2017-11-28 17:17:40 +00:00
parent 41076d933d
commit bb4c323bb7
4 changed files with 122 additions and 3 deletions
+1 -2
View File
@@ -21,14 +21,13 @@ module.exports = class YearsCommand extends Command {
key: 'user',
prompt: 'Which user would you like to edit the avatar of?',
type: 'user',
default: ''
default: msg => msg.author
}
]
});
}
async run(msg, { user }) {
if (!user) user = msg.author;
const avatarURL = user.displayAvatarURL({
format: 'png',
size: 256
+18
View File
@@ -0,0 +1,18 @@
const { Command } = require('discord.js-commando');
const facts = require('../../assets/json/fun-fact');
module.exports = class FunFactCommand extends Command {
constructor(client) {
super(client, {
name: 'fun-fact',
aliases: ['fact'],
group: 'random',
memberName: 'fun-fact',
description: 'Responds with a random fun fact.'
});
}
run(msg) {
return msg.say(facts[Math.floor(Math.random() * facts.length)]);
}
};