diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2024-09-28 15:48:10 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2024-09-28 15:48:10 +0200 |
| commit | 7d92a424b6fe5e0361c1222d524822b04820507a (patch) | |
| tree | caaddd1c54a709db55162c825a200c9d27a07bef /src/index.ts | |
| parent | def14c0f2187f61bcef00f1298fcc60743b44c1b (diff) | |
| download | IRC-master.tar.gz IRC-master.tar.zst IRC-master.zip | |
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts index c101b0f..1322659 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,8 @@ import Messages, { Message } from "Modules/messages"; import Helpers from "Modules/helpers"; export default class Irc { + static quit = false; + private username: string; private color: string; private readonly messages = new Messages(); @@ -36,6 +38,9 @@ export default class Irc { } async poll(): Promise<void> { + if (Irc.quit === true) { + return; + } fetch(this.messages.url + "poll") .then(async res => { const msg = await res.json(); |
