#๐พ-core-development
1 messages ยท Page 27 of 1
ah I see
but once you have that, you can GET/PUT/DELETE /settings
how about encryption? did u do that at all
GET will return {"data": ..., "written": 123456}, PUT will return {"written": 123456}, DELETE is a 204
didnt do it for the PoC but its trivial
since im already storing as binary
ye
encryption would be cool but should be done on client side for obvious reason
I think browser has good apis for that?
subtlecrypto
yes
although i think encryption should be a case-by-case thing
instead of encrypting the whole file
should we differentiate canary, ptb and stable or store all as one?
i see no reason to differentiate release channels
vencord runs the same on all of them
so not encrypting the whole file, but individual values if its really necessary
it seems redundant to encrypt a settings file if the settings are just "so and so plugin is on" and it bloats the filesize
by how much?
depends on the algorithm and bits
I thought size should stay about equal when encrypting
it can do, i think AES can?
or even smaller since I assume encryption can also incorporate compression
but you have to pick the right bit size
smaller? i havent heard of one that goes smaller
personally i wish settings were per-branch rather than global, but since discord settings are global, and vencord settings are global, it'd be weird to sync per branch
^
and tbh stable is the only supported branch anyway
ptb/canary are a "itll run but you wont get any support for issues"
so i see no reason why we should special case it
idk about that but technically we could even compress settings before encrypting since it'll have a lot of duplicated strings like "enabled" and true/false
discord has pako built in, so whatever that supports you could use ig
im packing it with msgpack atm so its quite small now compared to its ascii form but we might be able to get better ratios
zlib
isn't brotli more for binary data?
bro... tli
for string compression I think of lzw or huffman
and i was more thinking of doing it transparently on the server vs on the client
less implementation detail on the clientside
but then u have to send unencrypted stuff to the server
true
hm
okay, i can move written to a header
thats fine
response.header("Vencord-Settings-Written", written!);
something like that
idk
shouldn't custom headers start with X
๐ค
they stopped recommending it because people were making custom headers
and they became pseudostandards
http headers are such a messy thing
and then became standards
e.g. X-Forwarded-For
that used to be a nonstandard header
I love how a typo has become the standard for backwards compatibility
now its a standard and in the RFC
๐ญ
Referer moment
"okay nevermind just write them without the X"

we love 
prefix with V
VC-Settings-Written
V-Settings-Written


V-Settings-Exploded
V- it is!
this is so painful tbh
yeah lol
Referer, spelt wrong
Referrer-Policy, spelt correctly
I mean
most web servers do support referrer anyways tho
it's better than purposely also misspelling the new one
we gotta start somewhere xd
you are not sober if you prefer the typo
xdd
i will refer to you as insane
well anyhow
I am insan
megu using non standard headers ๐๐๐๐
NO I MEANT IN SPELLING
if i remove the packing stuff then you can store whatever you want
i'll just return it literally
:^)
megu ๐ ๐ ๐ ๐ ๐
I still use Referer when dealing with headers
wtf lewi is a packer real??
lol
Packer by HashiCorp
Packer is a free and open source tool for creating golden images for multiple platforms from a single source configuration.
we should also have the ability for people to selfhost the settings sync server

a person or machine that packs something, especially someone who prepares and packs food for transportation and sale.
well it will be under GPL 3
i shamelessly stole all of vencord's eslint and licensing in preparation to shove it under vencord org or something
Also have u added rate limits?
xd
and don't forget funny cors but u probably already thought of that
hmm
app.use(cors()) 
for rate limits we can just try it out
I would say maximum 1 request per second and 20 requests per hour
but could just go higher or lower if needed
imagine not making the server blazingly ๐ fast ๐ by writing it in rust ๐ ๐ฆ
reading is cheaper than writing
so
yeah i could say only 20 syncs an hour
but unlimited reading
but writing is more needed
ye

Reading is really only needed once every time u start discord
ye
hmm it would be cool if we could have it so that when you change a setting on one client it immediately updates on other client
but don't think that's possible without a constant websocket connection?
?
thats basically just file uploads isnt it
like on http
i forget how you just transmit binary
hm
I think base64 would be the easiest
I just though of a pretty big limitation with settings sync
hm?
settings are absolutely needed synchronously
so you'll have to restart after syncing changed settings
i already thought of this
when you GET the settings for the first time, check the written header
if it matches the local timestamp, okay we're synchronized
if not, then show a popup saying the local settings are out of date
and offer a restart
yeah that's what I thought but the restart bit is inconvenient
or block until settings are synchronized, but that slows down startup time
nag bar, "settings changed remotely, restart to apply"
age of empires really said delet ๐
m
the reason why i said timestamp originally is uhhhh
conflict resolution
e.g. client has newer settings then cloud because of some reason
so when they try and sync it should warn them saying that the settings in the cloud are newer
i could do something similar to the auth header
where the etag is a b64 of the timestamp of writing and the hash of the data
hewwo where do you report bugs
it seems that platformindicators makes discord crash on discord dev
https://github.com/vendicated/vencord/issues i would assume
dev as in the development branch?! the one with the black icon?
yes
why tf are you using that 
oh okay
i just saw the same issue in #๐ฅ-vencord-support-๐ฅ
why tf they using that ๐
i asked but "why not"

i mean it shows up in vencord installer so i'd see why some would think it is
though yes it does appear platform indicators is broken
and that person in support is on ptb so yeah
it crashes when you open settings
yeah thats just a discord dev issue lol
oh fuck i was gonna test it myself
which is kinda annoying
but ig not
that person on ptb has the same issue

then i guess platformindicators is just borked
ill go have a look
but yeah one of the support questions is "if you havent already, have you tried stable?"
i'm glad i always stay on stable
canary and ptb gives time for modders to update plugins
insert comment about powercord using canary here
replugged came out shortly after and then had to be rewritten for SWC
i think they're still rewriting it
its a dying battle tbh
yeah..
only mods i know of right now is shelter and vencord
shelter doesn't have much
anyway
yeah essentially
haha
yeah plugin devs should use canary
my stance on supporting canary and ptb is essentially feel free to report bugs but don't expect them to be fixed until they happen on stable too
dev branch wontfix pls
cause its too much effort for things they might just revert again
yeah but probably still has to be fixed because changes usually make their way to stable eventually
except that
it was naia complaining to me that discord broke
so i had to troubleshoot for her
guh
fastify dosent actually support octetstream by default xd
you have to add it as a content type parser
fastify.addContentTypeParser("application/octet-stream", { parseAs: "buffer" }, (request, body, done) => {
done(null, body);
});
like this
๐ค
silly
why
idk anything about node server frameworks, since I'd never choose node for backend
@turbid hatch ping me when the thing is done so i can reimplement it in python and call it a completely separate project like i did with Project PCB (Powercord Custom Backend
)
imo go is best for backends
so it has first class support for doing json stuff (e.g. you can just return { abc: true } and it will work fine)
but everything else requires plugins
ig the demand for binary data in backends isn't that big
m, especially when its mostly file uploads
I wonder what the content type for protobuf is
why are you doing binary data anyways
oh okay
for all intents and purposes the server is just the world's shittiest K/V store abstraction

it doesn't really matter u decide
Kitsune.go
im just tempted cuz it makes it easy
do u know go?

ye
Mister Go

go away 
surprised that you even wrote it in node then
habit
icic
p much
same
I do everything quicket in node so i just default to node even when i want to try a diff lang
tbh my main reason to use go for backends is the incredible performance difference
im waiting for ven to force me to use go for something
mantika wrote reviewdb backend in python initially and after rewriting in go it uses considerably less resources and way shorter response time

tbh the main bottleneck will be redis here
unless i switch stores
oh i could do that
hm
huh
is that why it broke a bit
im using redis atm
I've only ever used postgres
i use it as a caching layer in front of postgres a lot
then why are u worried about bottleneck
huh
redis is nice
Well I don't think performance matters anyway
fastify is a web framework
redis is a k/v store
wdym "fastify is faster than redis" 
since you'll only be requesting it once like every few hours usually
and maybe write a few times
i dont know
brain death
lol
you could make it take 5 seconds to respond and it'd still be good enough
just don't make it eat 3tb ram and we good
i think i was trying to say "fastify will be waiting on redis for longer than its dispatching the request"

oh im good at that
making it not eat ram, not making it eat ram

wow lewi is devilbro's son confirmed?
crying
kitsune wireguard is dead
i was going to show off the encoder ram usage being like
minimal
please do not compare me to that Heathen
huh aoe 4 doesn't have many civilisations
megu is a go programmer they already familiar with waitGroups
real
the kitsune controller container isnt running
**github_downloader.go: **Line 129
var wg sync.WaitGroup
makes sense
ignore the variable name two lines below
ven what civ should i pick
kitsune development kicks back off again xd
wiregroup
waitguard
wireguard
soon
im really burnt out on everything atm, but now that im NEET i hope my motivation will come back again soon
yeah dont worry about it
I didn't even notice until I pushed already

so in my element that I forgot ass is a real word
Aegisub SubtitleS (ASS)
Advanced SubStation (Alpha)
fair enough
i will choose england ๐ด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ for my civ
thats a silly server
yeah
a silly server is unfortunately no longer running
(everybody stopped playing and decided to get lives)
**github_downloader.go: **Line 54
GithubDoneChan = make(chan bool, 1)
githubdone-chan uwu
uwu
alright
i got it working with octet-stream
so you can just dump things
and yay
size limits work
fate worse than having to make a vencord plugin
average github channel
ye
troll
I mean backend makes sense if it's going to eventually (maybe) do more than just settings sync
donators is a what
its a csv file in a gist
the donator badges is a csv file with user id, badge name, image
because its convenient to update
but if we're having a backend we can move it onto there and have it be json
and then have a User Interfaceโข๏ธ
and maybe get fancy and add the ability for users to customise it or whatever but thats very far future thinking
@turbid hatch you love https://github.com/Vencord/Backend
done
you should(?) be able to push to main
but lmk if u cant
epic
i would love to check it out
simply don't update to fix that
beautiful readme
idk just feels wrong
also
csv
56 0.052 git init
57 0.701 git add .
58 0.378 git commit -m "add initial backend code"
59 0.036 git remote add origin https://github.com/Vencord/Backend
60 0.045 git branch -m main
61 1.321 git push -u origin main
62 1.123 git pull
63 1.109 git push -u origin main
64 0.514 git pull origin main
65 0.740 git pull origin main --allow-unrelated-histories
66 1.854 git push -u origin main
csv horror
most sane git repo setup
what else would you use
csv is objectively more human friendly than json
json?
json is painful to write, especially on phone
i can read json far far far easier than csv
I have to do badges with json for Aliucord and I hate it
i can read xaml better
hmm yes can i have a comma here
proceeds to break the csv setup
for vencord I just add a line to the file like ID,Tooltip,Link
don't have a comma in your tooltip
simple solution
i will have a comma in my tooltip
if you want an actual solution, csv literally has a solution for that
optionally quoting columns
what
i saw this and thought i was on the list (i only memorised the first 2 digits of my id)
SOMEONE PUT THEIR BADGE AS DISCORD BUGHUNTER https://cdn.discordapp.com/emojis/938002152813633636.webp?size=48&quality=lossless
**apiBadges.tsx: **Lines 88-97
const badges = await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv").then(r => r.text());
const lines = badges.trim().split("\n");
if (lines.shift() !== "id,tooltip,image") {
new Logger("BadgeAPI").error("Invalid badges.csv file!");
return;
}
for (const line of lines) {
const [id, tooltip, image] = line.split(",");
DonorBadges[id] = { image, tooltip };
}

