forked from cadence/out-of-your-element
Other kinds of reaction removals
This commit is contained in:
parent
c3040f19c2
commit
c1cbdfee82
5 changed files with 151 additions and 42 deletions
|
@ -214,13 +214,28 @@ module.exports = {
|
|||
|
||||
/**
|
||||
* @param {import("./discord-client")} client
|
||||
* @param {import("discord-api-types/v10").GatewayMessageReactionAddDispatchData} data
|
||||
* @param {import("discord-api-types/v10").GatewayMessageReactionRemoveDispatchData} data
|
||||
*/
|
||||
async onReactionRemove(client, data) {
|
||||
if (data.user_id === client.user.id) return // m2d reactions are added by the discord bot user - do not reflect them back to matrix.
|
||||
await removeReaction.removeReaction(data)
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {import("./discord-client")} client
|
||||
* @param {import("discord-api-types/v10").GatewayMessageReactionRemoveEmojiDispatchData} data
|
||||
*/
|
||||
async onReactionEmojiRemove(client, data) {
|
||||
await removeReaction.removeEmojiReaction(data)
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {import("./discord-client")} client
|
||||
* @param {import("discord-api-types/v10").GatewayMessageReactionRemoveAllDispatchData} data
|
||||
*/
|
||||
async onRemoveAllReactions(client, data) {
|
||||
await removeReaction.removeAllReactions(data)
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {import("./discord-client")} client
|
||||
* @param {import("discord-api-types/v10").GatewayMessageDeleteDispatchData} data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue