ToogaInc / ToogaBooga

An open-source Realm of the Mad God Discord chat bot designed for advanced cross-verification, moderation, and raid management.
MIT License
8 stars 4 forks source link

fix: bad logic in dead feedback clearing #277

Closed nyapat closed 1 year ago

nyapat commented 1 year ago

🤡

Promise.all(action that adds to local array) Promise.all(action that depends on local array)

Basically, the code was faulty because the promises ran at the same time and the condition always returned false

nyapat commented 1 year ago

epic lint "fail" image

nyapat commented 1 year ago

What is this PR fixing?

(Will approve & merge once you answer the question.)

The promises ran concurrently when getting activeraids and comparing a local array of active raids. I just dropped adding them to a local array since it's already present in the guilddoc info (no raid would be added in time, all feedbacks would be cleared). Also it became apparent that I should actually validate uuids in channel topics (I accidentally deleted a channel in a server)