From 9a98b8c045cdb3c7b73b912b311a9e74f9907a1a Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 27 Nov 2024 09:17:33 -0700 Subject: [PATCH] Add available automatch information to the protocol --- src/engine/protocol/ClientToServer.ts | 6 ++++++ src/engine/protocol/ServerToClient.ts | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/engine/protocol/ClientToServer.ts b/src/engine/protocol/ClientToServer.ts index 52f43a1a..d5566e05 100644 --- a/src/engine/protocol/ClientToServer.ts +++ b/src/engine/protocol/ClientToServer.ts @@ -589,6 +589,12 @@ export interface ClientToServer extends ClientToServerBase { /** Cancel a match request */ "automatch/cancel": (data: { uuid: string }) => void; + /** Subscribe to automatch offers */ + "automatch/available/subscribe": () => void; + + /** Unsubscribe from automatch offers */ + "automatch/available/unsubscribe": () => void; + /** Updates the config for the bot */ "bot/config": (config: any) => void; diff --git a/src/engine/protocol/ServerToClient.ts b/src/engine/protocol/ServerToClient.ts index f3bb8cdf..020e034b 100644 --- a/src/engine/protocol/ServerToClient.ts +++ b/src/engine/protocol/ServerToClient.ts @@ -132,6 +132,20 @@ export interface ServerToClient { game_id: number; }) => void; + /** An automatch offer was added */ + "automatch/available/add": (data: { + uuid: string; + preferences: AutomatchPreferences; + player: { + id: number; + username: string; + }; + created: number; + }) => void; + + /** An automatch offer was removed */ + "automatch/available/remove": (uuid: string) => void; + /** User(s) joined a chat channel */ "chat-join": (data: { /** The channel */