a way to delay messages
# 👀feature-requests
m
Delay messages
c
Can you please explain why this feature would be important and if you would need this on a card basis?
m
If you integrate a bot to insta and you want it to look like a human
Or Facebook
c
I see
s
Copy code
async function waitNSeconds(n) {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve()
    }, n)
  })
}

// Usage
console.log('Start waiting...')
await waitNSeconds(5000) // 5000 = 5s adjust waiting time here
paste that into an execute code card
c
Thank you @silly-france-49174 ❤️ knowing how to code just makes life easier 😉
l
@silly-france-49174 @crooked-van-25152 knowing JS is cool but having to manually add this code block each time is quite tedious can we have a dedicated card for this ? Also this only adds a a "delay" -> a "typing" motion would be 10X better IMO
c
Yes, so that's why @mysterious-cricket-72777 added it to the feature request channel.
Just wanted to tag you in the meantime, if you feel like you really need this feature.
I'm not sure if and when this will be implemented.
Make sure to upvote this feature, so it gets attention 🙂
n
Upping this, pump it
j
you can
with this CSS: async function waitNSeconds(n) { return new Promise((resolve) => { setTimeout(() => { resolve() }, n) }) } // Usage console.log('Start waiting...') await waitNSeconds(5000) // 5000 = 5s adjust waiting time here
so lets say you have 2 text nodes
and put this inbetween them in a execute card and then it will delay the next text
and thaks to my boy @wide-oyster-38514 for getting this code for everyone
c
@wide-oyster-38514 big shoutout to you for helping the community! ❤️
w
Thanks Sabrina, I appreciate it a lot🙂
w
Hi, guys, I did not understand what do you mean by CSS here, isn't is just a Javascript code? Is there a place where we can store the code, so that it can be reused?
w
It is a Javascript code, you paste it into the execute code card👍
w
@wide-oyster-38514 Thanks! But the code needs to be repeated in every execute code card, right?
w
Yes unfortunately
2 Views