#👾-core-development

1 messages · Page 134 of 1

dusk hill
#

holy shit

topaz thistle
radiant reef
#

uh

austere talon
#

bro just wanted to flex their neofetch

charred monolithBOT
charred monolithBOT
toxic bough
#

Okk when do you think it'll be out?

spark pivot
#

Don’t know just be patient

void echo
#

If anyone gets some time could we have some more reviews on ReplyPingControl PR? thx <3

olive aurora
#

@austere talon i will kill you if you force push to dev again

charred monolithBOT
charred monolithBOT
olive aurora
#

epic embed

charred monolithBOT
junior olive
charred monolithBOT
dusky sonnet
#

If someone where to run checks on my PR that would be pretty cute 👉👈

#

:3

jagged cloak
#

most it would say is run autofix to sort these imports!

#

probsbly kek

dusky sonnet
#

also imports should be sorted

#

the only thing im a bit worried about is the header

#

because my local install doesnt like it for some reason

jagged cloak
#

it should format and header on save usually lol

dusky sonnet
#

and still says its bad

olive aurora
#

update

dusky sonnet
#

because that makes sense

olive aurora
#

pnpm i

dusky sonnet
#

yeah tried that

olive aurora
#

skill issue

dusky sonnet
#

had this convo with @void echo yesterday

dusky sonnet
charred monolithBOT
dusky sonnet
#

@lime stone youre not supposed to have spaces in there no?

lime stone
#

?

dusky sonnet
#

think i read that somewhere

lime stone
#

no, discord's code is minified

#

yours does not need to be

dusky sonnet
#

ah ok

#

nvm then

void echo
#

.

dusky sonnet
#

sorry for pinging

lime stone
#

idrc

olive aurora
#

thats on the match

dusky sonnet
olive aurora
#

ppl usually minify the replace out of habit

void echo
#

yea

dusky sonnet
#

yeah im probably just deluded lol

lime stone
#

well it's harder to read for No Reason

#

I do not know why I captilised No Reason there

olive aurora
#

barely any harder to read

dusky sonnet
#

makes it easier to read

#

:)

olive aurora
#

u need glasses

dusky sonnet
#

i have glasses mesmart

void echo
#

honestly its not the end of the world

#

just comes down to preference

dusky sonnet
#

im an avid code golf afficionado so ofc its gotta be unreadable

olive aurora
#

consistency is good

lime stone
dusky sonnet
austere talon
#

ajay jumpscare

charred monolithBOT
olive aurora
#

also you love quickreply making you able to mention yourself on replies

glass jasper
charred monolithBOT
#
[Vencord/vencord.dev] New branch created: donor-graph
austere talon
#

BUILD FAILED

junior olive
#

LMAO

austere talon
#

how get log

junior olive
#

you don't

#

you love

austere talon
#

download log downloads 0kb file

#

AAA

#

THIS IS MY ACCOUNT STILL BEING BROKEN

junior olive
#

one of my workers throws errors and i cant debug it i love

junior olive
austere talon
#

idk its just broken

#

inb4 bad firefox support

junior olive
#

use safari

#

🔥

turbid hatch
#

@austere talon you can watch the log live but you should be able to expand those sections too

charred monolithBOT
austere talon
#

"message": [
"10:28:00 PM [ssr] TypeError: Cannot read properties of undefined (reading 'href')\n at functionsWorker-0.6542425200816036.js:5740:44\n at Object.Tm (functionsWorker-0.6542425200816036.js:7852:34)\n at ma (functionsWorker-0.6542425200816036.js:582:12)\n at of (functionsWorker-0.6542425200816036.js:1560:91)\n at ja (functionsWorker-0.6542425200816036.js:1615:20)\n at Kr.render (functionsWorker-0.6542425200816036.js:2225:19)\n at async Object.fetch (functionsWorker-0.6542425200816036.js:8306:44) (x2)"
],

#

combust

austere talon
#
const CanvasKit = await initCanvasKit({
    locateFile: file => new URL(file, url).href,
});
#

HOW IS IT UNDEFINED??

olive aurora
#

mb

#

i ate ur hrefs

austere talon
#

combust

void echo
#

FUCK i had a really old tampermonkey script i made that was marking changes as resolved when i actually meant to merge

#

that would explain a lot husk

#

i had the exension icon hidden

austere talon
#

WHY DOES THIS LIBRARY ONLY SHIP MINIFIED JS

ebon frigate
#

hi!

#

I'm not great at programming but

#

i know few things

#

can someone help me where is vencordDep.mjs?

austere talon
#

why

ebon frigate
#

I'm trying to make plugins locally available

#

so that i can load them from folder and not from github

void echo
#

Just put them in a userplugins folder and build it like that

ebon frigate
#

oo ty!

charred monolithBOT
void echo
# austere talon why

for future reference, where's that guide on installing 3rd party plugins i cant find it

charred monolithBOT
ebon frigate
#

wait. i dont want to make a new plugin. i want to keep all the plugins locally so that i can edit the already existing ones. i want to change the plugin path in vesktop

austere talon
#

not possible.

ebon frigate
#

