Auto Remove
This commit is contained in:
@@ -80,7 +80,6 @@ async function processChannel(client: Client, channel: TextChannel) {
|
|||||||
let buff = await fs.readFile(file);
|
let buff = await fs.readFile(file);
|
||||||
let p = path.basename(file);
|
let p = path.basename(file);
|
||||||
|
|
||||||
|
|
||||||
let msgAttachment = new MessageAttachment(buff, p);
|
let msgAttachment = new MessageAttachment(buff, p);
|
||||||
|
|
||||||
await (await channel.send({
|
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) => {
|
await new Promise((_r, _e) => {
|
||||||
setTimeout( () => {
|
setTimeout( () => {
|
||||||
_r('asd');
|
_r('asd');
|
||||||
|
|||||||
Reference in New Issue
Block a user