Auto Remove
This commit is contained in:
parent
538d13b19c
commit
3bc0746b94
|
@ -80,7 +80,6 @@ async function processChannel(client: Client, channel: TextChannel) {
|
|||
let buff = await fs.readFile(file);
|
||||
let p = path.basename(file);
|
||||
|
||||
|
||||
let msgAttachment = new MessageAttachment(buff, p);
|
||||
|
||||
await (await channel.send({
|
||||
|
@ -89,6 +88,11 @@ async function processChannel(client: Client, channel: TextChannel) {
|
|||
]
|
||||
}));
|
||||
|
||||
await fs.unlink(file)
|
||||
.catch( err => {
|
||||
console.error(`[😡] Could not delete ${file}`);
|
||||
})
|
||||
|
||||
await new Promise((_r, _e) => {
|
||||
setTimeout( () => {
|
||||
_r('asd');
|
||||
|
|
Reference in New Issue