#๐Ÿ‘พ-core-development

1 messages ยท Page 40 of 1

iron elm
#

:worksonmymachine:

jagged cloak
#

nop stable is bork

austere talon
#

fixed almost

#

looks like discord now has 2 badge components

#

epic A/B testing

charred monolithBOT
jagged cloak
#

awesome testing moment

#

whyst discord insane

#

maybe for that display name thing

iron elm
#

/vencord-debug

#

ok

charred monolithBOT
lime stone
austere talon
charred monolithBOT
austere talon
#

๐Ÿฆ„

#

@limber skiff lookie

charred monolithBOT
jagged cloak
austere talon
#

what

jagged cloak
#

oh theyre pngs i forget

#

and i dont even have it on lfmao

austere talon
#

works with fake nitro

jagged cloak
#

i have nitro

heavy widget
#

same

jagged cloak
#

oh it does lol

charred monolithBOT
austere talon
#

???? github

woeful sable
#

so real

jagged cloak
#

so real

#

vencord acknowledgements when

austere talon
woeful sable
#

ok

woeful sable
austere talon
#

So works

woeful sable
#

yes

austere talon
#

wait I didn't test hover and click and shit

#

do all of them work

woeful sable
austere talon
#

Nice

#

this is classic discord code

#

they have the same code twice

#

I just had to make the regexes global so they patch both places

cunning bobcat
#

PR incoming in a few minutes

verbal pumice
#

nice

cunning bobcat
#

does gh pr create need you to fork the repo or can i do it from a local commit instead

austere talon
#

u need to fork

cunning bobcat
#

damn

charred monolithBOT
cunning bobcat
#

time for branch hell again

cunning bobcat
quick ibex
#

Lol

charred monolithBOT
#

Why exactly is this needed?

if you just do "npm i -g pnpm" it installs the wrong version and you will get the error: "ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILEโ€‰ Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm"

austere talon
#

yes true actually

#

but I think we should just bump pnpm

cunning bobcat
#

how are they both on the same commit what

#

520 git commit -am "Add debugging info to CustomRPC, and a link to the docs."
535 git remote
556 git branch
558 git checkout -b customrpc-debug-and-docs
ah.

cunning bobcat
#

cc @ ven here's that PR you-

#

why do you lint it twice

#

cc @austere talon ready for review

jagged cloak
#

baller

austere talon
austere talon
cunning bobcat
#

lint & check if desktop compiles
lint & check if web compiles

jagged cloak
#

oh dum that was a pull from main

#

but yes the badges thing works

austere talon
cunning bobcat
#

true :3

charred monolithBOT
austere talon
#

why

#

this is kinda pointless

marsh cave
#

yeah it kinda is tbh

austere talon
#

there's no real difference between the different functions

#

it's best practice to always use querySelector for consistency

#

and better maintainability because u can easily add more stuff

marsh cave
#

eh, there is a difference, but sure

austere talon
#

did you know that getElementByClassName returns a live html collection instead of a snapshot

#

the list will be updated live when an element gets removed or added

#

I didn't know that but just found out now

lime stone
#

i've had issues with it in the past...

marsh cave
charred monolithBOT
woeful sable
#

silly man had to fix everything for me bleh

austere talon
#

uh

#

nah it was just smol lint issues

woeful sable
#

smol

austere talon
#

But i decided to refactor plugin while I was at it

#

code u didnt even write :P

#

the only issue ur code had was some small lint failures (single quotes instead of double quotes for example) and that ur find for their uuid module wasn't unique

#

everything else was fine pomucool thank u

#

imagine it randomly using the third as id

#

would be funny

woeful sable
woeful sable
austere talon
#

vencord drunk

austere talon
#

@rustic nova

#

when you zoom with scroll

#

it's not persisted

#

is that intended?

#

as in

#
  • hold for lens
  • zoom in or out
  • let go of lens
  • hold again

Expected (?) behaviour: Zoom is exactly like it was before letting go of lens
Actual behaviour: Zoom is reset to whatever it was initially before you did these steps

#

seems like they are only persisted when you close the image modal

#

not when you stop zooming

#

Start zooming
scroll in
Stop & Start zooming
Not persisted

Start zooming
scroll in
Stop zooming
close image
persisted

austere talon
#

@limber skiff this tooltip sucks

#

it should say Enable Game Activity / Disable Game Activity ( based on current state )

woeful sable
#

silent message has the same kind of tooltip btw

austere talon
#

all bad

#

bad ux

#

the button right next to it does it correctly

#

:P

limber skiff
#

you bully my tooltip

#

I hate you!!!!!

