Open kubk opened 2 hours ago
I see that addEventHandler
eventually fallbacks to new Raw({})
:
Can create a PR that either fixes addEventHandler
typings (simpler but BC break) or marks removeEventHandler
's second argument optional and loads the Raw
class
According to TypeScript it's possible to use
addEventHandler
with 1 parameter but it's not clear how to unsubscribe from it then:https://github.com/gram-js/gramjs/blob/2e8eff33c783dfd86a3fab98ab684637e33149cc/gramjs/client/TelegramClient.ts#L1111-L1123