Refactor reaction removals and add tests
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user