red rock
charred monolithBOT
limber skiff
charred monolithBOT
rustic nova
austere talon
#

okay thank you I will try again

#

other than that it seems to work fine

#

I fixed your code for the new discord update, u probably saw

charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

JSHandle@error

#
Bad Patches

None

Bad Starts

None

Discord Errors

JSHandle@error

austere talon
#

JSHandle@error goes hard

#

my love

jagged cloak
#

i love

#

JSHandle@error

charred monolithBOT
#

Discord Account

Reni#3022

What happens when the bug or crash occurs?

Probably happens when I switch accounts alot, Not exactly sure

What is the expected behaviour?

I expect vencord to open the plugins menu and themes menu but an error screen prevents me from accessing these menus

How do you recreate this bug or crash?

  1. click on your profile (where you change your status)
  2. hover your cursor on "switch accounts"
  3. Select the other account you signed in
  4. keep rep...
austere talon
#

hardest image ever btw @rustic nova

#

WHY IS IT ROUND

#

cursed

#

thanks for the quick fix aria

#

๐Ÿ™

rustic nova
rustic nova
austere talon
#

i like to believe that isn't ai generated

#

just a real img

#

hes balling

rustic nova
#

YEAH ong

austere talon
#

do we merge cloud sync @turbid hatch ?

#

wait no we should make gdpr policy first

austere talon
#

lol @rustic nova i already found a bug with zoom i think

#

go to this and try zooming

rustic nova
#

oh no

austere talon
#

wait no its just fully broken?

#

hmmm

#

lemme see

#

might just be me

#

im sorry false alarm :3

#

seemed to have been some bug idk why

#

gonna have to see if it happens again

rustic nova
#

phew

spark cove
#

i think this is against TOS

austere talon
#

no i think just round spotify cover

spark cove
#

ohh

#

true

charred monolithBOT
#
[Vencord/Desktop] New tag created: v0\.1\.3
spark cove
#

did they remove this option from mobile

austere talon
#

nuhuh

charred monolithBOT
#

Discord Account

GracefulLion#9559

What is it that you'd like to see?

I think it would be cool to see the inverse ping-on-reply behavior of normal discord. Normally, when holding shift and hitting reply the user is not pinged. With this plugin enabled it'd be nice if when holding shift and hitting reply the user IS pinged.

Request Agreement

  • [X] This is not a plugin request
austere talon
#

OH

fleet depot
#

@austere talon i know no reply mention exists! I have it enabled.

austere talon
#

okay sorry i misunderstood drastically

fleet depot
#

iz okie

austere talon
#

im so sorry i thought it was just another one of those stupid requests of people not reading anything

#

i updated the issue title

fleet depot
#

all g

charred monolithBOT
#
[Vencord/Desktop] New tag created: v0\.1\.3
austere talon
#

oh my god

#

why did it error again

charred monolithBOT
#
[Vencord/Desktop] New tag created: v0\.1\.3
austere talon
#

pls just work now or im gonna cry

#

COME ON

charred monolithBOT
#
[Vencord/Desktop] New tag created: v0\.1\.3
austere talon
#

ITS WORKING

austere talon
#

LETS GOOOOOOOOOOOOOOOOOOOOOOOOOOOO

charred monolithBOT
jagged cloak
#

those are some funny defaults

#

i almost thought discord implemented them

austere talon
#

what defaults

jagged cloak
#

moretags plugin added staff tags n stuff shiggy jumpscare

#

its fine i turned it to profiles only

austere talon
#

ohhhh

#

yeah moretags jumpscare lmao

#

I finally merged

#

maybe we shouldn't have migrated plugin settings

#

because its kinda different plugin now

jagged cloak
#

trolley

charred monolithBOT
charred monolithBOT
turbid hatch
#

review it in the meantime, ill write the gdpr stuff

tight vapor
#

Is there a way to get around CORS preflight thing

#

I tried to make a plugin that would get the lyrics for a song with genius

#

And I was using the genius API to get information ab the song

#

And for the search too

#

But it kept giving me an error ab preflight or something

#

I tried the axios library and that also kept erroring

#

I asked ChatGPT and it said I need to use a proxy server

#

Should I just use deno deploy to make the genius API request for me

cold patio
#

Hey I just wanted to ask how should I go about adding a library to Vencord? I have already developed a plugin and now I want to create more plugins but they all use a lot of the same code. Should I add a plugin that does nothing but act like a library?

turbid hatch
#

what is this library

cold patio
#

I would add react components, types, utility classes and maybe some other things. Of course only if they are used in multiple plugins.

turbid hatch
#

this seems like stuff that should be part of vencord's stdlib

#

not a separate plugin or library

#

if they're going to be used by multiple plugins and may be useful in the future then i'd just add it there

cold patio
#

Yes, that might be true for some code, but maybe not for some. An example would be a react component that gets passed a connection object from the mediaEngine and sets some audio settings for the screenshare. This could be used multiple times in my case for my Better Screenshare Plugin and a BetterMic Plugin which I'm working on. Would it be okay to add such a component? Because this is probably the only use case.

turbid hatch
#

it varies i suppose

#

im not sure where that would be appropriate, this is a question for @austere talon

lucid lynx
#

what would this issue be caused by? i think it's an issue with discord updating to electron 22

#

but i want to know if this is an easy fix in css or something

#

(you might have to fullscreen the video to see what i mean)

austere talon
#

what issue

lucid lynx
#

maybe it's some renderer issue or something

austere talon
#

discord issue

cold patio
charred monolithBOT
charred monolithBOT
austere talon
#

wait that's you

#

I didn't even notice

#

optimally it should use the upcoming array settings type

#

but that's still gonna take 5 million years probably

#

working on it

quick ibex
#

e

fleet depot
#

Wait I think this may be a duplicate

#

Oh yours is a pull request right right

#

I didn't read that

#

Mb

charred monolithBOT
charred monolithBOT
umbral hedge
#

