const { sendMessage } = require('../api'); const { ADMIN_GROUP_IDS } = require('../config'); const { safeExec } = require('../helpers'); const reportError = safeExec(async (context, err) => { const msg = `🚨 Errore in ${context}\n
${err.stack || err.message}
`; for (const id of ADMIN_GROUP_IDS) { await sendMessage(id, msg); } }); module.exports = { reportError };