@cunning bobcat https://github.com/vencord/backend
there you go you can make it python now
wait i should've found this i've looked through your gists trying to find the webpack grabber thing twice before
thanks
I think that gist is private
its a github repo
yeah the gist is private
it is a secret gist ye
why do you have both a gist and a repo 
what
xd
this is json and its hell to maintain
every time I want to add a badge I need to copy paste the json scaffold from a different file
json is just bad for humans
it was never meant for humans
discrimination
real
esm 
esmbot

yeah node-fetch is esm now
@woeful bison
and i thought instead of downgrading why dont i just make it esm
terrifying
then i dont need an async function main() {}
the "gigantic" map on aoe4 is pretty small
maybe theres a mod to improve it
there's a cjs version of node fetch
you will regret this decision once u add more than one file
you will love importing from "./foo.js" in a typescript project

i already have to do source-map-support/register.js
then use js dummy
I hate that ts doesn't do that for u
**index.ts: **Line 106
if ((request.body as Buffer).length > SIZE_LIMIT) {
this should probably be byteLength
oh yep
and the code should be 413 not 400
413
that probably goes for the one above too then xd
they renamed it to content too large
you will use ssh immediately
๐ค
but i will switch to ssh at some point
GitHub have changed their recommendation several times (example).
It appears that they currently recommend HTTPS because it is the easiest to set up on the widest range of networks and platforms, and by users who are new to all this.
o
interesting
tbf that is true
my corponet doesnt allow oubound/inbound ssh connections
only local ones
I think ssh will always be more secure
since using a passphrase is less secure than private key
i haev my ssh key as a signing key too
but eh it doesn't matter much :P
so makes sense
just make sure you don't accidently expose your .git folder via a Web server
or you'll leak ur PAT

vrum
my PAT is stored on machine config, not on repo config
^^
fair fair
why does everyone post react component stack lmao
it's so useless
the actual error above is way more useful
wp.findByCode("STATUS_YELLOW", "TWITCH", "STATUS_GREY")
le not found
getStatusColor
yeah it seems like they changed how status colors work
xd
colorsighted still works though since that changes the actual status masks rather than the component itself
that function is like
function getStatusColor(status) {
switch (status) {
case Status.IDLE:
return CssVars.STATUS_YELLOW;
...
}
}
i cant find it anymore sooo
is that for getting the colors
yeah that doesnt seem to exist anymore - its just used by some build override warning
status_grey is gone
why do they hardcode it here
i cant even find that in the code
i = e.statusColor
#23a55a
why does devtools show it as rgb
that is the function
ye
interesting
.TWITCH isnt in there
lewi blind
.TWITCH is in there
okay works

i hate that we have to find functions by code like that
grr
i am anger
ah yeah
discord renamed their colours??
where did status-green-600 go
its fucking gone
burned to ashes
the
its just green-600?
O_o
i hate discord
its just primary-400?
ewww what is that
we back
ah
doesnt this update break a lot of themes?
this is why for any custom component you should always wrap it in an ErrorBoundary if you can
also this is the first time in my life that I had a use for &&=
so win in my book

My discord client keeps crashing whenever i open someones profile and sometimes randomly after these last 3 commits.
not possible
these commits fix the issue, not cause it. You probably didn't update
these commits fix the issue, not cause it. You probably didn't update
Does the chrome extension automatically update?
no, the extension hasn't been updated yet but I will queue an update now
yeah true
I just posted it cuz whatever
it wasn't my screenshot lol
Perfect, thank you.
It is updated now!
Also, check your BAT token tips please, it says your account isnt verified yet.
Which account? My GitHub should be, though I haven't checked brave stuff in ages
Which account? My GitHub should be, though I haven't checked brave stuff in ages
LOL
THAT MESSAGE
I added that years ago jokingly
It looks like youโre in an unsupported country for Brave Creators with Uphold, so your channels wonโt appear as verified. However, once your country is supported, youโll automatically become verified and be eligible to receive payouts to your Uphold account. Learn more.
lol
That error shows because Brave rewards stopped supporting my country!
(also omg I forgot I set that message years ago for a joke haha I really gotta change that)

That error shows because Brave rewards stopped supporting my country!
Try switching to a Gemini wallet! I've had a wayyy better time cashing out rewards via them :)
United States only
@austere talon merge merge https://github.com/Vendicated/Vencord/pull/504
did you solve World Hunger
not yet
what are the fixes
Properly handle when someone has nitro but is using the send fake emoji option
like sending the emojis normally unless they don't have external emojis perms
same thing for stickers
bruh distok.top is gone
ask what lol
whether they just forgot to renew
oh lol
wait we use distok for fake nitro right
I have all lottie emotes as gifs in #assets
we can use that if necessary
but I assume they just forgot
I left their discord a while ago and don't remenber invite
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
None
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
None
can we wait with merging this til we figured out the disktop stuff
so we dont have 3 million commits fixing fakenitro
yeah
which
vc double click
inb4 they reverted change
I will cry
nah
it may just be me being dumb
heh
it works
??
wtf
how is that not working
god
maybe it's a lazy loaded module that has the find I use
ven I will just send you the thing to change and you will commit
I dont want to make another PR lol
change .EMOJI_IN_MESSAGE_HOVER to [[2*
wha
wha
lol I'm confusing you so much
I want you to change this https://github.com/Vendicated/Vencord/blob/main/src/plugins/vcDoubleClick.ts#L51
to
find: "[[2*",
**vcDoubleClick.ts: **Line 51
find: ".EMOJI_IN_MESSAGE_HOVER",
and all the revealSpoiler here https://github.com/Vendicated/Vencord/blob/main/src/plugins/revealAllSpoilers.ts#L32-L37
to removeObscurity
**revealAllSpoilers.ts: **Lines 32-37
{
find: ".revealSpoiler=function",
replacement: {
match: /\.revealSpoiler=function\((.{1,2})\){/,
replace: ".revealSpoiler=function($1){$self.reveal($1);"
}
I don't want to make another pr just to fix those
no they renamed it
#313
At present, you can authorize the Vencord OAuth application (in app) and sync settings to and from the server, with timestamp validation. Next steps would be to sync on startup if necessary, encryption(?), actually check if settings sync is enabled for certain operations, and then finally prettying up the UI before shipping.
The backend server (https://github.com/Vencord/Backend) is a running project alongside this PR and nothing is final as of writing.
F
can't we just convert discord stickers to gif too
aren't they apngs or something
this is heavy spaghetti rn btw, ill tidy it up nearer to review time but i just wanted to push the code out so i didnt forget xd
as i said, #assets has all of them
but a lot of them are terrible like https://cdn.discordapp.com/attachments/1038820396335640576/1038826000760459404/823974429834477578.gif

message link experiment
ye
I don't even have the experiment enabled
i made it public
therr u go
most of them are good
its just that one i sent
i have a huge json that has the id to link mappings on my laptop
actually #assets is missing some
how did you generate them
can you regen them?
idk why it says apng2gif
instead of lottie2gif
i may be stupid
1e45fca windows: Show more helpful error for used by an... - Vendicated
a wrong chat
sorry
I'm not in the US and still works for me, so could be worth a go.
whats the region comments in the backend o.o
did you never hear of that?
nop
you can use it to divide your code into regions then fold specific regions
I think the feature was invented by Visual Studio? but might be wrong
yea that makes sense
ye it was part of c# as a noop preprocessor comment
for ides
in vsc you can use them anywhere to create folds
its just for organisation
ill split them out to proper files later :P
@spark cove
ah real
11326ef Bump golang.org/x/image from 0.1.0 to 0.5.0 - dependabot[bot]
Bumps golang.org/x/image from 0.1.0 to 0.5.0.
Commits
e6c2a4c tiff: don't pre-allocate giant slices before reading
3db422c go.mod: update golang.org/x dependencies
bb712eb go.mod: update golang.org/x dependencies
9b8a3be font/plan9font: limit the font image's dimensions
c5235ae font/plan9font: fix byteoffset for non-zero origin
0888fdd font/plan9font: fix bounds overflow
9fdfde7 go.mod: update golang.org/x dependencies
See full diff in compare view
[!...
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
Discord Account
RobertR11#7841
What happens when the bug or crash occurs?
Using the CSS :has() selector in the QuickCSS editor doesn't do anything. Other selectors like :not() do work though.
Example of :has() that removes the nitro button above the direct messages list, which does work in other CSS editors like Stylus, but not in Vencord:
.channel-1Shao0:has(a[href="/store"]) {
display: none;
}
What is the expected behaviour?
I expect the :has() select...
:has() is not implemented on the electron version discord runs on (Electron v13 iirc). However, discord canary has switched to electron 22 so we may be seeing it come very soon.
I have just downloaded and tested canary and it does work there, so I guess I'll have to wait for stable to update.
no way i was actually helpful (real?)
lol did that guy expect us to backport has selector
no i think they just didnt know about it not being on discord
made RicherCider into RicherMusic, which will support more then one music app, and adds support for WACUP (Winamp Community Update Project)
Not our primary directive with our plugin, there is also another plugin that is already capable of doing this.
oh jooby
finish yourself lazy, you have half a year of no school
As mentioned in a similar pr, fx is simply better due to being more feature rich so the addition of this is pointless. I'm also not accepting any new text replace plugins since they're too repetitive and opiniated, I will only accept a generic text replace plugin that allows the user to specify custom rules as that will cover all cases
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
None
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
None
@RGBCube I see this as a great opportunity to learn typescript for you
this is in webpack commons!
you could Promise.all these
const [oldGuilds, oldGroups, oldFriends] = await Promise.all([
DataStore.get("relationship-notifier-guilds"),
DataStore.get("relationship-notifier-groups"),
DataStore.get("relationship-notifier-friends")
]);
actually there's DataStore.getMany
Looks good but i want to test this more because I'm worried it could break stuff
e14ec96 feat(FakeNitro): Bypass client themes and fixes... - Nuckyz
oops i forgot tomerge this sorry
77c6916 ReviewDB: Show edit instead of create review wh... - lelboatz
pretty sure this is in multiple plugins now (?), if so please move to commons
marking as draft so i don't accidently merge before permviewer also oh no a conflict can u pls solve
i don't think this is something I'm interested in doing since I don't think it's very useful and just adds more things I need to maintain, not to mention once there's a winget package, people will also ask for a scoop package, a deb, an aur package, and so on. The installer is something you usually will only need to use once anyway so I don't really see the point and if you really find it that much of a chore you could write a simple powershell script to do it for u!
I'm pretty sure winge...
add bulk fetching ๐
Discord Account
refact0r#1494
What happens when the bug or crash occurs?
Unlike the vencord and updater pages, the toggle buttons on the plugins page don't get a checked-16gMAN class when toggled on. This means that themes can't change the color of the button when toggled on. (i hate green)
What is the expected behaviour?
The toggle button should have
class="container-1QtPKm default-colors checked-16gMAN" when toggled on
class="container-1QtPKm default-colors" when t...
how do i type the vars with DataStore.getMany
can't you just use the css :checked pseudoclass
i don't think so because the checkbox's container div has the color, not the checkbox itself
My changes also recommending replacing the lastfm-large asset in the Discord application with either Last.fm's placeholder song icon (which is what the API incorrectly provides if the album has no art) or Last.fm's placeholder album icon for consistency, because TBH [this](https://user-images.githubusercontent.com/1149870...
I'll share the code from my, now abandoned, timezones plugin
import { Devs } from "@utils/constants";
import { useForceUpdater } from "@utils/misc";
import definePlugin from "@utils/types";
import { findByCodeLazy, findByPropsLazy } from "@webpack";
import { Text, useEffect, useState } from "@webpack/common";
import { timezones } from "./all_timezones";
const EditIcon = findByCodeLazy("M19.2929 9.8299L19.9409 9.18278C21.353 7.77064 21.353 5.47197 19.9409");
const ...

tbh I was thinking banner approach is better but this looks pretty good and clean too, ty
test
@crude hearth why do you save the timezones like that?
you could have used an object instead of mixing them with the other settings
jesus
well thats another way to do it 
anyways, im working on your plugin as well, since there is no reason to work on a separate one
plaese finish it ๐๐ฟ its been months
tbh I think most of the plugin is done
right now I need to be sure its working and make a modal to set timezones
instead of ugly retarded slash commands
i think this should be enough to safely migrate any existing settings
start() {
const settings = () => Vencord.Settings.plugins.Timezones;
const keys = Object.keys(settings()).filter(key => key.startsWith("timezones."));
const migratedTimezones = settings().timezones || {};
for (const key of keys) {
migratedTimezones[key] = settings()[key];
delete settings()[key];
}
settings().timezones = migratedTimezones;
},
why did I wrap the settings in a function? cause I am paranoid about the proxy
yep works
phew
i also added input validation
same list can be used for a dropdown in the modal to pick the timezone
you dont need to migrate lmao
theres probably no one using it
since its a draft
YOU WILL ADD BATCH FETCH
if this is cache, do not cache them in settings
use DataStore
hi
this plugin lets you zoom into images and gifs
scroll wheel to increase / decrase zoom level
shift + scroll wheel to increase / decrease lens size
would love feedback
commit messages are a rollercoaster.
commit messages are a rollercoaster.
who cares about prs commit messages
You will render the element and apply the settings outside the module code, inside your plugin code
same thing here, do the code inside your plugin, not the module code
ooops forgor about that however i dont think we need them
what would you like me to change it to
just remove the joke part
i feel like we could add a setting option to change the 200. like maybe a slider from 0.1 to 2.0 (or higher)
then x = zoom + e.deltaY * settings.multipler;
maybe /shrug
basically how fast it should zoom in
i implemented it so play around with the setting if you dont understand (my bad)
not cache, permanent data, bruh
you should not store them in settings anyway
const val = this.state.size + (e.deltaY * Settings.plugins.ImageZoom.invertScroll ? -1 : 1) * Settings.plugins.ImageZoom.zoomSpeed;
const val = this.state.zoom + ((e.deltaY / 100) * Settings.plugins.ImageZoom.invertScroll ? -1 : 1 *) Settings.plugins.ImageZoom.zoomSpeed;
@spark cove make eslint rule that enforces use of settings store NOW
@rustic nova define plugin settings outside the definePlugin object, export it and use there
LOL
I will open PR migrating all plugins to definePluginSettings
making that rule implies fixing all to pass tests
unless you make it a warn for now
oops
actually making an eslint rule for this should be super easy I think?
check if property "plugins" is read on an object called "Settings"
done
well, what if we add a settings UI for the saved timezones?
is there a way to load plugins from local files
what if u just check for @deprecated usage
you should still not store them in settings
:pepesadge:
ah yes
it has similar api but async
all my other plugins abusing the settings: https://cdn.discordapp.com/emojis/861971606352297985.webp?size=48&quality=lossless
to be fair, the data store api was still in the works when i started making my other plugins
if you want tho I could actually
(settings as any).lmao = "lol"
jk
settings have many limitations and are synchronous which means you're blocking the entire ui