truly a [vc]: #dDN0nqQYJXSieMVnGgmnuwsB6xUQ+oeWVtMNpNF9HBo=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ2ZW5jb3JkLXdlYnNpdGUiLCJyb290RGlyZWN0b3J5IjpudWxsLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS92ZW5kaWNhdGVkL3ZlbmNvcmQtd2Vic2l0ZS80RW5ob3Rkb0JYUlpabnd1NnFERVVTZ0ZYbVgzIiwibmV4dENvbW1pdFN0YXR1cyI6IlBFTkRJTkcifV19
The latest updates on your projects. Learn more about [Vercel fo... moment

austere talon
#

yes

#

i think the gdrp one should be prominently displayed at the top @turbid hatch

#

like in the introduction

turbid hatch
#

oki

charred monolithBOT
charred monolithBOT
austere talon
#

hot

turbid hatch
#

cloud settings sync is REAL

#

(almost)

austere talon
#

i feel like this might seem like its vencord source code

austere talon
#

and not website

#

might want to revisit that somehow

turbid hatch
#

i can finally hop off mr vencord updater's wild ride

turbid hatch
#

its cause we have the github icon in the bottom right and that

austere talon
#

where r u hosting the backend now? On my vps? or ur own

turbid hatch
#

vendymachine

austere talon
#

ok

#

thats fine with u?

#

or should we move it

turbid hatch
#

of course

#

idm

#

i can still do any maintenance work i need so

austere talon
#

i have a nice idea for notifications

#

essentially we could add a new property "doNotShowAgainId"

#
showNotification({
  title: "Cloud Settings",
  body: "Your settings have been updated! Click here to restart to fully apply changes!",
  color: "var(--green-360)",
  onClick: () => window.DiscordNative.app.relaunch(),
  doNotShowAgainId: "cloud-settings-sync"
})
#

whenever that id is set, it would add a button "Do not show again"

#

and then future notifications with the same id won't show again

#

could use that for update notifs, cloud sync notifs, maybe more in the future

turbid hatch
#

hm

#

needs better wording though i think

#

mutex maybe?

#

mm

#

no

#

why cant i think of the name for this lol

charred monolithBOT
austere talon
#

it doesnt matter that much xd

turbid hatch
#

there is a proper name for it but yeah it'll work xd

austere talon
#

id rather it's easy to understand than pretty

turbid hatch
#

why tf did i memo that

#

its a dependency it works fineeee

turbid hatch
austere talon
#

ye

turbid hatch
#

oki

#

gotta make it let though

#

cuz const funny

austere talon
#

oh

#

if u destructure the actual value u cant change it nah

turbid hatch
#

ye

#

ohhh

#

wait

austere talon
#

but u can at least

const { cloud } = useSettings()
turbid hatch
#

hm

#

okay i'll do that

#

there ye go

#

whoops

#

stray eslint comment

#

sec

jagged cloak
turbid hatch
#

no

jagged cloak
#

but the other name is fine

turbid hatch
#

its a single id representing the notification specifically for the purpose of being able to hide it later

#

not a unique id for that notif

#

so uuid isnt fitting

jagged cloak
#

mm

austere talon
#

okay gotta do some more checks and I think you using fflates strtou8 might bloat bundle unnecessarily

#

then I'll merge

austere talon
#

So you can choose to hide those notifications without us having to add 3 million settings toggles

turbid hatch
#

because fflate uses it internally

austere talon
#

might

#

but I will check

#

cause it just does the same as new TextEncoder().encode()

#

but also has a fallback

#

you can easily test yourself

#

if you just pnpm build it will tell u bundle size

#

then remove those imports and use TextEncoder and Decoder instead, rebuild and see if it shrinks

turbid hatch
#

-2kb

austere talon
#

I'm so smart

#

2kb is nothing but the fact that changing one line makes us save 2kb is worth imo

#

I think it's because you only use deflate (?)

turbid hatch
#

and deflate

austere talon
#

other way round, only deflate

#

I think u shouldn't need to use inflate

#

if u set the correct content encoding header the browser should automatically inflate for u

turbid hatch
#

lets see

turbid hatch
#

hold on

#

if we end up doing encryption we cant do this

#

so its probably best we avoid getting the browser to do it

austere talon
#

Why's that?

turbid hatch
#

if we're encrypting i'd probably encrypt the compressed bytes rather than the string mainly out of convenience

#

and also its almost impossible to compress encrypted bytes

#

Compress first. Once you encrypt the file you will generate a stream of seemingly random data, which will be not be compressible. The compression process depends on finding compressible patterns in the data.
https://stackoverflow.com/a/4676108

#

@austere talon y/n?

austere talon
#

huhh

#

why

#
const textEncoder = new TextEncoder();
turbid hatch
#

because these are technically global vars and i dont particularly want instances of these around if people arent using this feature set

austere talon
#

or just inline the new TextEncoder()

austere talon
#

(very)

#

:P

turbid hatch
#

is it

austere talon
#

just inline them in any case

turbid hatch
#

alr

austere talon
#

do u really think 2 more instances will hurt lookWhatTheyTookFromUs

turbid hatch
#

idk why im so concerned with memory optimization today

#

rustpilled

#

its only 1kb now for some reason

#

but i guess its a saving nonetheless

austere talon
#

okay so

#

it looks like u have a lot of duplicated code for some reason

#

like

#

SettingsSyncSection & CloudTab

#

why are those almost the same

#

im confus

woeful sable
#

how to report bug

stiff cove
#

github

woeful sable
#

ok send link or i kiss u

stiff cove
#

huh???

woeful sable
#

SEND LINK

#

@verbal pumice ok thx bbg

stiff cove
verbal pumice
#

gh issues is only for when youre sure its a proper vencord issue

woeful sable
#

probably is

verbal pumice
#

if its just the user being stupid you wasted your time

woeful sable
#

i cant see emoji reactions

turbid hatch
woeful sable
#

and cant put emoji reactions

turbid hatch
#

its got the same general layout but the actual content is different

woeful sable
#

ok

turbid hatch
#

if we end up extending this then i dont really want to be shoving tons of sections into one massive function, so i split it up

austere talon
#

can u not post dumb garbage in dev channels thank you

turbid hatch
#

but it seems like a waste

austere talon
#

nah itsp robably fine

#

i was just confused

#

but also one of them has confirm the other doesnt

#

kinda weird

turbid hatch
#

erasing all your data is a big deal vs erasing the settings stored in the cloud since you can just click the other button to upload them again

#

erasing all your data means your secret is invalid across all platforms alongside any data in the future that gets stored

#

so one has a tooltip and one has a scary alert

#

that was my justification :P

austere talon
#

oh i see

#

okay

#

i just skimmed tbf

#

i didnt realise it was actually diff stuff

#

i just assumed it was the same thats why i also said dupliocated code

turbid hatch
#

ah nah

#

the one in CloudTab is the overall layout for the tab

#

but its code includes the header bit where it lets you configure

austere talon
#

@umbral hedge youre the settings queen

#

any nits with the settings sync pr ?

umbral hedge
#

h

#

i'll have to check

turbid hatch
#

SettingsSyncSection is specifically just the settings sync section of the tab

#

so i split it off to have separate logic

#

it also means that it wont rerender the whole fuckin thing every time

austere talon
#

guh ill have to use normal discord again

umbral hedge
#

if i checkout the PR will it just work TM or will I have to do anything weird

austere talon
umbral hedge
#

ight

#

i'll test now

austere talon
#

i must add vencord dev support to vencord desktop immediately

umbral hedge
#

add krisp to vencord desktop

#

oh right i need to finish working on my krisp patcher

#

it checks the app signature so can't run behind armcord, etc. but it's pretty easy to patch out the check but I want to automate it so I'm not releasing binaries

#

arctic monkeys reference?

austere talon
#

maybe mention in the "you can even selfhost it" that it's free/libre/foss/whatever

turbid hatch
#

stallman approved

austere talon
#

YES

umbral hedge
#

real

turbid hatch
#

got it

austere talon
#

It respects your privacy, you can selfhost it and it's even stallman approved!!

lime stone
#

[richard stallman] i aprove this

austere talon
lime stone
#

what's the best term then?

turbid hatch
#

there u go

#

pull and build

#

tell me what you think

austere talon
umbral hedge
#

"Cloud" on its own at the bottom looks weird
can you move it up or rename it something like "Cloud Sync" or "Cloud Settings" or smth uwaaaaa

austere talon
#

yeah kinda real

#

Cloud Settings

#

or Vencord Cloud maybe

lime stone
#

maybe just below updater?

umbral hedge
#

mm but then vencord is duplicated

#

i think no

turbid hatch
#

Vencloud

#

๐Ÿ™

umbral hedge
#

either move it up one or cloud settings/sync im happy with

turbid hatch
#

i'll move it up one

#

if i remember where it is

austere talon
#

wtf are these memes lmao

umbral hedge
#

if you disable cloud integration you can't delete your data lol

turbid hatch
#

:P

#

deleting will disable it for you right after

austere talon
#

there are so many more aspects to proper free software than just the source being open

umbral hedge
#

theme links not synced? I saved, added a theme link, and pulled from cloud, and the link didnt disappear
or is it synced but just append-only/non-destructive?

#

oops im tired mistype

austere talon
#

theme links are not synced in general even with backup& restore (because i forgot to update backup & restore). Should probably be fixed but also if we do move to letting users load arbitrary files we wouldn't want to sync those

umbral hedge
#

im so dizzy today idk whats wrong with mne

#

yeah i need to hurry up and finish themes pr

#

i might do today if my dizziness doesn't get in the way

honest geyser
umbral hedge
#

oh yeah

turbid hatch
umbral hedge
turbid hatch
#

it uses the same methods so It Just Works

austere talon
#

you usually contribute by sending patches via email

turbid hatch
austere talon
#

the old method of git

#

git send-email my love

honest geyser
#

well that's stupid

turbid hatch
#

wat

#

how can you call the intended way stupid

austere talon
#

why do u think people moved to git hosts

#

but email was the original way to contribute via git

honest geyser
turbid hatch
#

thats it

austere talon
#

forks are a fake concept invented by git providers

turbid hatch
#

vencord is now mailing list only

umbral hedge
austere talon
umbral hedge
#

ive drunk so much

honest geyser
#

no

austere talon
#

yes

umbral hedge
#

rehydration tablets and everything

honest geyser
#

it doesn't use git

turbid hatch
#

like

#

sooner rather than later

austere talon
#

git is a version manager, git hosts like github are not related to git anyway, it's just a more convenient way to contribute

umbral hedge
#

meh

#

good friday tomorrow so i wont ahve anything til monday anyways

honest geyser
austere talon
#

what kind of software

umbral hedge
#

my local gp does same-day appts so if it persists i can send in an appt req on sunday and get seen on monday

turbid hatch
#

if it gets any worse call 111

#

but i think you know that

austere talon
#

what do they use nyaboom

honest geyser
#

dosn't use vc at all

umbral hedge
#

ik im just dehydrated

#

i just dont know why

austere talon
#

(also not accepting contributions is part of the freedom granted via free software, you can just edit the source code and distribute modified copies urself)

honest geyser
turbid hatch
#

i've pushed the recommended changes btw

#

including stallman approval

umbral hedge
#

epic

austere talon
#

REAL

umbral hedge
#

good 'nuff

turbid hatch
#

yeah it does look better

#

i agree

austere talon
#

LOL why did u actually say stallman approved ahahha

umbral hedge
#

I still prefer cloud sync but animePensive

austere talon
#

stallman will sue us lewi...

turbid hatch
#

we're using his license

#

its fine

#

WAIT

#

I CAN SUPER REACT

austere talon
#

maybe i restart discord

umbral hedge
#

oh yeah bit unrelated but i notice now doing pnpm build builds vencordDesktop stuff
why not a separate thing like we have for web

turbid hatch
#

maybe

austere talon
#

AYO

austere talon
#

that would be way more effort

umbral hedge
#

idk whats the distinction between vencordweb and vencorddesktop lol

austere talon
#

VencordDesktop is just desktop build

#

but without the patching aspect and without DiscordNative

#

the reason web is in a different file is because it uses a very different configuration

umbral hedge
#

hmm

austere talon
#

but VencordDesktop & DiscordDesktop are pretty similar, the only difference are their defines

umbral hedge
#

ic

#

fair enough

austere talon
#

vencord desktop builds with IS_VENCORD_DESKTOP=true and discord desktop with IS_DISCORD_DESKTOP=true

#

thats the only diff :P

#

but yeah vencord desktop works so well

umbral hedge
#

just lots of spam when building animePensive

austere talon
#

ive been using it for a few days

#

everything works and updater works too

umbral hedge
#

I just use armcord unless i need to use vc

austere talon
umbral hedge
#

because krisp

austere talon
#

which enables many more features

#

and our own updater

umbral hedge
#

your.. discord bundle?

#

you repackaging discord files? a_raised_eyebrow

austere talon
#

desktop bundle

umbral hedge
#

oh

austere talon
#

i love wasting my superreactions

severe aspen
umbral hedge
severe aspen
austere talon
#

if you define window.DiscordNative the entirety of discords code base will start thinking it's running in desktop mode

#

so you have to implement everything

#

unless you add patches to change the code :P

umbral hedge
#

yeah it'll just crash if you don't stub everything

severe aspen
austere talon
#

yeah you cant define DiscordNative

#

but yeah u can patch the code

severe aspen
#

but I probably could just have it in scope of voice module?

red rock
#

Vendicated is cute

umbral hedge
#

though in my previous experience, just running discord in electron without changes was enough for it to crash

austere talon
#

im not sure how we should handle vencord desktop specific plugins

#

in which repo should they be?

#

im almost tempted to migrate to monorepo because sharing code is so inconvenient rn

umbral hedge
#

lol

#

monorepo hell

austere talon
#

monorepos have so many benefits

austere talon
umbral hedge
#

if we (re)make vencord types lib we can just define the plugins in vencord desktop

austere talon
austere talon
umbral hedge
#

ye

#

i did it before

#

i can do it again

austere talon
#

or maybe just add submodule

umbral hedge
austere talon
#

yeah i did that for aliucord

#

its pretty simple but also horrid

#

and u gotta bump dependency so often lmao

umbral hedge
#

I made a @vencord/types thing that worked

austere talon
#

ig u can do

"dependencies": {
  "vencord": "*"
}
umbral hedge
#

but ofc never got around to adding plugin-dir loading

austere talon
#

and it will always just install latest

umbral hedge
#

ye

turbid hatch
#

o yea

austere talon
turbid hatch
#

did you want me to just change it to "it's even GPL licensed!" rather than stallman approved

austere talon
#

if u make vencord types package i can finish plugin template

umbral hedge
#

ya i can remake it sure

#

its fairly easy

#

getting tsc to do type gen

austere talon
charred monolithBOT
umbral hedge
#

oh looks like i might still ahve the code on a branch

#

nice

#

i thought i deleted it

austere talon
#

(& relicense backend from GPL to AGPL)

turbid hatch
#

whats the difference

#

i forgor

austere talon
#

basically

#

for any clouds you should always use AGPL

#

GPL source code right only applies to software u can download directly

turbid hatch
#

oooo i see

austere talon
#

so if you just consume the api you have no right to source code

#

someone could make a proprietary fork and host it and not have to make its source available

turbid hatch
#

oki

#

i'll relicense Now!

austere talon
#

AGPL is same as GPL + network use is covered

turbid hatch
#

i like my funny text though so

#
[...] It respects your privacy, you can selfhost it, and it's even AGPL 3.0 licensed! How's that for a deal?!
austere talon
umbral hedge
#

I'm not a fan of the funny text

turbid hatch
#

aw

#

ill change it then

#
// Vencord Cloud - the API for the Vencord client mod.
// Copyright (C) 2023 Vendicated and contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
#

in the meantime is this header correct

austere talon
#

i think yes but maybe use /* trolley

turbid hatch
#

that's not go standard

austere talon
#

// kinda deranged

austere talon
grave mangoBOT
# austere talon horrid https://github.com/elastic/go-licenser/blob/main/error.go#L1-L17

**error.go: **Lines 1-17

// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

turbid hatch
#

yea

#

xd

#

pull and build

#

tell me if the text is okay

severe aspen
#

found the bare minimum for DiscordNative to get into app

austere talon
#

okay but dont

#

write a plugin that patches the respective places

severe aspen
#

I see

#

yea

severe aspen
austere talon
#

how so?

#

it's fairly simple you'd just need to patch out a few checks and make it use your own global instead

#

I already did that in a very simple plugin that enables copy link and open link on web

grave mangoBOT
# austere talon https://github.com/Vendicated/Vencord/blob/main/src/plugins/webContextMenus.web....

**webContextMenus.web.ts: **Lines 28-45

patches: [{
    // There is literally no reason for Discord to make this Desktop only.
    // The only thing broken is copy, but they already have a different copy function
    // with web support????
    find: "open-native-link",
    replacement: [
        {
            // if (isNative || null ==
            match: /if\(!\w\..{1,3}\|\|null==/,
            replace: "if(null=="
        },
        // Fix silly Discord calling the non web support copy
        {
            match: /\w\.default\.copy/,
            replace: "Vencord.Webpack.Common.Clipboard.copy"
        }
    ]
}]
cold patio
#

Can someone explain me how I can use lodash?

umbral hedge
#

no

#

read the lodash docs

cold patio
#

No that's not what I meant haha. I meant how to import it sorry.

umbral hedge
#

window._

austere talon
#

^

#

should be typed maybe idk

umbral hedge
#

e.g. window._.isEqual(...)

#

it is typed i think

turbid hatch
#

i will stop touching cloud settings sync pr now

cold patio
#

Yes it works thanks

turbid hatch
#

i think its okay

umbral hedge
#

np

turbid hatch
#

unless anyone finds anything more to recommend

charred monolithBOT
umbral hedge
#

ok kinda fixed it up

#

using my old plugin template

#

@austere talon have you pushed your current plugin template anywhere?

austere talon
#

nuh uh

austere talon
austere talon
#

I think a monorepo would be much more logical

#

but that shouldn't be too hard to change NingCool

umbral hedge
umbral hedge
#

im importing a types lib in this plugin

#

xd

#

this is just a demo of importing the types lib into a plugin

#

i use it to test the types lib

#

deciding between vencord-types and @vencord/types as a package name

austere talon
#

namespace imo

umbral hedge
#

yeah

#

atm there's just a vencord-types folder in the main repo with an index.d.ts stub

#

and you just pnpm typegen which creates that child vencord folder with the types

#

idk how version bumping would work

ashen pumice
charred monolithBOT
woeful sable
#

what the actual shit happened ๐Ÿ’€

umbral hedge
#

discord

#

or your theme

#

probably your theme

woeful sable
#

defo my themem

#

but on another note

#

You know the spotify controls thing.

#

every other button is sycned well, but the bar is not, the bar on discord is like 3:20 and on actual spotify it's 3:50

#

How do I link it?

#

I doubt it's my theme this time

austere talon
#

we just use the data discord gives us

woeful sable
#

Oh right

charred monolithBOT
lament nimbus
#

is this just a me issue

#

(web, firefox)

jagged cloak
#

no its firefox moment

charred monolithBOT
charred monolithBOT
turbid hatch
#

this was before automerge was enabled iirc

austere talon
#

no

#

i have to manually enable that xd

#

im testing for the last time rn

turbid hatch
#

oooo

#

okie

austere talon
#

should we change this logo?

turbid hatch
#

nah its funny

#

i left it like that on purpose

austere talon
#

uhhh

#

have u ever checked the request to our backend

turbid hatch
#

hm?

#

wdym?

austere talon
#

this is not good lol

#

it sends ur discord token

#

oh wait

turbid hatch
#

where

#

xd

austere talon
#

maybe thats oauth token?

#

the Authorization header

turbid hatch
#

are you talking about the authorization: one?

#

thats the secret it generates

#

check your localstorage

austere talon
#

it looks a lot like a Discord token ngl

turbid hatch
#

does it

#

its just a hex string

austere talon
#

i feel like a lot of users will be jumpscared if they check

#

it starts with my userid doesnt it

#

yes

turbid hatch
#

OH

#

yes

#

its base64

#

i forgot

austere talon
#

it starts with ur userid, same as normal token

turbid hatch
#

its the b64 of your user id and the secret

#

yeah

austere talon
#

yes

turbid hatch
#

hm

austere talon
#

maybe change that

#

just so it doesn't look like ur actual token

#

that jumpscared me cause i recognise my token from a mile away

turbid hatch
#

NotYourDiscordToken.OTYyNj.....

austere talon
#

so i was like waaaait what

turbid hatch
#

yeah sorry i just introduced a token logger

#

dont mind me

#

what should the format be

#

secret first then user id?

austere talon
#

uh

#

ig

#

just not the userid first haha

#

didnt u wanna move cloud up?

#

or rename it

turbid hatch
#

i did move it up

#

or

#

i thought i did

#

yea i did

#

there you go @austere talon that should look less scary

austere talon
#

what is it now

turbid hatch
#

secret:userid

#

so the start of it is completely random

austere talon
#

ah i see

#

but u need to edit backend right

turbid hatch
#

already done

#

^^

austere talon
#

HOW

#

speedy

austere talon
turbid hatch
#

xd

austere talon
#

:3

turbid hatch
#

ahh

#

:P

austere talon
#

lmao i cant delete my data anymore

turbid hatch
#

is it derped

#

what's the error its returning

austere talon
#

ok nvm

#

i just didnt restart well enough

turbid hatch
#

oh lol

#

restart harder

austere talon
#

okay but

#

when do u sync to cloud

#

u dont do it on settings change

#

only manually from the looks of it

turbid hatch
#

yeah cause i didnt want to send on every change

austere talon
#

why not do it on settings change?

turbid hatch
#

if you go tick tick tick on a bunch of plugins it sends a request for each of them

austere talon
#

you can debounce settings changes for a minute

turbid hatch
#

they'll race too

#

hm

austere talon
#

just debounce it

turbid hatch
#

i could do that

#

lets see

austere talon
#
const saveSettingsOnFrequentAction = debounce(saveSettings, 60_000)
turbid hatch
#

is that an actual method we have

austere talon
#

yes

turbid hatch
#

til

austere talon
#

wait 60_000 is 1m right

#

or am i tripping

turbid hatch
#

yes

austere talon
#

maybe also do it pre reloads

#

wait no

#

uh

#

optimally we want to sync when someone edits changes then immediately restarts

turbid hatch
#

mm

#

circular dependency moment

#

this is going to be fun

austere talon
#

uh

turbid hatch
#

settingsSync needs the settings api, settings api needs settingsSync

austere talon
#
window.onbeforeunload = function() {
  return "you have unsaved settings. Consider syncing to become baller"
}
turbid hatch
#

will that actually work xd

austere talon
#

uh

#

not really

#

theres not really a good fix

turbid hatch
#

it just stops me from reloading

austere talon
#

yes same

#

lmao

turbid hatch
#

could show an alert

austere talon
#

no

#

onbeforeunload is very limited

#

so u cant abuse it

#

According to the specification, to show the confirmation dialog an event handler should call preventDefault() on the event.

#

oh wait

#

nah doesnt work either

turbid hatch
#
window.onbeforeunload = function() {
    window.onbeforeunload = undefined;
    // show the alert here, dismissing resets the handler, accepting triggers the reload, pressing ctrl+r again also triggers it because of removing the event handler above
}
austere talon
#

no

#

u cant im p sure

#

try it

#

we could just check on start whether settings are newer? if they are then sync

#

do that + debounce settings save to 1min

turbid hatch
#

it sorta works

austere talon
#

not on web

turbid hatch
#

if i setImmediate the reset of the handler it works on desktop

#

ah of course

#

web

#

my mortal enemy

austere talon
#

i would just check whether we're newer on startup and if so sync, and also do the debounced save on every settings change

turbid hatch
#

now the question of

#

how do i solve the circular

austere talon
#

huh?

#

elaborate

austere talon
#

does it not work?

#

circular imports are fine

turbid hatch
#

havent tried i just wanted to avoid it

austere talon
#

they just cause massive headache sometimes

turbid hatch
#

m, lets see

austere talon
#

but u cant always avoid them

austere talon
#

:P

#

but circular dep is fine too

turbid hatch
#

it seems to.. not be upset

austere talon
#

like i said circular deps are fine usually

#

it only becomes an issue once you use stuff on the top level

turbid hatch
#

now we wait a minute

austere talon
#

thats why using Settings on top level of plugin explodes

#

but if u use them in any function it works

turbid hatch
#

it did it!

austere talon
#

hot

turbid hatch
#

i assume you want to keep the notif

#

so the user knows

austere talon
#

ig

#

maybe make it more obvious which one was done

#

Synced to cloud or synced from cloud

turbid hatch
#

alr

#

and you wanted it on startup too?

austere talon
#

yes so that it saves if u enable plugins then immediately restart

turbid hatch
#

hm

#

can i abuse onbeforeunload for this..

#

thinking is like

austere talon
#

no

#

:P

#

you cant do async there either

#

browsers dont let u

turbid hatch
#
window.onbeforeunload = function() {
    putCloudSettings().then(() => {
        window.onbeforeunload = undefined;
        window.reload();
    });
}
#

so that wouldnt work?

austere talon
#

no