NO IDEA IF THIS WORKS!!!

This commit is contained in:
May 2023-05-11 20:54:32 +00:00
parent b029dc9e12
commit df44249539
2 changed files with 9 additions and 7 deletions

View file

@ -31,6 +31,7 @@ app.use("/static/js",express.static("out/client"))
app.use(cookieParser()) app.use(cookieParser())
app.use("/auth",authRoutes) app.use("/auth",authRoutes)
app.use("/admin",adminRoutes)
app.use("/files",fileApiRoutes) app.use("/files",fileApiRoutes)
// funcs // funcs

View file

@ -201,13 +201,14 @@ export default class Files {
// this code deletes the files from discord, btw // this code deletes the files from discord, btw
// if need be, replace with job queue system // if need be, replace with job queue system
if (!this.uploadChannel) {reject(); return} if (ogf&&this.uploadChannel) {
for (let x of ogf.messageids) { for (let x of ogf.messageids) {
this.uploadChannel.messages.fetch(x).then((m) => { this.uploadChannel.messages.fetch(x).then((m) => {
m.delete() m.delete()
}).catch((e) => { }).catch((e) => {
console.error(e) console.error(e)
}) })
}
} }
resolve(await this.writeFile( resolve(await this.writeFile(