Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Event list ? #137

Open
KaKi87 opened this issue Apr 26, 2023 · 0 comments
Open

[Question] Event list ? #137

KaKi87 opened this issue Apr 26, 2023 · 0 comments

Comments

@KaKi87
Copy link

KaKi87 commented Apr 26, 2023

Hello,

The README mentions two events, update and error :

tdl/README.md

Lines 162 to 175 in 1e1401e

#### `client.on(event: string, callback: Function) => Client`
Attach an event listener to receive updates.
```javascript
function onUpdate (update) {
console.log('New update:', update)
}
client.on('update', onUpdate)
client.on('error', console.error)
```
Ideally, you should always have a listener on `client.on('error')`.
There is no default listener, all errors will be ignored otherwise.

Would it be possible to write an exhaustive list ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant