mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 12:22:50 +02:00
Refactor reaction removals and add tests
This commit is contained in:
parent
dc92dc0b69
commit
bf0691f9bb
6 changed files with 318 additions and 102 deletions
|
@ -155,14 +155,8 @@ const utils = {
|
|||
} else if (message.t === "MESSAGE_REACTION_ADD") {
|
||||
await eventDispatcher.onReactionAdd(client, message.d)
|
||||
|
||||
} else if (message.t === "MESSAGE_REACTION_REMOVE") {
|
||||
await eventDispatcher.onReactionRemove(client, message.d)
|
||||
|
||||
} else if (message.t === "MESSAGE_REACTION_REMOVE_EMOJI") {
|
||||
await eventDispatcher.onReactionEmojiRemove(client, message.d)
|
||||
|
||||
} else if (message.t === "MESSAGE_REACTION_REMOVE_ALL") {
|
||||
await eventDispatcher.onRemoveAllReactions(client, message.d)
|
||||
} else if (message.t === "MESSAGE_REACTION_REMOVE" || message.t === "MESSAGE_REACTION_REMOVE_EMOJI" || message.t === "MESSAGE_REACTION_REMOVE_ALL") {
|
||||
await eventDispatcher.onSomeReactionsRemoved(client, message.d)
|
||||
}
|
||||
} catch (e) {
|
||||
// Let OOYE try to handle errors too
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue