diff --git a/src/foundry/client/apps/hud/chatbubble.d.ts b/src/foundry/client/apps/hud/chatbubble.d.ts index af40a9e8b..20d86feea 100644 --- a/src/foundry/client/apps/hud/chatbubble.d.ts +++ b/src/foundry/client/apps/hud/chatbubble.d.ts @@ -1,3 +1,5 @@ +import type { Socket } from "socket.io-client"; + /** * The Chat Bubble Class * This application displays a temporary message sent from a particular Token in the active Scene. @@ -31,6 +33,14 @@ declare class ChatBubbles { */ get container(): JQuery; + /** + * Create a chat bubble message for a certain token which is synchronized for display across all connected clients. + * @param token - The speaking Token Document + * @param message - The spoken message text + * @param options - Options which affect the bubble appearance + */ + broadcast(token: TokenDocument, message: string, options: ChatBubbles.ChatBubbleOptions): Promise; + /** * Speak a message as a particular Token, displaying it as a chat bubble * @param token - The speaking Token @@ -40,6 +50,12 @@ declare class ChatBubbles { */ say(token: Token, message: string, { emote }?: { emote?: boolean }): Promise; + /** + * Activate Socket event listeners which apply to the ChatBubbles UI. + * @param socket - The active web socket connection + */ + protected static _activateSocketListeners(socket: Socket): Promise; + /** * Clear any existing chat bubble for a certain Token * @internal @@ -86,4 +102,10 @@ declare namespace ChatBubbles { height: number; unconstrained: number; } + + interface ChatBubbleOptions { + cssClasses?: string; + pan: boolean; + requireVisible: false; + } }