yeah forgot to mention vesktop in first msg

ebon frigate
#

i see

#

thats sad

austere talon
charred monolithBOT
ebon frigate
void echo
charred monolithBOT
austere talon
#

yop

#

OMG

junior olive
#

d

austere talon
#

it uses XMLHttpRequest

#

but cf workers dont hjave that

junior olive
#

LMAO

austere talon
#

god im gonna have to fork this shit

#

at this point i might as well just fork

#

and like now it fails locally for some reason

#

WEHY DO THEY EVE NSHIP MINIFIED CODE

#

NO

#

AAAAAH MONOREPO

#

i will cry

charred monolithBOT
austere talon
#

this package is the worst thing ive ever tried to bundle

#

im gonna cry

ebon frigate
charred monolithBOT
jagged cloak
#

horror

#

why are u making donor graph

charred monolithBOT
patent nova
#

@rustic nova where is the folder cashed images saved in

#

also the option ignore muted servers isn't working

#

it still logs it

charred monolithBOT
austere talon
#

i invited u to the vencord org curve

#

if u wanna join

patent nova
#

?

austere talon
#

they cant read here anymore

junior olive
#

yeah i swear ive seen them in here so much

junior olive
#

like

#

just pr ur additions to vencord

austere talon
#

well the wait :p

junior olive
#

nobody is gonna use <x>cord

austere talon
#

and not u

junior olive
#

bc he did it

#

can we talk about that please :/

#

I'm really confused

#

I understand if stuff came up or u didnt feel like doing it but I'm so confused as to why any mention of it has gone ignored

#

I don't mind when it gets reviewed (obviously I'd prefer it to be sooner) but please communicate a littleee

#

are they gonna fucking rebrand a fork 😭

void echo
#

IN SUPPORT

void echo
#

PLS

junior olive
# junior olive bc he did it

@austere talon to explain a lil bit more he posted it bc it was his undertaking as a temporary measure until decor is merged

#

kasi best janitor

#

nO

austere talon
#

i need to merge decor fast before fiery makes DecorCord

tepid tiger
#

DecorCord LMAO

#

Vendecord

olive aurora
#

decord

junior olive
#

seriously I want to get it in vencord

austere talon
#

yeah ofc im just memeing

junior olive
#

I'm just confused how it went from :) to nothing instantly

austere talon
#

loss of motivation

junior olive
#

That's fine and you can tell me that

#

But leaving me in the dark just leaves me confused and wondering wtf is up

void echo
#

That sponsors grid is so cool

junior olive
#

cuz to me it went from "we can probably get it merged within a few days" to "is it actually going to be merged at all"

#

the way it was ignored at any mention

#

do u get where i'm coming from

#

thundr

austere talon
#

i need to kill github readme cache

#

it caches too long

junior olive
#

decor got partially reviewed and ven said they'd review the rest <x> day and when i asked late on <x> day it got ignored and since then it's been ignored at any mention that's why i was so confused

void echo
junior olive
#

ven i have adhd too, how do you think decor went from 0 to 100 for vencord in a day hehesmile i get that shit i just have no idea what to think when left in the dark

austere talon
#

ig 4 hours is fine

#

are u a current sponsor

#

or past

#

it only shows current, idk if github api can do past

junior olive
#

anyways

austere talon
#

ohhhhhhh

#

thats why then xd

junior olive
#

do forks not show up in here anymore

#

that's lame

austere talon
junior olive
#

i know

#

they used to be here

#

it ruined my funny joke

austere talon
#

my head hurts

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

limber skiff
#

jumpscare

junior olive
#

guh ill deal with pindms

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

junior olive
#

@austere talon is the getRowHeight fix even needed anymore??

#

i don't see what it was matching at aaall

austere talon
#

uhh

#

yeah it is

#

otherwise it explooodes

junior olive
#

was it matching something in getRowHeight before

#
this.getRowHeight = (e,t)=>{
    let {privateChannelIds: n} = this.props;
    return 1 === e && 0 === t && 0 === n.length ? 428 : 44
}

this is it now

austere talon
#

ya thats it

#

=== \i\.DMS && 0

olive aurora
#

before there was a func call

austere talon
#

its either e or t

#

probably

junior olive
#

e and t are both numbers

austere talon
#

ya

#

actually wait

olive aurora
#

dms is 1

austere talon
#

it might just ben inlined now

#

1 & 0 seem like enum values

#

like these

#

check which is DMS and itll be that

junior olive
#

ok yeah it's e i think

#

DMS is 1

olive aurora
#

it was 1 and 0 was home stuff

junior olive
#

yeah

olive aurora
#

top links

junior olive
#

i see that

#

i get it now

#

ill fix blobCatCozy

#

wait so

#

i need to check if e is === to -1?

olive aurora
#

iirc we make pindms 1 and modify dms to be 2

junior olive
#

-1===x.DMS&&0
is what the replace would produce

#

how tf would this work

olive aurora
#

we subtracted 1 from e

junior olive
#

i need to see the older code

olive aurora
#

not ===

junior olive
#

OH

#

THAT'S WAT UR DOING?? Ok

#

