forked from Supositware/Haha-Yes
delete author message and fix webm flag
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
e7f1d491cd
commit
cdab95811c
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,7 @@ class cursesCommand extends Command {
|
|||
if (args.webm) ext = '.webm';
|
||||
|
||||
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');
|
||||
downloader(link, null, `${os.tmpdir()}/${message.id}${ext}`)
|
||||
downloader(link, [`--format=${ext.replace('.', '')}`], `${os.tmpdir()}/${message.id}${ext}`)
|
||||
.on('error', async err => {
|
||||
loadingmsg.delete();
|
||||
console.error(err);
|
||||
|
@ -76,6 +76,7 @@ class cursesCommand extends Command {
|
|||
}
|
||||
|
||||
fs.writeFileSync(`${os.tmpdir()}/cursed${message.id}${ext}`, Buffer.from(endResult, 'hex'));
|
||||
message.delete();
|
||||
return message.channel.send(`Cursed by ${message.author}`, {files: [`${os.tmpdir()}/cursed${message.id}${ext}`]})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in a new issue