21 lines
559 B
JavaScript
21 lines
559 B
JavaScript
var fs = require('fs-extra');
|
|
|
|
module.exports = (bot, trigger, lib) => {
|
|
trigger.add({
|
|
name: 'thumbnailer',
|
|
call: /^\!thumb (\d+)$/i,
|
|
level: 100,
|
|
active: 1,
|
|
func: (e) => {
|
|
var id = e.message.split(' ')[1];
|
|
if(Number.isInteger(parseInt(id))) {
|
|
fs.unlink('./t/'+id+'.png', () => {
|
|
//e.reply('debug: Thumbnail gelöscht');
|
|
lib.generateThumbs();
|
|
//e.reply('debug: sollte Thumbnail generiert haben');
|
|
});
|
|
}
|
|
},
|
|
desc: 'regenerate thumbnail'
|
|
});
|
|
}; |