Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.74 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.74 KB

GitHub release GitHub release (latest by SemVer and asset)

ko-fi

Customizable Chat Tabs

Splits the Chatlog into tabs that can be customized.

You can set the message types that will show up on each tab, and you can set messages to be exclusive to the tabs they're being posted.

Integration

Your module should hook on the chat-tabs.init hook and call on the game.chatTabs.register() function.

Example:

Hooks.on("chat-tabs.init", () => {
	const data = {
		key: "custom-module",
		label: "Custom Module Messages", // Optional, if key is the module's id, its title will be used. Otherwise, defaults to the key value.
		hint: "Custom Module's messages which are sent when something happens.", // Optional
	};
	game.chatTabs.register(data);
});

Any messages created by your module should include a "chat-tabs" flag with a "module" property that matches the registered key. These will show up on the tabs the users have set to be shown.

await ChatMessage.create({
	content: "Hello world",
	flags: {
		"chat-tabs": {
			module: "custom-module",
		},
	},
});

Attribution

This is a fork of Tabbed Chatlog.