Status now more acurate after fekal discord update

This commit is contained in:
Histmy 2022-09-26 18:44:20 +02:00
parent 24d25403c0
commit dddc49db8d
5 changed files with 9 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.42.0", "version": "3001.42.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.42.0", "version": "3001.42.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/voice": "^0.11.0", "@discordjs/voice": "^0.11.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.42.0", "version": "3001.42.1",
"description": "Toto je velmi kvalitní bot.", "description": "Toto je velmi kvalitní bot.",
"repository": { "repository": {
"url": "https://github.com/Histmy/Denim-Bot/" "url": "https://github.com/Histmy/Denim-Bot/"

View File

@ -121,8 +121,6 @@ const exp: Modul = {
if (Number.isNaN(from) || Number.isNaN(to)) return "cislo musy bit v formate xh xm xs"; 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"; 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; rozdil = to - from;
min = from; min = from;
} }

View File

@ -41,7 +41,11 @@ const statusOnFoun = (bef: FakePresence | null, aft: FakePresence) => {
[bef, aft].forEach((s, i) => { [bef, aft].forEach((s, i) => {
const mobile = s.clientStatus?.mobile; 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; predAPo[i] = `${role[mobile]}Phone` as StatusyINaFounu;
} else { } else {
predAPo[i] = role[s.status] as StatusyINaFounu; predAPo[i] = role[s.status] as StatusyINaFounu;

View File

@ -52,7 +52,7 @@ export interface Spinkackar {
export interface FakePresence { export interface FakePresence {
status: "online" | "idle" | "dnd" | "offline"; status: "online" | "idle" | "dnd" | "offline";
clientStatus: ClientPresenceStatusData; clientStatus?: ClientPresenceStatusData;
} }
export interface UserChange { export interface UserChange {