Closed TiagoJacobs closed 9 months ago
This data consumption hook will allow the plugin to get all the currently loaded chat messages (of the focused chat).
This is meant to allow a plugin to observe the chat messages of current chat and take action based on it.
Example actions:
Sample implementation:
alert(`User ${sender} sent a hello at ${time}`)
PluginApi.useLoadedChatMessages( (chatMsg) => { if(chatMsg.content.indexOf("Hello") != -1) alert(...); })
This data consumption hook will allow the plugin to get all the currently loaded chat messages (of the focused chat).
This is meant to allow a plugin to observe the chat messages of current chat and take action based on it.
Example actions:
Sample implementation:
alert(`User ${sender} sent a hello at ${time}`)
whenever a chat message containing the "Hello" text appears