mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-08 16:06:13 +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()
|
const source = new Readable()
|
||||||
source.push(JSON.stringify(content))
|
source.push(JSON.stringify(content))
|
||||||
source.push(null)
|
source.push(null)
|
||||||
source.pipe(dest)
|
return source.pipe(dest)
|
||||||
}
|
}
|
||||||
|
|
||||||
client.once("ready", async () => {
|
client.once("ready", async () => {
|
||||||
@@ -34,8 +34,10 @@ client.once("ready", async () => {
|
|||||||
}))
|
}))
|
||||||
const wrs = fs.createWriteStream(DESTINATION)
|
const wrs = fs.createWriteStream(DESTINATION)
|
||||||
console.log(`Fetched ${memberInfo.length} users, writing to ${DESTINATION}`)
|
console.log(`Fetched ${memberInfo.length} users, writing to ${DESTINATION}`)
|
||||||
writeS(memberInfo, wrs)
|
writeS(memberInfo, wrs).on("finish", () => {
|
||||||
process.exit(0)
|
console.log("Finished writing list")
|
||||||
|
process.exit(0)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log("Attempting to log in...")
|
console.log("Attempting to log in...")
|
||||||
|
|||||||
Reference in New Issue
Block a user