Closed TheComamba closed 5 months ago
I want to remove the chat command feature for the following reasons:
I did that in #65.
Hjep, getting more complicated again. To post a message, we need to call the processMessage function on ChatLog. For that, we need to get the ChatLog. And as this function only takes the message as argument, setting the speaker will be a small challenge. Maybe we can work with a hook.
Kinda hacky but works now. In triggerResponse now creates a new ChatLog().processMessage("#TeamEmilia" + JSON.stringify(chatData))
, where chatData encodes response + message type + actor name. #TeamEmilia
is used as a stop word for triggering logic in our overridden version of ChatMessage._preCreate
.
This would be much preferable to the hack we currently use.
There is the ChatMessageRender hook.
One issue is that the text is scanned for chat commands, and our /alias command clashes with that.
So maybe we do the text replacement in ChatMessage, and trigger calculating the response in ChatMessageRender.
How do we know if the text contained an unkenny command?
Maybe we need to rethink if we really want to use the /alias Syntax. We are about to release breaking changes, so now would be the time to do that.