also i might use prismarine-chat but too lazy
This commit is contained in:
ChomeNS 2023-01-22 13:43:53 +07:00
parent 76ea644bf8
commit 158eabaa45

View file

@ -80,8 +80,8 @@ function inject (bot, dcclient, config) {
target.on('error', () => {})
target.on('end', targetEndListener)
target.on('kick_disconnect', targetEndListener)
target.on('disconnect', targetEndListener)
target.on('kick_disconnect', ({ reason }) => targetEndListener(JSON.parse(reason)))
target.on('disconnect', ({ reason }) => targetEndListener(JSON.parse(reason)))
function targetEndListener (reason) {
target.end()