Print d->m errors when there is no room
This commit is contained in:
@@ -51,13 +51,15 @@ module.exports = {
|
||||
* @param {import("cloudstorm").IGatewayMessage} gatewayMessage
|
||||
*/
|
||||
async onError(client, e, gatewayMessage) {
|
||||
if (gatewayMessage.t === "TYPING_START") return
|
||||
|
||||
matrixEventDispatcher.printError(gatewayMessage.t, "Discord", e, gatewayMessage)
|
||||
|
||||
const channelID = gatewayMessage.d["channel_id"]
|
||||
if (!channelID) return
|
||||
const roomID = select("channel_room", "room_id", {channel_id: channelID}).pluck().get()
|
||||
if (!roomID) return
|
||||
|
||||
if (gatewayMessage.t === "TYPING_START") return
|
||||
|
||||
await matrixEventDispatcher.sendError(roomID, "Discord", gatewayMessage.t, e, gatewayMessage)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user