Open MateoMax-hub opened 11 months ago
this works for me, @mimamch if you need me to make any changes on this pr, request them freely i will look into it, and if you don't want this change on your project it's fine too i can use it from my forked repository. I'm also planning on a function to get the labels created
i added a listener for labels.edit too
FEATURE: event for labels.association are now assigned to a a new listener "ON_LABEL_ASSOCIATION" and used on the function "onLabelAssociation", the function will receive a callback to execute each time the events get triggered (adding o removing a label on a chat), in the parameters of the callback you will receive an obj like this:
type can be add or remove depending if you are adding or removing a label, and labelId is an id for the label selected to do this event, i'm planning on making a function to get the labels an maybe i can at that point integrate it with this so you can get the labelId and it's name too