Closed kyanny closed 2 years ago
Currently, there are two ways to avoid this error.
The easiest way is to use client.disconnect()
instead of client.quit()
(but you lose the ability to pass quit message):
client.on("join", (msg) => {
if (msg.channel === "#general") {
client.privmsg("#general", "Hello world!");
}
client.disconnect(); // <-- instead of client.quit()
});
If you still want to use client.quit()
, you can add an error listener like that:
client.on("error", (err) => {
if (err.type === "read" && err.name === "Interrupted") return;
throw err;
});
This behavior needs to be fixed, thank you for noticing it 👍
Thank you for providing workarounds, @jeromeludmann! Both works perfect to me. 👍
Hi, when I ran the following code, it exits with the error. The code is almost same to https://github.com/jeromeludmann/deno-irc#usage and I added
client.quit();
. How can I properly quit from the IRC channel and disconnect from the IRC server?