quantum-codes @quantum-codes

I was able to fix repeating messages with @wasteof_bot by making it log recently responded commands!

If it repeats any other message then i will execute it please inform in my wall simply with the comment link.

Thanks

Oct 20, 2022, 1:42 PM
2
View all

comments

Highlighted comment

try this (this is what I did when I made a bot)

//psuedocode
listenForNewMessages(() => {
    let messages = await fetch('messages url')
    for (let i = 0; i < messages.length; i++) {
        markMessageAsRead(messages[I].id) //this ensures you only respond once
        //respond to it
    }
})

Yea but I wanted to request to wasteof as less as possible per command (one of a random aim I set)