ligh7hau5/commands/expand.js
2023-09-04 17:43:52 +08:00

9 lines
312 B
JavaScript

exports.runQuery = async (roomId, event, userInput) => {
return matrix.utils.fetchEncryptedOrNot(roomId, { event_id: userInput })
.then(event => matrix.utils.expandReact(event))
.catch(e => {
matrixClient.sendHtmlNotice(roomId, 'Sad!', '<strong>Sad!</strong>')
})
.catch(() => {});
};