Adding ability to listen to user types chat messages using WA.onChatMessage

This commit is contained in:
David Négrier 2021-03-06 15:26:07 +01:00
parent 5178dff108
commit e927e0fa16
7 changed files with 82 additions and 10 deletions

View file

@ -0,0 +1,10 @@
import * as tg from "generic-type-guard";
export const isUserInputChatEvent =
new tg.IsInterface().withProperties({
message: tg.isString,
}).get();
/**
* A message sent from the game to the iFrame when a user types a message in the chat.
*/
export type UserInputChatEvent = tg.GuardedType<typeof isUserInputChatEvent>;