better usability
This commit is contained in:
parent
d835982972
commit
31da6d966a
1 changed files with 5 additions and 5 deletions
|
@ -14,14 +14,14 @@ class removeytpCommand extends Command {
|
||||||
clientPermissions: ['SEND_MESSAGES'],
|
clientPermissions: ['SEND_MESSAGES'],
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
id: 'filePath',
|
id: 'messageID',
|
||||||
type: 'string'
|
type: 'number'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
description: {
|
description: {
|
||||||
content: 'Delete a ytp',
|
content: 'Delete a ytp',
|
||||||
usage: '[file path]',
|
usage: '[message id]',
|
||||||
examples: ['./asset/ytp/userVid/something.mp4']
|
examples: ['some message id']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class removeytpCommand extends Command {
|
||||||
await ytpHash.destroy({where: {hash: hash}});
|
await ytpHash.destroy({where: {hash: hash}});
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.unlinkSync(args.filePath);
|
fs.unlinkSync(`./asset/ytp/userVid/${args.messageID}.mp4`);
|
||||||
return message.channel.send('Successfully removed the video.');
|
return message.channel.send('Successfully removed the video.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue