mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Starboard: use locks for checking reactions to avoid race conditions
This commit is contained in:
parent
dad7717688
commit
b9b4e2e9ed
1 changed files with 1 additions and 0 deletions
|
@ -195,6 +195,7 @@ export class StarboardPlugin extends ZeppelinPlugin<IBasePluginConfig, IStarboar
|
|||
* the required threshold. If they do, post the message in the starboard channel.
|
||||
*/
|
||||
@d.event("messageReactionAdd")
|
||||
@d.lock("starboardReaction")
|
||||
async onMessageReactionAdd(msg: Message, emoji: { id: string; name: string }) {
|
||||
if (!msg.author) {
|
||||
// Message is not cached, fetch it
|
||||
|
|
Loading…
Add table
Reference in a new issue