i got it more now

olive aurora
#

yea took me a while to figure this part out when i fixed for rspack lol

junior olive
#
{
    find: ".privateChannelsHeaderContainer,",
    replacement: {
        match: /1===\i/,
        replace: "$&-1"
    }
}
#

that theoretically should work

#

\i is e

#

is that good

olive aurora
#

m you probably need to make it more specific

#

unless tha module got split into a smaller one

junior olive
#

its pretty small

#

i could add a lookbehind for getRowHeight?

olive aurora
#

yea maybe

junior olive
#
(?<=getRowHeight=\(.{2,50}?)1===\i
dire trench
# charred monolith

@spark pivot asking cuz i do not know but why use an object over an array in this case?

#

isnt an object overkill and uneeded?

nimble plaza
#

makes it harder for code to be understood

dire trench
#

in this case its very simple

#

the array is short and its right above the function

#

the array in question:

const dcBadges: [number, string, string][] = [
    [0, "Discord Staff", "5e74e9b61934fc1f67c65515d1f7e60d"],
    [1, "Partnered Server Owner", "3f9748e53446a137a052f3454e2de41e"],
    [2, "HypeSquad Events", "bf01d1073931f921909045f3a39fd264"],
    [6, "HypeSquad Bravery", "8a88d63823d8a71cd5e390baa45efa02"],
    [7, "HypeSquad Brilliance", "011940fd013da3f7fb926e4a1cd2e618"],
    [8, "HypeSquad Balance", "3aa41de486fa12454c3761e8e223442e"],
    [3, "Discord Bug Hunter", "2717692c7dca7289b35297368a940dd0"],
    [14, "Discord Bug Hunter", "848f79194d4be5ff5f81505cbd0ce1e6"],
    [22, "Active Developer", "6bdc42827a38498929a4920da12695d9"],
    [17, "Early Verified Bot Developer", "6df5892e0f35b051f8b61eace34f4967"],
    [9, "Early Supporter", "7060786766c9c840eb3019e725d2b358"],
    [18, "Moderator Programs Alumni", "fee1624003e2fee35cb398e125dc479b"]
];
Object.freeze(dcBadges);

function getUserDCBadges(flags: number): [string, string][] {
    const userDCBadges: [string, string][] = [];
    for (let i: number = 0; i < dcBadges.length; i++)
        if (flags & (1 << dcBadges[i][0]))
            userDCBadges.push([dcBadges[i][1], dcBadges[i][2]]);
    return userDCBadges;
}
olive aurora
#

no reason to freeze ithnkb

dire trench
#

first index in each entry is the bit position of the badge
second index is the badge name
third index is the badge image

olive aurora
#

bu u can wrap the array if ur gonna freeze it

#

Object.freeze([ ... ])

dire trench
#

i tried that didnt work
i think u can only do that with objects

#

non array objects

olive aurora
#

um

#

arrays can be frozen

dire trench
#

ok it works

#

idk why it didnt work when i last tried

austere talon
#

simply dont freeze

inland fable
#

we can move to object if preferred though

spark pivot
spark pivot
#

Or just order them in the array as they should be

inland fable
#

would you prefer us to move to an object and add an order key to know the order in which badges should be rendered or is going with an array fine

junior olive
#

it'd be best if it was a array of objects

austere talon
#

tbh array is fine cause its obv whats what

#

but the löoop is weird

junior olive
#

löoop

#

yeah wtf that is a weird ass loop

#

.filter:

livid heath
junior olive
#

wow those 0.2ms saved matter so much

livid heath
#

ikr

#

tbf aren't they running that on like every message

#

eh at most you have 20 messages in view

#

just use filter

junior olive
#

it's not going to be that performance intensive

dire trench
#

not everything has to be .map, .some, .filter, .reduce etc.

livid heath
#

why not

junior olive
#

it's way clearer

livid heath
#

they exist to be used

dire trench
#

no

junior olive
#

not a unnecessary optimization

dire trench
#

i need to push to a new array without only the second and third indexs of each entry

#

i cant do that with just filter

#

it makes it more complicated and hard to understand later on in the code when that array is reused

#

only the badge name and image is needed

junior olive
#

ooo so scary ryan

livid heath
# dire trench no

so you're saying filter wasn't made to help people shorten const foo = []; for(const e of bar) {if(condition){foo.push(bar)}}
thats just wrong

junior olive
dire trench
junior olive
#

ur deranged

dire trench
#

its like ur doing code golf

livid heath
#

that is more legible than writing 5 loops my guy

dire trench
#

i wrote 1 loop

livid heath
#

referring to the image fiery sent

livid heath
junior olive
#

fr

#

ryan just

dire trench
#

nah what u sent is fine

#

i just didnt feel like reading it at first

austere talon
livid heath
#

code golfing is just making code shorter
.filter, .map etc are to make code easier to read not just shorter
there's a clear distinction

junior olive
#
function getUserDCBadges(flags: number): [string, string][] {
    return dcBadges.filter(badge => flags & (1 << badge[0])).map(badge => [badge[1], badge[2]])
}
#

its readable idk what ur on

dire trench
#

its fine how it is

#

thats not more readable

junior olive
#

it is

dire trench
#

in this case no

junior olive
#

it is so much more clear as to what it does

livid heath
#

it literally is more readable

dire trench
#

i disagree

#

i could make it a foreach

#

that could be more readable

#

but not filter then map

junior olive
#

foreach won't do what you want to do

livid heath
#

how

junior olive
#

you still need to filter out the invalid entries

livid heath
#

foreach would add unnecessary code

junior olive
#

filter and map is literally perfect

livid heath
dire trench
#
function getUserDCBadges(flags: number): [string, string][] {
    const userDCBadges: [string, string][] = [];
    dcBadges.forEach(badge => {
        if (flags & (1 << badge[0]))
            userDCBadges.push(badge[1], badge[2]]);
    });
    return userDCBadges;
}
livid heath
tame escarp
dire trench
#

