Get comic from http://explosm.net/rcg
This commit is contained in:
parent
56b6b7f324
commit
72c569af1d
1 changed files with 24 additions and 0 deletions
24
commands/fun/explosm.js
Normal file
24
commands/fun/explosm.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
const { Command } = require('discord-akairo');
|
||||
const extract = require('meta-extractor');
|
||||
|
||||
class explosmCommand extends Command {
|
||||
constructor() {
|
||||
super('explosm', {
|
||||
aliases: ['explosm', 'rcg'],
|
||||
category: 'fun',
|
||||
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.channel.send({files: [res.ogImage]});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
module.exports = explosmCommand;
|
Loading…
Reference in a new issue