Manages callbacks that are connected to an event that fires before modified chat messages are sent.

These callbacks are triggered by the chat ranks system of the add-on, if the chat ranks system is disabled these callbacks will never fire.

function preventMessagesContainingHerobrine() {
const chatCallback = Events.andexdb.beforeEvents.modifiedChatMessageSend.subscribe(`(eventData) => {
if (eventData.message.includes("Herobrine")) {
eventData.cancel = true;
}
}`);
}
function replaceEveryAInMessagesIncludingNameTagsAndRanksWithB() {
const chatCallback = Events.andexdb.beforeEvents.modifiedChatMessageSend.subscribe(`(eventData) => {
eventData.message = eventData.message.replaceAll("a", "b");
}`);
}

Constructors

Properties

Methods

Constructors

Properties

callbacks: (arg0: andexdb_ModifiedChatMessageSendBeforeEvent) => void[] = []

The callbacks that will be called before new modified chat messages are sent.

Methods