its more clear as to what it does

junior olive
#

ryan u have this tendency to sacrifice readability for unnecessary optimization

junior olive
dire trench
#

how is squishing everything into one long line more readable 💀

livid heath
#

what part of filter + map is less clear to you
if anything it makes the operations more explicit, you are filtering and mapping the values of the array

junior olive
#

literally don't squish it and it becomes even more readable

livid heath
junior olive
#
function getUserDCBadges(flags: number): [string, string][] {
    return dcBadges
      .filter(badge => flags & (1 << badge[0]))
      .map(badge => [badge[1], badge[2]])
}
junior olive
livid heath
dire trench
#

this is what happens when u only do js

livid heath
#

formatting to code has nothing to do with this ryan

dire trench
#

anything other than those array functions is unreadable to u

tame escarp
junior olive
#

if vencord was ryancord i bet it wouldn't allow calling functions on your plugin
u have to put ALL your code in the patches fr

livid heath
junior olive
#

ryan get with the program filter and map are your friends

dire trench
#

that was a single very specific case

#

where it was just something1 && !something2

#

why do a function call for that

junior olive
#

because it's more clearer as to what the fuck is happening lol

livid heath
#

because it makes it more explicit and is also much cleaner

junior olive
#

easier to extend in the future too

dire trench
#

do i have to make an adder function too?

function addTwoNumbers(number1, number2) {
    return number1 + number2;
}
livid heath
#

you... just did

junior olive
#

fr

livid heath
#

the point here is that Array has a utility which can simply your function and make it much more cleaner

junior olive
#

ryan u have like 3 different people telling you "THIS IS BETTER" on top of vee saying it's weird just do it

dire trench
#

yes they can help when code needs to be made more compact / readable

#

this is not the case tho

#

again, its like ur doing code golf

#

why dont we minify everything?

junior olive
#

bro just shut up and accept it's nicer i fear

livid heath
dire trench
#

its already readable tho

junior olive
#

ryan ur writing code for a ts/js project write in ts/js ways

livid heath
spark pivot
#

Just keep it in the order they’re supposed to be in the array

tame escarp
#

u would write "Hello, world!".upper().split() as ```js
let string = "Hello, world!"
let uppercasedString = "";
for (let i = 0; i < string.length; i++) {
uppercasedString += string[i] // manually convert to uppercase but i aint writin allat
}
let splitString = [];
for(let i = 0; i < uppercasedString.length: i++) {
splitString.push(uppercasedString[i])
}

junior olive
livid heath
dire trench
#

in the way you did it there is no point

#

its still 2 itterations

tame escarp
#

u hate functions on primitives that return a modified copy so much

junior olive
#

fr

tame escarp
#

might as well make those for loops too

livid heath
#

you are allocating a new array either way

junior olive
#

noooo how could my programming language have nice convenient functions to manipulate a thing 😭 😭 😭 😭

livid heath
#

this is like rust devs (totally not me) crying about someone's code creating a single copy of a string

junior olive
#

fr

dire trench
#

all this over what

#

something wrong with u mfs

inland fable
#

flatMap can map and filter in 1 iteration if desired

#

uh just a suggestion

dire trench
#

u complained about the for loop so i made it a foreach
now u still complaining

#

do not understand why im getting so much shit

junior olive
#

bc ur still doing something that is pointlessly optimized and doesn't match other code style

dire trench
#

i think ur really blowing this out of proportion

limber skiff
#

is this for a third party or official plugin

junior olive
#

it's a pr

tame escarp
limber skiff
#

for a plugin?

junior olive
#

yea

austere talon
#

why r u arguging over such a small thing

limber skiff
#

then use filter and map

tame escarp
#

whar is that supposed to mean

tame escarp
limber skiff
#

it's pointless to care about performance on this case, and filter map is more readable

dire trench
#

i am not having fun

#

mfs hating on me fr

junior olive
#

yeah exactly

#

🔥

dire trench
#

calm down

junior olive
#

not our fault you can't accept you're overoptimizing

tame escarp
dire trench
tame escarp
#

yes but what does it mean

#

why "mf"

dire trench
#

opp fr

#

hating on my plugin

tame escarp
#

yop

crude raptor
#

i think someone should make a plugin that does pluralkit's switch tracking (using slash commands that have autocomplete omg thatd be so nice) and add a tag to a message based on who's fronting (kinda like pk's autoproxy switch and keepproxy true)

charred monolithBOT
dire trench
#

how can you agree with "what is all of this needed?"

#

just read the code or ask about specifics

#

how is that a review

#

not constructive plus how do i respond to that?

tame escarp
junior olive
crude raptor
#

omg thats epic ✨ please hurry up i want to be able to have cool message effects everywhere automatically based on who's fronting

livid heath
junior olive
dire trench
junior olive
#

no

dire trench
#

not everything has to be chained array functions

inland fable
#

PluralKit has an api not sure if u can switch front with that

tame escarp
crude raptor
#

i did something kinda like that with text replace but then i realised it requires a prefix or somethinng to actually know who's fronting

junior olive
#

ryan u were literally told by a vencord maintainer use filter and map

dire trench
#

bro its just 5 lines in a small plugin

#

its already readable

junior olive
#

why are u fighting it so hard

crude raptor
dire trench
#

do i have to add jdoc comments too?

junior olive
#

yes

tame escarp
dire trench
inland fable
#

whats sp

junior olive
livid heath
#

if you really wanna avoid 2 iterations
then you are already doing a map here
so just return dcBadges.filter(badge => flags & (1 << badge[0])) and do badge[1] & badge[2]
literally as simple as that

dire trench
#

it already works and its already readable

dire trench
#

there are 3 devs

#

we were helping shalev make a plugin

livid heath
tame escarp
dire trench
#

thats what this was

#

teaching someone new how to make a plugin

livid heath
#

aight i give up

tame escarp
crude raptor
#

oh im fucking stupid of course it'd be in edit

austere talon
#

write readable maintainable code

livid heath
#

where am i overengineering

junior olive
#

i would dare to say the array in array is a overoptimization

tame escarp
#

i would dare say all computers are overoptimization. just do the math in ur head silly

dusk hill
#

so true

livid heath
dire trench
junior olive
#

and less clear to a newcomer what each thing is

austere talon
#

CAN YOU SHUT THE FUCK UIP ALREADY

#

HOLY SHIT

dapper tiger
#

what would this be in C++

dire trench
#

yes please

#

why u always gotta start shit with me dawg

dapper tiger
#

the &int thing

livid heath
#

cast?

charred monolithBOT
dapper tiger
#

oh im in dev channel

tame escarp
livid heath
#

its not the real ven..

#

the real ven would have said "BLUD SHUT THE FUCK UP"

junior olive
#

sorry i was in different channels

crude raptor
#

#1032200195582197831 message sorry what does this do?? does it change the message invite feature to say "hop on __" ?? either way it sounds hillarious

livid heath
crude raptor
#

thats wild

spark cove
#

hop on fn

austere talon
#

hop on dn

spark cove
#

oh ok

elder garnet
#

hop on existential crisis

spark cove
#

dortnite

livid heath
woeful sable
#

does vencord automatically block ack requests?

junior olive
#

OHH SHIIT

#

@tepid tiger

tepid tiger
#

ohhhhh

#

so that’s what that was

#

only took them fucking ages

charred monolithBOT
austere talon
#

what

charred monolithBOT
junior olive
livid heath
#

intentional challenges, cant have them know about the secret token logger

woeful sable
#

Does anybody got idea on how to add custom button to context menu?

crude hearth
#

@austere talon you

spark pivot
crude hearth
livid heath
#

he whar

crude hearth
#

He knows

#

You would never understand

charred monolithBOT
cunning canyon
# austere talon what

lol that person have just talked to me few hours ago about how did i start contributing to big repo like vencord nyaboom

crude raptor
#

i haven't asked in a while so hows the text replace PR going- is it merged or whatever?
and then also- when would the update roll out ?

cunning canyon
crude raptor
#

ooo what did they say

#

its probably in my email somewhere but im lazy

crude hearth
#

TimezoneDB is on 11th month anniversy

cunning canyon
oak hull
#

🔥

crude raptor
#

cool

#

anyway i hope it gets merged soon

#

not even for the features- but because it moved all my textreplace rules to the new storage location and i want them back

cunning canyon
#

but you can just continue use the local build

woeful sable
#

do I really need to restart discord everytime I make change to my plugin code?

crude raptor
#

yeah about that idk what happened but it is the old version and idk why

woeful sable
crude raptor
#

pnpm watch then reload

woeful sable
#

ok

#

and the plugin doesnt work lol

crude raptor
#

hm

olive aurora
#

watch just builds it automatically

#

you still have to reload

woeful sable
#

which kinda sucks because loading discord takes like forever

olive aurora
#

doesnt need to be a full reload

#

just ctrl r

woeful sable
#

yes that takes long too

olive aurora
#

impatient fr

woeful sable
#

anyways does anyone got list of navIds?

#

or how to get them

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

import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { MessageStore, UserStore } from "@webpack/common";
import { MessageJSON } from "discord-types/general";

export const settings = definePluginSettings({
    alwaysPingOnReply: {
        type: OptionType.BOOLEAN,
        description: "Always get pinged when someone replies to your messages",
        default: false,
    },
    replyPingWhitelist: {
        type: OptionType.STRING,
        description: "Comma-separated list of User IDs to always receive reply pings from",
        default: "",
    }
});

export default definePlugin({
    name: "ReplyPingControl",
    description: "Control whether to always or never get pinged on message replies, with a whitelist feature",
    authors: [Devs.ant0n, Devs.MrDiamond],
    settings,

    patches: [{
        find: "_channelMessages",
        replacement: {
            match: /receiveMessage\((\i)\)\{/,
            replace: "$&$self.modifyMentions($1);"
        }
    }],

    modifyMentions(message: MessageJSON) {
        const user = UserStore.getCurrentUser();
        if (message.author.id === user.id)
            return;

        const repliedMessage = this.getRepliedMessage(message);
        if (!repliedMessage || repliedMessage.author.id !== user.id)
            return;

        const whitelist = settings.store.replyPingWhitelist.split(",").map(id => id.trim());
        const isWhitelisted = whitelist.includes(message.author.id);

        if (isWhitelisted) {
            if (!message.mentions.some(mention => mention.id === user.id))
                message.mentions.push(user as any);
            return;
        }

        if (settings.store.alwaysPingOnReply) {
            if (!message.mentions.some(mention => mention.id === user.id))
                message.mentions.push(user as any);
        } else {
            message.mentions = message.mentions.filter(mention => mention.id !== user.id);
        }
    },

    getRepliedMessage(message: MessageJSON) {
        const ref = message.message_reference;
        return ref && MessageStore.getMessage(ref.channel_id, ref.message_id);
    },
});

@spark pivot I added in a whitelist thing, you reckon we should add it to the pr or no

spark pivot
#

It’s your pr now

junior olive
#

could be added to vcc

#

@austere talon what do you think, autoreload vencord from vencord companion?

#

actually

austere talon
#

how

junior olive
#

yeah i realize

austere talon
#

do u mean ctrl r

junior olive
#

yeah

#

i forgot vencord companion is in vsc

#

and the build is in cli

#

nevermind i think

void echo
#

how can i trigger an update so that this ungreys when toggled rather than me having to hit save and close

olive aurora
#

its so easy to do with esbuild

#

check their docs

junior olive
#

for super reaction tweaks

void echo
#

I can only seem to find examples for dropdowns

junior olive
#

send

void echo
#
options: {
        method: {
            description: "Anonymising method",
            type: OptionType.SELECT,
            options: [
                { label: "Random Characters", value: Methods.Random, default: true },
                { label: "Consistent", value: Methods.Consistent },
                { label: "Timestamp (4chan-like)", value: Methods.Timestamp },
            ],
        },
        randomisedLength: {
            description: "Random characters length",
            type: OptionType.NUMBER,
            default: 7,
            disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Random,
        },
        consistent: {
            description: "Consistent filename",
            type: OptionType.STRING,
            default: "image",
            disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Consistent,
        },
    },

AnonymiseFileNames does this

#

which is what i've done

junior olive
#

does it properly grey out?

void echo
#

oh wait

#

no it doesnt

junior olive
#

lol

void echo
#

im trippin

spark cove
#

iirc the temporary settings object doesnt get passed to anything but the component things

#

the about component and maybe the component option type too

junior olive
#

oh yeah that seems ez to add

#

yooo server sent events i love

olive aurora
#

make it an option tho i personally save way too often

junior olive
#

same

#

ill look into this at some point

void echo
#

tried to create a custom component for the whitelist setting that can react to changes in the alwaysPingOnReply setting but it didnt work

#

bleh

woeful sable
#

Huh?

index.ts:22 Uncaught TypeError: Cannot set property ackChannel of #<Object> which has only a getter
    at Object.patchAckChannelFunction

This normally works in console

void echo
#

Is there actually a way to update cache when settings change

#

this would be delicious

#

direct event listening would be soooo much better for this

charred monolithBOT
turbid hatch
austere talon
#
definePluginSettings({
    banana: {
        type: OptionType.STRING,
        onChange: doThing
    }
})
void echo
void echo
elder garnet
#

make readmes for me

void echo
#

anything become readme

#

i'm gna make it go through all non readme plugins, read the index and generate one based on that

#

then i'll just make a pr with em all

junior olive
#

errrrrr...

#

not sure if that's a good idea

austere talon
#

no

#

don't pr ai generated content you will be blocked permanently

junior olive
#

fear

void echo
#

it would genuinely take longer than writing them

charred monolithBOT
woeful sable
#

Is there any way to intercept https requests?

dire trench
woeful sable
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
lime stone
#

LOL

limber skiff
uncut glen
#

lol

austere talon
livid heath
# charred monolith

isn't it written in the doc strings that you shouldn't destructure lazy searches WHAT

charred monolithBOT
charred monolithBOT
nimble plaza
#

suggestion: have fakenitro modify the char counter to get an accurate count for the emoji links

austere talon
#

eh seems too niche

#

that's the first time anyone has ever brought that up

nimble plaza
#

oki

#

if i find time i might attempt it myself but its fine if it doesnt get done

charred monolithBOT
lime stone
#

it's not implemented for textreplace either

nimble plaza
#

ah

charred monolithBOT
lime stone
#

they created an account for an issue ig

dusky sonnet
#

rate this patch :D ```js
{
find: ".LABEL_WITH_ONLINE_STATUS",
replacement: {
match: /(src:null!=\i?)(\i)/,
replace: "$1($2.replace(/(80|128)$/,$self.settings.store.imgSize))"
}
}

limber skiff
#

replace ok

#

match bad

#

make it match a text that is sure to not change before the src: and then .{0,..} to reach the src

charred monolithBOT
limber skiff
#

@verbal pumice why did you delete your suggestion?

#

didnt their find match 3 modules?

#

if it does it should change too

dusky sonnet
#

im using the online patch helper

verbal pumice
#

it doesnt

dusky sonnet
#

i would think that it would tell me if it matches multiple

verbal pumice
#

i forgot regex search on

dusky sonnet
#

/"img",{(src:null!=\i?)(\i)/

#

would this be an ok match?

limber skiff
#

It probably does match more than one

limber skiff
verbal pumice
limber skiff
#

oh it's a message

dusky sonnet
verbal pumice
#

yeah

limber skiff
#

nvm then

verbal pumice
#

it's fine

dusky sonnet
#

just out of curiosity

verbal pumice
#

im just dumb

dusky sonnet
#

which plugin?

verbal pumice
#

// Webpack Module 913365 - Patched by PlatformIndicators, ViewIcons

dusky sonnet
#

actually where is that search thing?

verbal pumice
#

ctrl+shift+f in devtools

dusky sonnet
#

thanks!

#

before

#

damn they got sent in the wrong order :/

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

works around this issue

[23720:1113/145745.110129:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[23720:1113/145745.110235:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[23720:1113/145745.110468:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[23720:1113/145745.110530:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=...
jagged cloak
#

shitvidia

junior olive
#

@austere talon does vencord support web workers

placid wave
junior olive
topaz thistle
placid wave
#

you are keith the rat

nimble plaza
#

got it half working for textreplace

#

2nd patch isnt working for some reason tho

lime stone
#

Hm... would it lag?

nimble plaza
#

uhhhhh idk

#

it would apply rules on every change

#

doesnt seem to lag at all for me tho

#

got 2nd patch to work

#

:D

#

now i need to make it work on both fakenitro and textreplace fear

#

should i just modify presendlistener?

jagged cloak
#

I will make iCord

nimble plaza
#

wait thatd cause api spam with translate guhhhhhh

#

what ab messageEvents.add/removeCharCountListener or smt

#

@austere talon ?

placid wave
charred monolithBOT
dire trench
nimble plaza
#

guh

#

that wasnt me

hot sierra
#

what happened with volumebooster

nimble pendantBOT
nimble plaza
#

i dont think i18n is setup

#

yea its not

#

@rare shale can you yoink i18n from vendicated/vendicated.dev

charred monolithBOT
frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Experiments (found no module):
ID: -
Match: ("showNewSearch")

Bad Starts

None

Discord Errors

None

charred monolithBOT
charred monolithBOT
charred monolithBOT
void echo
jagged cloak
#

when get rid of discord types

#

2021 types my beloved

#

at least most of them are mostly okay still

spark pivot
junior olive
jagged cloak
#

lol

void echo
#

UserJSON :(

olive aurora
#

if you have to cast anyway

#

its pushing to something that already has a type

void echo
#

Whats this issue with avatar decorations

#

user doesnt have them n userJson does

#

do i need to transform one to the other exhaustion

olive aurora
#

it prob doesn matter

void echo
#

its ok i did it all fancy now

olive aurora
#

whatd u do

void echo
#

it doesnt type cast

#

thats fancy in my books

olive aurora
#

if you cast to userjson its incorrect either way

#

like just keep as any

void echo
#

i should js leave it as it was?

olive aurora
#

yea

void echo
#

yea i its not maybe "technically right" but there wont be an issue

#
modifyMentions(message: MessageJSON) {
        const user = UserStore.getCurrentUser();
        const userJSON: UserJSON = {
            ...user,
            avatarDecoration: null
        };

        if (message.author.id === user.id)
            return;

        const repliedMessage = this.getRepliedMessage(message);
        if (!repliedMessage || repliedMessage.author.id !== user.id)
            return;

        const isWhitelisted = cachedWhitelist.includes(message.author.id);

        if (isWhitelisted || settings.store.alwaysPingOnReply) {
            if (!message.mentions.some(mention => mention.id === user.id))
                message.mentions.push(userJSON);
        } else {
            message.mentions = message.mentions.filter(mention => mention.id !== user.id);
        }
    },
#

i alr did this anyway

olive aurora
#

yeah no thats just unnecessary

void echo
#

yea my thoughts too

#

I'll just leave it

void echo
#

if ven wants it changed or smtng i will but meh

charred monolithBOT
inland fable
#

so scary

#

took me less than 10m to make it so i doubt if its good enough

cunning canyon
#

it was rejected before

#

#1548

jagged cloak
#

DISCORD CAN DETECT IF YOU'RE NOT ACTUALLY ON MOBILE, PERHAPS THIS OPTION SHOULD BE REMOVED
xdd

#

vc/1548

inland fable
#

will unpull request then

#

i think

#

idk

jagged cloak
#

i love how theres two seperate patches for the same thing

inland fable
#

can i ask a contributor to close it i did not see #1548

#

i did search before pull request but i looked for device instead of platform .(

jagged cloak
#

you can close it urself

#

by deleting the branch/repo

#

or just closing it

jagged cloak
#

also u pred from main branhc lol lol

charred monolithBOT
inland fable
#

idk how to use git(hub) .(

jagged cloak
#

create a branch and send the pr from that branch instead of using main branch

inland fable
#

ohh i see

jagged cloak
inland fable
#

question

#

if yo pr from main branch how do you

#

change it after

jagged cloak
#

you dontxd revert the changes and push changes to a different branch simply
or for less experienced/lazy people you can just delete repo and redo xd

inland fable
#

is that all from github or uh

#

do you need to do stuff like in git

jagged cloak
#

usually git cli

#

all you really need

inland fable
#

aight ty

jagged cloak
#

i am a hypocrite using gui but do as i say not as i do

inland fable
#

tysm

#

@jagged cloak 1 last question, i should start the branch name with feat/ right?

charred monolithBOT
jagged cloak
#

depends

#

feat: is usually for new features (plugins in this case), then theres fix: among many others

inland fable
#

oki for plugin ill use feat then

#

is it : or /

jagged cloak
#

commit example: fix(your mom): change fatness or feat(settings): add fatness slider
branch ex: feat/fatness-slider

#

okay dont trust me with making examples lol

#

just lookup conventional commits youll find a lot

inland fable
#

oki thank you so much

fresh cloak
#

hiya, once again having some trouble getting something

jagged cloak
#

bitches?

#

jk xd

fresh cloak
#

so true

#

i need to patch this function

#

i need to replace the R.isPlatformEmbedded

void echo
#

[Plugin] goes harder

#

feat(plugin) is just mid

#

doesnt hit the same

fresh cloak
#

the regex would probably look like this

replacement: {
                // eslint-disable-next-line no-useless-escape
                match: /!\i\.isPlatformEmbedded/,
                replace: "true"
            }
#

what i'm struggling with is: what goes in the findfield?

#

the class it's on is just this

#

class H

#

i'm assuming in module 656395

#

how do i construct the find for this?

cunning canyon
#

Messages.ADD_KEYBIND_WARNING

fresh cloak
#

yep looks like that gets the right module

#

sadly the behavior isn't changing

cunning canyon
#

why does your regex have ! at start

fresh cloak
#

yoinked from webContextMenus

cunning canyon
#

R.isPlatformEmbedded is just \i\.isPlatformEmbedded

fresh cloak
#

never been a regex user

#

thanks! that worked

#

don't even know why they don't enable custom keybinds

#

they work when focused

junior olive
fresh cloak
#

i'm gonna hijack all that logic anyways though, to make it global clueless

#

so real

junior olive
#

i wonder if i'll hit 100 commits

#

would be wild

dire trench
#

decor merged <t:8640000000000:R>

jagged cloak
#

lol

#

invalid date moment

dire trench
#

how can i reliably get the username associated with a user id

#

Vencord.Webpack.Common.UserUtils.getUser() and Vencord.Webpack.Common.UserStore.getUser() return undefined for real users

#

and using restapi to get users even when i cache the users still gets me rate limitted

#

its only called when you load a message whos author is married to someone in relationshipdb and i still get rate limitted somehow

junior olive
dire trench
#

moment fr

charred monolithBOT
livid heath
charred monolithBOT
nimble plaza
charred monolithBOT
woeful sable
#

@junior olive is that the companion cube

mighty hinge
#

How would i toggle mute using a plugin?

woeful sable
#

is there a way to move the edit user profile to left or right ( in settings )

dusky sonnet
woeful sable
#

yes

charred monolithBOT
jagged cloak
#

probably skill issue tbh

shy veldt
#

yeah

livid heath
#

maybe its just that the users you are referring to as "real" are not cached

charred monolithBOT
spark pivot
verbal pumice
#

wait, someone can read?

void echo
olive aurora
#

no way they put a tracker on their discord profile

livid heath
#

isn't that a github feature

#

oh

#

i cant read

charred monolithBOT
dire trench
#

im using the site relationshipDB uses to fetch usernames rn as a workaround

#

kinda scuffed

charred monolithBOT
austere talon
ebon frigate
#

cant see that the server is running

#
PS C:\Users\jasdi\Documents\vesktop2\arrpc> node src
[arRPC] arRPC v3.1.0
(node:62904) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[arRPC > bridge] listening on 1337
[arRPC > ipc] not available, trying again (attempt 1)
[arRPC > ipc] listening at \\?\pipe\discord-ipc-1
[arRPC > websocket] 6463 in use!
[arRPC > websocket] listening on 6464
[arRPC > process] started