mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
fixed problematic fetchusers script
This commit is contained in:
committed by
Jean-Philippe Sirois
parent
8107b68021
commit
079185e3cc
@@ -18,7 +18,7 @@ const writeS = (content, dest) => {
|
||||
const source = new Readable()
|
||||
source.push(JSON.stringify(content))
|
||||
source.push(null)
|
||||
source.pipe(dest)
|
||||
return source.pipe(dest)
|
||||
}
|
||||
|
||||
client.once("ready", async () => {
|
||||
@@ -34,8 +34,10 @@ client.once("ready", async () => {
|
||||
}))
|
||||
const wrs = fs.createWriteStream(DESTINATION)
|
||||
console.log(`Fetched ${memberInfo.length} users, writing to ${DESTINATION}`)
|
||||
writeS(memberInfo, wrs)
|
||||
process.exit(0)
|
||||
writeS(memberInfo, wrs).on("finish", () => {
|
||||
console.log("Finished writing list")
|
||||
process.exit(0)
|
||||
})
|
||||
})
|
||||
|
||||
console.log("Attempting to log in...")
|
||||
|
||||
Reference in New Issue
Block a user