#๐พ-core-development
1 messages ยท Page 40 of 1
nop stable is bork
The well known Split Large Messages plugin, but now in Vencord. The regex pattern is subject to change, but I do not have time nor motivation to add or change anything to this plugin currently.
from the users' perspective, how many pixels are changed? xD
Hacky way to fix friend invites may break in the future
if (!UserStore.getCurrentUser().phone)
return sendBotMessage(ctx.channel.id, {
content: "You need to have a phone number connected to your account to create a friend invite!"
});
const createInvite = await RestAPI.post({
url: '/friend-finder/find-friends',
body: {
modified_contacts:
{
[random]: [1, '', '']
}
}
}).then(x => friendInvites.createFriendInvite({
code: x.body.invite_suggestions[0][3],
recipient_phone_number_or_email: random
}));
what
same
that option is for when Vencord breaks as a fallback so I think it'd be good to have down there, Discord does too
that option is for when Vencord breaks as a fallback so I think it'd be good to have down there, Discord does too
???? github
so real
someone test if this pr works for u
ok
realest badges
So works
yes
yeah
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
nice
does gh pr create need you to fork the repo or can i do it from a local commit instead
u need to fork
damn
time for branch hell again

Lol
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"
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.
I sure hope I didn't fuck up in making this pull request.
I wrote this code like a week or two ago and I forgot to push it :skull:
cc @ ven here's that PR you-
anger
why do you lint it twice
cc @austere talon ready for review
ye i was using it for the fakenitro thing lol
baller
?
what
lint & check if desktop compiles
lint & check if web compiles
doesn't matter :P
true :3
use getElementsByClassName instead of querySelector(All) because (in current plugins) elements are only selected by class name
+ it's veryvery slightly faster
yeah it kinda is tbh
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
eh, there is a difference, but sure
Also getElementByClassName and friends have weird caveats @marsh cave
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
i've had issues with it in the past...
yeah, but i didn't think much of it because it didn't matter for the current plugins
9d74209 ShowHiddenChannels: Use Discord's new overlay v... - Nuckyz
72ba839 SpotifyControls: add album art hover transition... - AnubisNekhet
silly man had to fix everything for me 
smol
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
thank u
imagine it randomly using the third as id
would be funny
but ofc
my coding skills are equal to zero ๐ช
@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
@limber skiff this tooltip sucks
it should say Enable Game Activity / Disable Game Activity ( based on current state )
silent message has the same kind of tooltip btw
I like your tooltip :3
thanks
oh yeah i forgot. i did save it but only after you close the modal but it should be fixed now
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
thanks :D
About:
A recreation of the original client theme discord experiment, before they ruined it with gradient overlays.

Demos:

https://user-images.githubusercontent.com/37855219/230238798-2284cb50-3409-45e3-9c4a-17e6f5...
me on my way to fix random small stuff lol
None
None
JSHandle@error
None
None
JSHandle@error
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?
- click on your profile (where you change your status)
- hover your cursor on "switch accounts"
- Select the other account you signed in
- keep rep...
already resolved read our announcement channel
2e6c5ea BetterFolders: Fix Close all not working (#808) - AutumnVN
hardest image ever btw @rustic nova
WHY IS IT ROUND
cursed
thanks for the quick fix aria
๐
๐ซก
:D no problem
YEAH ong
is this just latest @7? Maybe we could just @8
e40ebac feat(plugin): WebhookTags -> MoreUserTags (#378) - ActuallyTheSun
pnpm v8 jumpscare
lol @rustic nova i already found a bug with zoom i think
go to this and try zooming
oh no
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
phew
no i think just round spotify cover
did they remove this option from mobile
nuhuh
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
OH
@austere talon i know no reply mention exists! I have it enabled.
okay sorry i misunderstood drastically
iz okie
im so sorry i thought it was just another one of those stupid requests of people not reading anything
i updated the issue title
all g
ITS WORKING
moretags plugin added staff tags n stuff
jumpscare
its fine i turned it to profiles only
ohhhh
yeah moretags jumpscare lmao
I finally merged
maybe we shouldn't have migrated plugin settings
because its kinda different plugin now
trolley
- fix the tag text being hardcoded as
BOTinstead of using the localized version - proper variable name for
addTagVariantsi cant believe i missed that when commiting - rewrite a few patches/comments
hnnnnnnnng
review it in the meantime, ill write the gdpr stuff
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
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?
what is this library
I would add react components, types, utility classes and maybe some other things. Of course only if they are used in multiple plugins.
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
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.
it varies i suppose
im not sure where that would be appropriate, this is a question for @austere talon
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)
what issue
discord issue
Okay. @austere talon so what do you think?
Sometimes servers may have their own bots that send embeds, or you just need the embeds for some specific servers. This adds a blacklist/whitelist system to do so.
By default it is in blacklist mode and the list is empty, so the original global functionality is retained.
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
e
Wait I think this may be a duplicate
Oh yours is a pull request right right
I didn't read that
Mb
- use actual domain
- navbar margin
- gdpr :woozy:
The latest updates on your projects. Learn more about [Vercel fo...
Like the option in BetterFolders, this plugin would only allow one category to be open at a time and close others when you open another one.
what an amazing comment
truly a [vc]: #dDN0nqQYJXSieMVnGgmnuwsB6xUQ+oeWVtMNpNF9HBo=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ2ZW5jb3JkLXdlYnNpdGUiLCJyb290RGlyZWN0b3J5IjpudWxsLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS92ZW5kaWNhdGVkL3ZlbmNvcmQtd2Vic2l0ZS80RW5ob3Rkb0JYUlpabnd1NnFERVVTZ0ZYbVgzIiwibmV4dENvbW1pdFN0YXR1cyI6IlBFTkRJTkcifV19
The latest updates on your projects. Learn more about [Vercel fo... moment
yes
i think the gdrp one should be prominently displayed at the top @turbid hatch
like in the introduction
oki
done
This is a very simple summary for normal people. We also have a proper <a href="/cloud/gdpr">GDPR policy</a>. You might
hot
i feel like this might seem like its vencord source code
Successfully deployed to the following URLs:
vencord-website โ ./
vencord-website.vercel.app
www.vencord.dev
vencord-website-git-main-vendicated.vercel.app
vencord-website-vendicated.vercel.app
vencord.dev
i can finally hop off mr vencord updater's wild ride
hm
its cause we have the github icon in the bottom right and that
where r u hosting the backend now? On my vps? or ur own
vendymachine
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
hm
needs better wording though i think
mutex maybe?
mm
no
why cant i think of the name for this lol
could destructure
const { cloud: { authenticated, settingsSync } } = useSettings(["cloud.authenticated", "cloud.settingsSync"]);
memo is pointless here
const sectionEnabled = authenticated && settingsSync;
soooo inconsistent :(
"If-None-Match": Settings.cloud.settingsSyncVersion.toString()
const written = Number(res.headers.get("etag")!);
my name is fine i think
it doesnt matter that much xd
there is a proper name for it but yeah it'll work xd
id rather it's easy to understand than pretty
does this actually work with the proxies @austere talon ?
ye
but u can at least
const { cloud } = useSettings()
hm
okay i'll do that
there ye go
whoops
stray eslint comment
sec
https://x.lewisakura.moe/23/04/Code_-_Insiders_2023-04-06_16-32-21.png i wanna get off mr updater's wild ride
uuid? lol
no
but the other name is fine
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
mm
okay gotta do some more checks and I think you using fflates strtou8 might bloat bundle unnecessarily
then I'll merge
the idea is to put it on common identical notifications that may annoy users like "Vencord has just been updated" or "Cloud settings synced successfully"
So you can choose to hide those notifications without us having to add 3 million settings toggles
im pretty sure its bundled anyway
because fflate uses it internally
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
-2kb
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 (?)
and deflate
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
lets see
oh wait
hold on
if we end up doing encryption we cant do this
so its probably best we avoid getting the browser to do it
Why's that?
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?
because these are technically global vars and i dont particularly want instances of these around if people arent using this feature set
or just inline the new TextEncoder()
do u know how optimised making instances of classes is
(very)
:P
is it
just inline them in any case
alr
Discord has thousands of instances
do u really think 2 more instances will hurt 
idk why im so concerned with memory optimization today
rustpilled
its only 1kb now for some reason
but i guess its a saving nonetheless
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
how to report bug
github
ok send link or i kiss u
huh???
gh issues is only for when youre sure its a proper vencord issue
probably is
if its just the user being stupid you wasted your time
i cant see emoji reactions
que
and cant put emoji reactions
its got the same general layout but the actual content is different
ok
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
can u not post dumb garbage in dev channels thank you
i could reduce this a bit by making a function to do the sections for me
but it seems like a waste
nah itsp robably fine
i was just confused
but also one of them has confirm the other doesnt
kinda weird
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
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
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
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
guh ill have to use normal discord again
if i checkout the PR will it just work TM or will I have to do anything weird
he was forced to use discord desktop app
should just work
i must add vencord dev support to vencord desktop immediately
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?
maybe mention in the "you can even selfhost it" that it's free/libre/foss/whatever
stallman approved
YES
real
got it
It respects your privacy, you can selfhost it and it's even stallman approved!!
[richard stallman] i aprove this
"free software" is a really bad term but "open source" is even worse
what's the best term then?
free/libre is the least bad term
"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 
maybe just below updater?
either move it up one or cloud settings/sync im happy with
wtf are these memes lmao
if you disable cloud integration you can't delete your data lol
well yes because it doesnt know which backend you're running and it needs your secret to do that
:P
deleting will disable it for you right after
the reason is that the term open source implies that just access to the source code already makes it free software which is simply not factual and is heavily abused by big corpo, with companies like Cloudflare calling Wildebeest open-source, or google calling actual source-available code "open source"
there are so many more aspects to proper free software than just the source being open
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
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
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
yeah I hate that my school uses "free software" that doesn't use anything like git and releases tarball every now and then of the source code like wtf how am I supposed to contribute
oh yeah
when you make the changes to backup and restore it'll apply to settings sync too
if that's the case, are we getting rid of theme links entirely once local themes are merged?

you usually contribute by sending patches via email
can you get a doctor's appt?
well that's stupid
why do u think people moved to git hosts
but email was the original way to contribute via git
just use git smh
thats it
forks are a fake concept invented by git providers
vencord is now mailing list only
i mean i know its dehydration but i havent figured out why yet
it does use git
ive drunk so much
no
yes
rehydration tablets and everything
it doesn't use git
yeah this is why i say go and call a doctor
like
sooner rather than later
git is a version manager, git hosts like github are not related to git anyway, it's just a more convenient way to contribute
ik, but the software my school use doesn't uses git for vc
what kind of software
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
what do they use 
dosn't use vc at all
ya lol
ik im just dehydrated
i just dont know why
(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)
for assignement and ressources
epic
REAL
good 'nuff
LOL why did u actually say stallman approved ahahha
I still prefer cloud sync but 
stallman will sue us lewi...
:^)
shh
we're using his license
its fine
WAIT
I CAN SUPER REACT
maybe i restart discord
oh yeah bit unrelated but i notice now doing pnpm build builds vencordDesktop stuff
why not a separate thing like we have for web
maybe
AYO
why?
that would be way more effort
idk whats the distinction between vencordweb and vencorddesktop lol
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
hmm
but VencordDesktop & DiscordDesktop are pretty similar, the only difference are their defines
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
just lots of spam when building 
I just use armcord unless i need to use vc
because krisp
the idea of vencord desktop is that it also runs our Desktop bundle
which enables many more features
and our own updater
desktop bundle
oh
i love wasting my superreactions
what if I'll implement a subset of it just to have voice properly working
you can't
1984
I can
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
yeah it'll just crash if you don't stub everything

but I probably could just have it in scope of voice module?
Vendicated is cute
though in my previous experience, just running discord in electron without changes was enough for it to crash
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

monorepos have so many benefits
no u
if we (re)make vencord types lib we can just define the plugins in vencord desktop
monorepos are amazing if appropriate and done right, horrid if done poorly
but how would we do that, just auto publish vencord types to npm?
or maybe just add submodule

yeah i did that for aliucord
its pretty simple but also horrid
and u gotta bump dependency so often lmao
I made a @vencord/types thing that worked
ig u can do
"dependencies": {
"vencord": "*"
}
but ofc never got around to adding plugin-dir loading
and it will always just install latest
ye
o yea
i was working on prototype for plugin template
did you want me to just change it to "it's even GPL licensed!" rather than stallman approved
if u make vencord types package i can finish plugin template
maybe say smth like
It respects your privacy and its source code is available under the AGPL-3.0 license so you can easily selfhost it
A way to use custom banner, this could work similar to the new profile color plugin (aka copy paste image link or upload to imgur)
oh looks like i might still ahve the code on a branch
nice
i thought i deleted it
(& relicense backend from GPL to AGPL)
basically
for any clouds you should always use AGPL
GPL source code right only applies to software u can download directly
oooo i see
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
AGPL is same as GPL + network use is covered
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?!
I'm not a fan of the funny text
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
i think yes but maybe use /* 
// kinda deranged
horror
**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.
found the bare minimum for DiscordNative to get into app
this legit sounds like a nightmare to fully fix
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
**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"
}
]
}]
Can someone explain me how I can use lodash?
No that's not what I meant haha. I meant how to import it sorry.
window._
i will stop touching cloud settings sync pr now
Yes it works thanks
i think its okay
np
unless anyone finds anything more to recommend
Add the feature to download images/files into specific directories you can set in plugin settings like ImageUtilities. It would be very useful....
Would also be nice to have them pinned to like a second sidebar like the BetterFolders plugin
ok kinda fixed it up
using my old plugin template
@austere talon have you pushed your current plugin template anywhere?
nuh uh
does that already work? the imports & building
this looks like it's intended for one single plugin
I think a monorepo would be much more logical
but that shouldn't be too hard to change 
my build script is scuffed
?
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
namespace imo
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
@austere talon All network errors are fixed. https://github.com/Vendicated/Vencord/pull/792
what the actual shit happened ๐
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
Oh right
the only plugin I really miss is lightlys inappnotifications: https://github.com/1Lighty/BetterDiscordPlugins/tree/master/Plugins/InAppNotifications
(the one that was on the plugin repo wasn't as good)
no its firefox moment
This issue is already closed and not related to Vencord, but I just wanted to mention that Discord has now updated electron on the stable channel and the :has() selector now works.
@austere talon its not on automerge btw :P
this was before automerge was enabled iirc
should we change this logo?
are you talking about the authorization: one?
thats the secret it generates
check your localstorage
it looks a lot like a Discord token ngl
i feel like a lot of users will be jumpscared if they check
it starts with my userid doesnt it
yes
yes
hm
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

NotYourDiscordToken.OTYyNj.....
so i was like waaaait what
yeah sorry i just introduced a token logger
dont mind me
what should the format be
secret first then user id?
uh
ig
just not the userid first haha
didnt u wanna move cloud up?
or rename it
i did move it up
or
i thought i did
yea i did
there you go @austere talon that should look less scary
what is it now
i didnt pull
xd
:3
lmao i cant delete my data anymore
okay but
when do u sync to cloud
u dont do it on settings change
only manually from the looks of it
yeah cause i didnt want to send on every change
why not do it on settings change?
if you go tick tick tick on a bunch of plugins it sends a request for each of them
you can debounce settings changes for a minute
just debounce it
const saveSettingsOnFrequentAction = debounce(saveSettings, 60_000)
is that an actual method we have
yes
til
yes
maybe also do it pre reloads
wait no
uh
optimally we want to sync when someone edits changes then immediately restarts
uh
settingsSync needs the settings api, settings api needs settingsSync
window.onbeforeunload = function() {
return "you have unsaved settings. Consider syncing to become baller"
}
will that actually work xd
it just stops me from reloading
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
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
}
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
it sorta works
not on web
if i setImmediate the reset of the handler it works on desktop
ah of course
web
my mortal enemy
i would just check whether we're newer on startup and if so sync, and also do the debounced save on every settings change
havent tried i just wanted to avoid it
they just cause massive headache sometimes
m, lets see
but u cant always avoid them
could use events for this lol
:P
but circular dep is fine too
it seems to.. not be upset
like i said circular deps are fine usually
it only becomes an issue once you use stuff on the top level
now we wait a minute
thats why using Settings on top level of plugin explodes
but if u use them in any function it works
hot
ig
maybe make it more obvious which one was done
Synced to cloud or synced from cloud
yes so that it saves if u enable plugins then immediately restart
window.onbeforeunload = function() {
putCloudSettings().then(() => {
window.onbeforeunload = undefined;
window.reload();
});
}
so that wouldnt work?
no




