knights-of-academia / horace

discord.js bot powering the Knights of Academia server with commands like info, AFK, and more
MIT License
23 stars 19 forks source link

Fix error in highlight messages caused by sending messages to undefined users #279

Closed debashisbiswas closed 3 years ago

debashisbiswas commented 3 years ago

Resolves #277 by fixing an error that was caused by attempting to send messages to users that were no longer in the server (well technically, users that were not in the UserManager cache, which was not the intended behavior anyways - fixed that too)

Resolves #271 by updating message handlers to be called independently, so that an error in one does not prevent the rest from executing. Fixing #277 as mentioned above means that the gratitude reactions, which have already been implemented, will be called regardless of errors in other handlers.

Also updated sections to use async/await syntax for readability.