2019-09-22 17:50:56 +02:00
|
|
|
const { Command } = require('discord-akairo');
|
|
|
|
const extract = require('meta-extractor');
|
|
|
|
|
|
|
|
class explosmCommand extends Command {
|
|
|
|
constructor() {
|
|
|
|
super('explosm', {
|
|
|
|
aliases: ['explosm', 'rcg'],
|
|
|
|
category: 'fun',
|
2019-11-09 12:04:01 +01:00
|
|
|
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
|
2019-09-22 17:50:56 +02:00
|
|
|
description: {
|
|
|
|
content: 'Comic randomly generated from http://explosm.net/rcg',
|
|
|
|
usage: '',
|
|
|
|
examples: ['']
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async exec(message) {
|
|
|
|
extract({ uri: 'http://explosm.net/rcg' }, (err, res) => {
|
2021-07-23 04:19:47 +02:00
|
|
|
return message.reply({files: [res.ogImage]});
|
2019-09-22 17:50:56 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
module.exports = explosmCommand;
|