bogoslovniy Posted July 20, 2020 Posted July 20, 2020 I have a custom chat with chatAPI var chatAPI = { push: (message) => {...}, clear: ()=> {...}, activate: (toggle) => {...}, show: (toggle) => {...} } In 1.1.0 added new chat API initerface let api = {"chat:push": chatAPI.push, "chat:clear": chatAPI.clear, "chat:activate": chatAPI.activate, "chat:show": chatAPI.show}; for(let fn in api) { mp.events.add(fn, api[fn]); } Where do I put this piece of code to make my custom chat work? I put it in a file with an API, called it as a separate function, called from Client-side, added this new events to Client-side, but nothing helped.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now