forked from Supositware/Haha-Yes
supositware
dfd25c8bf2
mostly replacing message.channel.send with message.reply ( i hope it work this time... )
25 lines
No EOL
593 B
JavaScript
25 lines
No EOL
593 B
JavaScript
const { Command } = require('discord-akairo');
|
|
const extract = require('meta-extractor');
|
|
|
|
class explosmCommand extends Command {
|
|
constructor() {
|
|
super('explosm', {
|
|
aliases: ['explosm', 'rcg'],
|
|
category: 'fun',
|
|
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
|
|
description: {
|
|
content: 'Comic randomly generated from http://explosm.net/rcg',
|
|
usage: '',
|
|
examples: ['']
|
|
}
|
|
});
|
|
}
|
|
|
|
async exec(message) {
|
|
extract({ uri: 'http://explosm.net/rcg' }, (err, res) => {
|
|
return message.reply({files: [res.ogImage]});
|
|
});
|
|
}
|
|
|
|
}
|
|
module.exports = explosmCommand; |