Migrate all legacy commands to interactions

This commit is contained in:
Cadence Ember 2024-09-15 00:33:37 +12:00
commit 6bc3eaf866
5 changed files with 92 additions and 281 deletions

View file

@ -27,8 +27,6 @@ const updatePins = sync.require("./actions/update-pins")
const api = sync.require("../matrix/api")
/** @type {import("../discord/utils")} */
const dUtils = sync.require("../discord/utils")
/** @type {import("../discord/discord-command-handler")}) */
const discordCommandHandler = sync.require("../discord/discord-command-handler")
/** @type {import("../m2d/converters/utils")} */
const mxUtils = require("../m2d/converters/utils")
/** @type {import("./actions/speedbump")} */
@ -266,7 +264,6 @@ module.exports = {
// @ts-ignore
await sendMessage.sendMessage(message, channel, guild, row),
await discordCommandHandler.execute(message, channel, guild)
retrigger.messageFinishedBridging(message.id)
},
@ -313,7 +310,6 @@ module.exports = {
*/
async onReactionAdd(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.
discordCommandHandler.onReactionAdd(data)
await addReaction.addReaction(data)
},