mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-09 20:03:04 +02:00
send sim messages to the proper rooms
This commit is contained in:
parent
7526d63690
commit
da6603d258
10 changed files with 38 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue