Skip to content

Commit becfc1c

Browse files
authored
🤖 Merge PR DefinitelyTyped#74207 [haxball-headless-browser] fix: return types, missing traits and add proper jsdoc documentation by @mertushka
1 parent aae393a commit becfc1c

File tree

3 files changed

+602
-47
lines changed

3 files changed

+602
-47
lines changed

‎types/haxball-headless-browser/haxball-headless-browser-tests.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ room.onPlayerJoin = p => {
1515
room.setPlayerAvatar(p.id, null);
1616
room.setCustomStadium(JSON.stringify(customStadium));
1717
};
18+
19+
room.onPlayerChat = (player, message) => {
20+
if (message === "!admin") {
21+
room.setPlayerAdmin(player.id, true);
22+
return false; // Filter the message
23+
}
24+
// Return nothing (void) to allow the message
25+
};

0 commit comments

Comments
 (0)