adding basic reactions to discord messages

This commit is contained in:
Cadence Ember 2023-05-09 17:13:59 +12:00
parent da6603d258
commit 4d8b74f61f
4 changed files with 45 additions and 6 deletions

View file

@ -4,6 +4,8 @@ const {sync} = require("../passthrough")
/** @type {import("./actions/send-message")}) */
const sendMessage = sync.require("./actions/send-message")
/** @type {import("./actions/add-reaction")}) */
const addReaction = sync.require("./actions/add-reaction")
// Grab Discord events we care about for the bridge, check them, and pass them on
@ -22,7 +24,8 @@ module.exports = {
* @param {import("discord-api-types/v10").GatewayMessageReactionAddDispatchData} data
*/
onReactionAdd(client, data) {
if (data.emoji.id !== null) return // TOOD: image emoji reactions
console.log(data)
return {}
addReaction.addReaction(data)
}
}