Skip to content

Commit

Permalink
Add available automatch information to the protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Nov 27, 2024
1 parent 90c2f90 commit 9a98b8c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engine/protocol/ClientToServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
14 changes: 14 additions & 0 deletions src/engine/protocol/ServerToClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 9a98b8c

Please sign in to comment.