#I want to add custom (typed) events to the Client class.

1 messages · Page 1 of 1 (latest)

candid lake

So i have this class that extends the Client class and it just adds some utilities i use. I want to add a few more events to that extending class.

Now usually this would be no problem as I just emit using the already baked-in EventEmitter in the Client class. However, I would like to additionally add typings using the same already integrated system that DJS uses.

Is this even possible?

FYI, by typings i mean types for the parameters when i listen to an event:

clientV2.on("customEventName", (thisIsTypedAutomatically) => {...});