spammer function for testing purposes

This commit is contained in:
Andrzej Stepien 2023-08-10 12:37:18 +02:00
parent f41156c947
commit aefaaf0d11
1 changed files with 24 additions and 0 deletions

24
src/spam.mjs Normal file
View File

@ -0,0 +1,24 @@
import getNewPrompt from "./getNewPrompt.mjs"
import createNote from "./createNote.mjs"
import makeText from "./makeText.mjs"
const maxCount = 30000000
const minCount = 200000
const spam = async ()=>{
await createNote(
makeText(
await getNewPrompt({maxCount,minCount,rarityBias:0.7})
)
)
}
const delay = ms => new Promise(res=>{setTimeout(res,ms)})
do{
await delay(3000)
await spam()
console.log("SPAM!")
}while(true)