send sim messages to the proper rooms

This commit is contained in:
Cadence Ember
2023-05-09 15:29:46 +12:00
parent 7526d63690
commit da6603d258
10 changed files with 38 additions and 10 deletions

View File

@@ -6,15 +6,16 @@ const DiscordTypes = require("discord-api-types/v10")
const passthrough = require("../passthrough")
const { sync } = passthrough
/** @type {typeof import("./event-dispatcher")} */
const eventDispatcher = sync.require("./event-dispatcher")
const utils = {
/**
* @param {import("./discord-client")} client
* @param {import("cloudstorm").IGatewayMessage} message
*/
onPacket(client, message) {
// requiring this later so that the client is already constructed by the time event-dispatcher is loaded
/** @type {typeof import("./event-dispatcher")} */
const eventDispatcher = sync.require("./event-dispatcher")
if (message.t === "READY") {
if (client.ready) return
client.ready = true