diff --git a/package-lock.json b/package-lock.json index 26ff706..c967b53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "denim_3001", - "version": "3001.42.0", + "version": "3001.42.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "denim_3001", - "version": "3001.42.0", + "version": "3001.42.1", "license": "ISC", "dependencies": { "@discordjs/voice": "^0.11.0", diff --git a/package.json b/package.json index d3c44b5..a89e021 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "denim_3001", - "version": "3001.42.0", + "version": "3001.42.1", "description": "Toto je velmi kvalitní bot.", "repository": { "url": "https://github.com/Histmy/Denim-Bot/" diff --git a/src/modules/spink.ts b/src/modules/spink.ts index ceafed1..3c1a428 100644 --- a/src/modules/spink.ts +++ b/src/modules/spink.ts @@ -121,8 +121,6 @@ const exp: Modul = { if (Number.isNaN(from) || Number.isNaN(to)) return "cislo musy bit v formate xh xm xs"; if (to <= from) return "ja teda nevim jestli ti vys jak funguje cas ael vym ze tam mas chibu"; - console.log("vybiram mezi", from, "a", to); - rozdil = to - from; min = from; } diff --git a/src/modules/status.ts b/src/modules/status.ts index 9f87f23..f8300c6 100644 --- a/src/modules/status.ts +++ b/src/modules/status.ts @@ -41,7 +41,11 @@ const statusOnFoun = (bef: FakePresence | null, aft: FakePresence) => { [bef, aft].forEach((s, i) => { const mobile = s.clientStatus?.mobile; - if (mobile && mobile !== s.clientStatus?.desktop) { + const deskotopy = s.clientStatus?.web + ? s.clientStatus.desktop == "online" ? s.clientStatus.desktop : s.clientStatus.web + : s.clientStatus?.desktop; + + if (mobile && mobile != deskotopy && deskotopy == "idle") { predAPo[i] = `${role[mobile]}Phone` as StatusyINaFounu; } else { predAPo[i] = role[s.status] as StatusyINaFounu; diff --git a/src/utils/types.ts b/src/utils/types.ts index 61e8c99..d885d27 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -52,7 +52,7 @@ export interface Spinkackar { export interface FakePresence { status: "online" | "idle" | "dnd" | "offline"; - clientStatus: ClientPresenceStatusData; + clientStatus?: ClientPresenceStatusData; } export interface UserChange {