#๐Ÿ‘พ-core-development

1 messages ยท Page 26 of 1

limber skiff
#

closing the formatted file works

austere talon
#

it's an issue with old chromium I think

limber skiff
#

you close it, click on the unformatted and format

austere talon
#

I have it set to always format

#

I'll just keep using armcord

#

do you use Windows or Linux?

limber skiff
#

oh

#

windows

austere talon
#

F

limber skiff
#

is using armcord for development better

austere talon
#

on Linux you can easily use system electron and it fixes it

limber skiff
#

overall

austere talon
limber skiff
#

god we need web development

limber skiff
#

well

#

maybe for volume booster

#

lol

austere talon
#

Also it stores settings in localStorage so it's a bit harder to edit settings when you're in a crash loop

limber skiff
#

what settings?

#

vencord?

austere talon
#

other than that it's pretty solid

#

yeah

limber skiff
#

ah

woeful sable
#

we will make armcord vencord fork that saves vencord settings locally

limber skiff
#

no

#

we will support development in browser

#

for 10000xxxxx quicker restarts

austere talon
#

could

#

its not hard

limber skiff
#

I would do it but I would need to kinda learn from scratch

austere talon
#

since most if not all context menus are lazy loaded we could auto patch them

woeful sable
#

we will add hot-reloading

limber skiff
#

whew armcord starts so much faster

austere talon
#

would just make all functions calling it pass arguments to it as well

#

instead of regex we could instead find the index of name.export( then use balanced parentheses matching

woeful sable
#

what if I did live-reloading per-plugin

austere talon
#

you cant live reload patches

limber skiff
#

which one auto formats?

woeful sable
#

yeah but u can other stuff

limber skiff
#

ah

#

found it

austere talon
#

but its kinda broken

#

idk why

grave mangoBOT
austere talon
#

file watching is so pain

#

you will fix that instead

woeful sable
#

I ran into similar issues with quartet css

#

I will fix

#

debounce probably fixes actually

austere talon
#

nah

#

i think i had debounce and it didnt

#

quickCss watcher functions fine also

woeful sable
#

why dont u webFrame.insertCSS

austere talon
#

terrible

limber skiff
austere talon
#

it just doesnt work 90% of the time

limber skiff
#

๐Ÿค”

#

does for me

austere talon
woeful sable
#

alr I will take a look soon

austere talon
#

idk

woeful sable
#

messing around with lastfm rn

austere talon
#

actually i remember

#

specificity issue

#

note how our css is at the end of the document, outside head

#

this is because if we put it in head, discord will put their css afterwards and now discord's css is more specific than ours, overwriting it

limber skiff
#

ayo???

#

wow

#

super FANCY

woeful sable
#

unreal I will have to PR a PR again

charred monolithBOT
austere talon
#

so uselss

woeful sable
#

I changed too much to just suggest

charred monolithBOT
woeful sable
#

ven if I give u patch can u push it to #483 trolley

unborn garnet
#

is fix

charred monolithBOT
austere talon
#

d d

charred monolithBOT
austere talon
#

doesnt the message content already have funny words

#

is this just to account for single word messages or what?

unborn garnet
#

not if "do not use cover" is used

austere talon
#

oh

#

i see

unborn garnet
#

yop

#

otherwise is good?

charred monolithBOT
unborn garnet
#

thanks venven

austere talon
#

god so many prs

#

we are almost at #500

turbid hatch
#

๐Ÿ˜ข

unborn garnet
woeful sable
#

ven will apply my malware patch

unborn garnet
#

im so glad i got out of that first time pr hell

woeful sable
olive vapor
#

If that affects more than just LastFM, that should probably be a different PR. I can merge it into mine afterwards.

woeful sable
#

doesn't really matter, I just edited CustomRPC cuz their code is based off LastFM's and had the same bug

#

if you'd prefer I can PR to your repo lol

olive vapor
#

I mean, that would make the most sense since you authored the changes lol

#

btw, just letting you know I just force-pushed to my PR to sync the fork.

woeful sable
#

yeah I just saw that

#

to sync with main?

olive vapor
#

yeye

woeful sable
#

you don't need to, ven usually does that for u before merging

olive vapor
#

eh the website gave me a button to do it automatically lol

woeful sable
limber skiff
#

@austere talon any way to get keybinds working on armcord

woeful sable
#

@olive vapor PR'd

austere talon
#

i was gonna reimp,ement them

limber skiff
#

mute keybind so useful

olive vapor
woeful sable
#

not a big fan of undefined being used like that

#

setActivity was also changed to | null because that's what discord actually checks for in their code

olive vapor
#

Didn't know that. Got it.

#

oh wait is that why the presence wasn't clearing.

#

i thought that was just discord being dumb lol

woeful sable
#

it should clear anyway but yeah it probably breaks something

olive vapor
#

Also:

logger.error("Failed to query Last.fm API:", e);
```I had the error in a new line just for nitpicky reasons. I just hate having everything in one line. lol
woeful sable
#

that makes the actual error object appear in console which might be useful-ish but yeah I understand

olive vapor
#

i mean, in that case, yeah probably keep it lol

woeful sable
#

apparently last.fm doesnt set statusText

#

(and yes that is set by the server http is quite silly)

olive vapor
#
const json = await res.json();
if (!res.ok || json.error) {
```the second condition is unnecessary because Last.FM gives an HTTP error anyways if API errors. however, won't this throw an error if we get a error outside of the API since no JSON is returned?
woeful sable
#

I'd keep it just in case

#

in the event that happens it'll give a bit more useful error message

#

let me see what I can do about invalid json

olive vapor
#

wouldn't just throw an error trying to request the JSON?

#

It might just be better to

if (!res.ok) {
  try {
    const json = await res.json();
    // Throw API error.
  } catch {
    // Throw error from Request
  }
}
woeful sable
#

check my latest commit

#
let json: Record<string, any> | null;
try {
    json = await res.json();
} catch {
    json = null;
}
if (!res.ok || !json || json.error) {
    // ...
}
#

kindaa ugly

olive vapor
#

bleh

woeful sable
#

wait lol u can do this apparently ```ts
const json = await res.json().catch(() => null) as Record<string, any> | null;

#

@austere talon pick insanity

olive vapor
#

okay so here's the thing lol

#

This was so the album information is correctly set

woeful sable
#

it still does cuz it only depends on large_text

olive vapor
#

But you changed the code back to the original lol

woeful sable
#

no it's different than original

olive vapor
#

oh

woeful sable
#

the only change (to your code) is it doesnt set the small image as lastfm-small so u don't have two logos for no reason

olive vapor
#

i mean

#

i kept saying to replace the large logo placeholder with lastfm's album placeholder for a reason

woeful sable
#

now u don't need

olive vapor
#

eh i think it looks better if it's consistent personally

woeful sable
#

mm

#

well my PR is ready

olive vapor
#

eh. i still think consistency is better.

#

UI should always be consistent.

woeful sable
#

guh

#

I won't change

olive vapor
#

what why

woeful sable
#

idk why you're bothering me so much abt this I literally don't agree with the change

olive vapor
#

because the giant lastfm logo looks ugly af? ยฏ_(ใƒ„)_/ยฏ

#

and because inconsistent UI looks ugly af?

woeful sable
#

can u stop

#

please

spark cove
olive vapor
#

only problem is i don't have access to the dev app

austere talon
#

using the lastfm placeholder makes 0 sense

#

its lastfm's placeholder, not Discord's

#

using the lastfm icon makes way more sense as a placeholder

#

since that's what you're doing, scrobbling last.fm

olive vapor
#

but we already have the last.fm icon as the small icon. that's fine.

austere talon
#

just add a setting to use a custom application id

#

we can bikeshed all day long about everything but theres no point

#

just make a setting to have a custom app id

#

easy fix

olive vapor
#

and last.fm is supposed to provide placeholders already. i just see using lastfm's placeholder as a workaround for lastfm api being stupid.

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

woeful sable
#

1

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

charred monolithBOT
void echo
#

whooooooop i fixed it took ages lesgoo

austere talon
#

you enabled an experiment

#

all ur fautl :P

void echo
#

nah this started before I actually got vencord

#

i made a timeline to be sure

#

I had to actually ENABLE an experiment to fix it coz my account is still marked as a staff accout serverside

#

at least parially

#

I enabled this banner thing which lets me manually umute stuff

#

sponsoring tf outta vencord tho

void echo
#

also, seperate thing, glad to see ur a based kotlin enjoyer too

austere talon
austere talon
#

well glad u fixed it

void echo
#

gonna need vencord now so i can keep that experiment enabled lmaoo

#

and ty

charred monolithBOT
verbal pumice
#

what's the best way to update a component every time a flux event is fired? i currently do it by subscribing inside of a useEffect hook but that feels stupid

austere talon
#

either that or you can useStateFromStores

charred monolithBOT
pure ledge
#

you added desktop notifications to the api already

#

so theres no need for the setting on the plugin anymore

charred monolithBOT
austere talon
#

yeye i see

#

i misunderstood

limber skiff
#

seems like a race condition issue

#

no idea where it happens cuz react call stacks are horrible

#

I would have to spent a year to find it

#

but updating the user in the store early prevents the issue cuz it reaches some fallback function to get the missing user and finds it in the store

charred monolithBOT
charred monolithBOT
woeful sable
#

okay I need to do activitychanger immediately

#

@spark cove OptionType.ARRAY

#

need

spark cove
#

guhh

#

no code

#

bad

#

code so bad

#

coding is so dumb..

woeful sable
#

its ok u can make another day

spark cove
#

will

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 323431
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,1800}"more-options-popout"\)\);if\()/

Bad Starts

None

Discord Errors

limber skiff
#

๐Ÿ˜ 

limber skiff
#

we love changing 1800 to 2000 for fixing the patch

limber skiff
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

I think it would be useful if we had the ability to whitelist/blacklist file extensions; e.g. I want to randomize my image names as they are not normally shown anyway but potentially leak info without the user noticing. In contrast, you may not want to randomize PDF names etc.

An alternative/additional idea to this would be to have a button while uploading files to disable name randomization just once (per-file like spoiler button?)

cunning bobcat
#

wtf is that embed

limber skiff
#

what's wrong with ut

cunning bobcat
#

looks different from what im used to

#

makes it seem cursed

charred monolithBOT
limber skiff
#

where did you find this module?

austere talon
#

what module?

limber skiff
#

the one for opening context menus

austere talon
#

why do u ask

limber skiff
#

gonna do the thing

austere talon
#

same id still works

#

wreq(769672) .ZP

limber skiff
#

stable?

austere talon
#

ye

limber skiff
#

guh I'm so dumb

#

I was checking the source code that renders the context menu (like way above the place it makes the menu)

charred monolithBOT
charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 323431
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,1800}"more-options-popout"\)\);if\()/

Bad Starts

None

Discord Errors

turbid hatch
#

rip

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 290075
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,1800}"more-options-popout"\)\);if\()/

Bad Starts

None

Discord Errors

limber skiff
limber skiff
#

I absolutely love that find

charred monolithBOT
charred monolithBOT
charred monolithBOT
cunning bobcat
#

hey isnt that that person who made a rich presence thing

#

yep

#

also this :nope:

charred monolithBOT
charred monolithBOT
woeful sable
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

stuff i wanna add before i'd consider this ready

  • [ ] drag and drop tabs
  • [ ] typing indicators
  • [ ] "open in new tab" context menu option for guilds/channels/message links
  • [ ] right click on the "Jump" button of search results to open in a new tab
  • [ ] remember tabs on close
  • [ ] specific set of tabs at startup
  • [ ] look good on light theme
    also i didn't test this with group dm's and favorite servers so probably all hell breaks losse there

screenshots
![image](https://use...

charred monolithBOT
#

I decided to make an idea about it, since the original plugin from BetterDiscord is broken and haven't been fixed for long.
ColorSighted is a plugin that removes colorblind status indicators from Idle, Do Not Disturb and Offline statuses and replaces them with fully circular indicators, just like how they used to be in 2015-2017 Discord.

Here is a screenshot from the original developer to see how it looks like:
![image](https://user-images.githubusercontent.com/56230182/219114033-0e58fdc...

turbid hatch
#

@austere talon hoi! there's nothing saying i cant put another plugin in my PR right?

#

if thats the case i'll write this one and include it in RCE's PR

cunning bobcat
#

can't that be done with css?

turbid hatch
#

yeah but some people dont want to use css cause it causes lag

#

its a really easy patch

#

and its more performant too SataniaThumbsUp

charred monolithBOT
quick ibex
turbid hatch
#

aw man

#

i gotta fuck up my branching

quick ibex
#

make a seperate pr

turbid hatch
#

or get ven to merge RCE so i can fix my local repo

#

xd

quick ibex
#

it is what it is

#

Just cant have two plugins in one pr, as one plugin could be acceptable but the other not

turbid hatch
#

welp

#

new fork time

#

oh i cant make two forks of the same repo?

#

boooooring

quick ibex
#

make branches

turbid hatch
#

yes

#

that was what i was going to do

#

but i wrote RCE on the main branch by accident

quick ibex
#

๐Ÿ’€

turbid hatch
#

thats why i said i need to fix my local repo by having the PR merged

#

although i suppose i could make a branch and then revert history

#

but then i have two incompatible branches so id rather not

#

(pls merge ven, give the people what they want (rolecoloreverywhere))

cunning bobcat
#

i do not want rolecoloreverywhere and i am the people ๐Ÿ’€

turbid hatch
#

you do not represent!!!

#

i haev had no less than 2 PEOPLE

#

demand RCE

cunning bobcat
#

schizophrenia

turbid hatch
#

oki

#

pls merge RCE so i can do that xd

#

i ruined my repo cuz i did it on main by mistake

austere talon
#

you can fix it easily

verbal pumice
#

delete the fork and make a new one (/s if not obvious)

turbid hatch
#

hmm

#

rename main branch

#

make new branch synced with mainline

#

make that the new main branch

#

ah but ive done merge commits so that wont work, itll create deviating histories

austere talon
#

one time setup:

git remote add upstream https://github.com/Vendicated/Vencord

make a new branch and reset it

git checkout -b colorsighted
git fetch upstream
git reset -hard upstream/main

do changes then

git add .
git commit -m "..." 
git push -u origin colorsighted
turbid hatch
#

oh that'll work

#

then i can undo my stupid main branch changes once RCE is merged

#

uh oh no that wont work cuz it'll create a dupe commit with the contributor info

austere talon
#

wdym

turbid hatch
#

resetting to upstream means im not in the contributor file anymore

#

if i create a new commit that touches that it'll be a merge mess

cunning bobcat
#

you love git

turbid hatch
#

i really fumbled the bag on this one

turbid hatch
#

welp im gonna go drink

#

brb

austere talon
#

wha?

#

I don't get the problem

cunning bobcat
#

the Devs constant

#

they'd need to add themselves to it in both prs

#

altough

#

now that i think about it, that shouldn't be a problem if github is actualyl competent

austere talon
#

How's that a mess u just press restore and it's fixed :P

#

or do a merge commit

#

it's only messy if you change a lot about a file and a different pr also changes a lot in that file

turbid hatch
#

i could cherry pick it onto this branch

#

xd

austere talon
#

nope

turbid hatch
#

idk it just seems like its fucked if i do this

austere talon
#

doesn't make a difference to cherry pick

#

the cherry picked commit is gonna be squashed away

turbid hatch
#

so if i add myself to the constants again

#

it should be fine when both prs are merged?

austere talon
#

yes

turbid hatch
#

alright lets see how this goes

austere talon
#

you simply get a merge conflict but it takes 5 seconds to fix

turbid hatch
#

ive done something like this before and it was fucked when i had to fix it :P

#

so hopefully itll be okay

austere talon
#

better advice is to never use the main branch

#

leave it untouched and always use feature branches

turbid hatch
#

i thought i had done my commits on a feature branch

#

but i went through my history and it errored

#

and i didnt know until it was a bit too late

#

:P

#

so i just committed (no pun intended) and went on with the development

charred monolithBOT
austere talon
#

btw can't u do that with css?

turbid hatch
#

already had this discussion xd

cunning bobcat
#

"yeah but some people dont want to use css cause it causes lag" and a plugin wont??

turbid hatch
#

well the plugin is just a single patch and nothing else

#

all im doing is just replacing Masks.STATUS_(IDLE|DND|STREAMING|OFFLINE) to be Masks.STATUS_ONLINE which is objectively more performant than writing CSS to replace the individual masks

#

even if its by a little bit

cunning bobcat
#

have you done the benchmarks

turbid hatch
#

yes, its fractionally more performant

cunning bobcat
#

may i see the benchmark results

turbid hatch
#

because a) there's no extra style rules being loaded and b) it means people can just toggle a switch and dont have to find css / write it themselves

#

i'll reperform it for you, i didnt write it down

austere talon
#

performance doesn't matter cause both will perform just fine :P

#

I still think css is the better solution cause more robust, but in any case that plugin is super simple so it's whatever

turbid hatch
#

well i redid it by profiling with both the plugin and some css that has the path data hardcoded and its more or less the same now on my PC, must've just been an edge case when i originally did it

#

shrug

turbid hatch
#

btw my next thing might be that global settings sync thats been in discussions since december

#

i wanna try some proofs of concept first before i say anything though

austere talon
#

how would you implement the server side tho

turbid hatch
#

probably just a cf worker

#

the serverside seems the least problematic, worker + workers kv will do the job just fine

#

its the implementation detail which is the problem

#

what encryption to use? how to share keys? what happens if someone gets a url?

#

stuff like that

#

and there's a multitude of solutions

#

just have to find the best one, hence why i'd wanna do several PoCs before saying anything concrete about how i'd implement it

#

i know how id want to do the encryption and storage bit, just not how to do the authentication bit

austere talon
#

discord oauth :P

turbid hatch
#

oh no i mean like

#

after that

#

what's the best way of sharing a secret or whatever

#

cause if you're doing settings sync it has to be able to be done cross-device :P

#

though i suppose you could say, get the secret key from one install and copy it to another

#

but itd be much more convenient if you could just login and it auto gets the secret

#

but then that means we're storing secrets somewhere which is a lil bit bleh

#

ah i think i solved it

#

nvm

#

okay i know how to do it

#

this is like a 5 minute thing though so obviously a lot of this is subject to change, but thats the rough idea

cunning bobcat
#

what the fuck is a pepper

turbid hatch
#

static secret

#

like a salt except not included with the hash, but it doesnt change

#

https://en.wikipedia.org/wiki/Pepper_(cryptography) wikipedia explains this better than i do

In cryptography, a pepper is a secret added to an input such as a password during hashing with a cryptographic hash function. This value differs from a salt in that it is not stored alongside a password hash, but rather the pepper is kept separate in some other medium, such as a Hardware Security Module. Note that the National Institute of Stan...

cunning bobcat
#

so this is a pepper and not salt

turbid hatch
#

yes

cunning bobcat
#

cool

turbid hatch
#

salts are a dynamic value that changes, and its stored with the hash

#

their purpose is to make a hash unique even on duplicate inputs

#

peppers are specifically just so that even if you know the input you cant calculate a hash without also knowing the pepper (since its not stored with the salt), but without a salt it produces the same hash on duplicate inputs

cunning bobcat
#

i see

turbid hatch
#

salts can't be used here because otherwise we'd have to enumerate every key to find your id's hash (essentially bruteforcing ourselves)

#

which is expensive in computation and infeasible

#

but a pepper makes it harder to find your k/v pair which is good for anonymity

austere talon
turbid hatch
#

letting people pick their passwords will lead to people picking insecure passwords

#

and if they lose their password, well.. fuck!

austere talon
#

not like settings need strong protection :P

turbid hatch
#

mm

#

debatable if plugins start storing secrets in settings

#

because yes, we could just binpack them for storage optimization and have a secret along with their user id

#

but we dont know what will be going in the settings file at all

woeful sable
#

real

charred monolithBOT
frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 290075
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,1800}"more-options-popout"\)\);if\()/

VoiceChatDoubleClick (found no module):
ID: -
Match: className:"channelMention",iconType:(

Bad Starts

None

Discord Errors

limber skiff
#

more fixes to include

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 290075
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,1800}"more-options-popout"\)\);if\()/

VoiceChatDoubleClick (found no module):
ID: -
Match: className:"channelMention",iconType:(

Bad Starts

None

Discord Errors

charred monolithBOT
austere talon
#

brooooo i merge 5 prs and look away for 2s and theres 10 new ones

limber skiff
#

you are welcome

austere talon
#

gonna retire soon im getting too old

turbid hatch
limber skiff
#

oh

#

wait no it's not

austere talon
#

it is impossible

#

if there's exactly 1 other person typing then there's three people typing

limber skiff
#

nookies, ven, lewimachine and 1 other are typing

austere talon
#

and there's a different message for three

austere talon
#

it says nookies, ven and 2 others are typing

limber skiff
#

oh it only shows 2 users?

austere talon
#

ye

turbid hatch
#

yes

limber skiff
#

ahhh

#

I thought it was 3

turbid hatch
#

nop

limber skiff
#

let me undo it

turbid hatch
#

also ven for the poc im not gonna do encryption

#

ur right

#

its overkill

limber skiff
#

oh you did already

austere talon
limber skiff
#

anyways I changed it on typing indicator too lol

charred monolithBOT
limber skiff
#

friend nicknames aren't applied on guilds

#

so I won't apply it there either

limber skiff
#

it would be much nicer to use Discord's strings for this instead, that way it's localised

typing tweaks doesn't modify the discord string anymore ๐Ÿ˜ข

limber skiff
#

lol

austere talon
#

or just use the default one maybe and use better one if TypingTweaks is on?

limber skiff
#

sure

austere talon
#

did u figure out a way to grab the props?

limber skiff
#

yeah

#

it's this

#

and then it's here

austere talon
#

sick

#

that works for everything?

limber skiff
#

yeah

#

we are patching aaaaaaaaaa lootttttt of context menus

austere talon
#

any noticeable performance change?

#

i assume no

limber skiff
#

even this

austere talon
#

fire

limber skiff
austere talon
#

how many are loaded right away and how many lazily?

limber skiff
#

let me see

charred monolithBOT
limber skiff
#

ven silly

austere talon
#

what if you dont want to check navId

#

but some other stuff

#

like a contextMenu logger that logs all opens

limber skiff
#

hmhmm

#

I still want to keep the nav way though

turbid hatch
#

hey i got my PoC working

#

nice

austere talon
#

ok github

limber skiff
#

@austere talon 33 patches ven

#

33 context menus aren't lazy loaded

austere talon
#

interesting

limber skiff
#

most patches take 0.1ms

#

some take up to 7ms though

#

it's like 2 only

charred monolithBOT
#

I'm not a fan of this spread, not only will it unnecessarily make and destruct a lot of arrays, it also doesn't cover the case of modifying something like children[0].props.children. Also are you sure children is always an array? The name is a bit misleading, in the case of a single child it will be a flat ReactNode. If you really want to do this, wrapping it with a Proxy would be more robust, but I personally don't think it's necessary to even do this in the first place

limber skiff
#

and then there is one that takes 3

turbid hatch
austere talon
#

oh look ur pr merged cleanly @turbid hatch

turbid hatch
#

did it

austere talon
#

i didnt even have to solve conflict

#

github just knew

turbid hatch
#

im actually sorta shocked

#

wtf

austere talon
#

privacy with that is questionable

turbid hatch
#

o

#

what would you use then?

#

i could give it a go

turbid hatch
#

oh i could try fly

#

i was meaning to try that at some point

#

or would you just wanna stick it on a vps somewhere

austere talon
#

If i were to make it I would probably selfhost it

turbid hatch
#

selfhost it is!

austere talon
#

though then there's other things to think about like not getting ddosed and people dumping 1tb shit

turbid hatch
#

i was going to enforce a 32kb limit for settings data

#

which is more than enough

#

thats accounting for json settings + quickcss

austere talon
#

i mainly just don't like cloudflare because they have a lot of privacy invasive services and are basically a monopoly at this point

#

Idk if Vercel and similar are any better, but I personally (and so do many other people I know of) don't really trust cf

austere talon
#

3gb is nothing

#

(we obviously dont have that many users haha i just chose an arbitrary high number)

turbid hatch
#

though i can get the same setup with node and redis so its no biggie

#

:P

turbid hatch
limber skiff
#

oh yeah I remembered why I don't use waitFor

#

it doesn't give me the key name

turbid hatch
#

you dont need that much storage for settings sync so we could throw it on some cheapish vps and itll handle it fine

limber skiff
#

like ZP: () => ge

turbid hatch
#

also re: ddos, idk, ill take care of it xd

#

if you get a server from hetzner their ddos protection should be good enough for it

austere talon
#

wtf is that

turbid hatch
#

emdash

austere talon
#

its 2023 already jeeeez ๐Ÿ˜ค

turbid hatch
#

it didnt encode properly in the patch

austere talon
#

discord living in 2023

turbid hatch
#

so i just used the unicode for it

austere talon
turbid hatch
#

ah perfect

#

who's it with?

austere talon
#

if mantika didnt blow it up

austere talon
turbid hatch
#

Ah.

#

yknow what

#

i can work with it

#

ive not used oracle linux before but its a learning experience

austere talon
#

not the best but its free :P

austere talon
turbid hatch
#

yeah

#

oh is it just rhel

austere talon
#

okay so

#

take rhel

#

add 20gb oracle bloatware

limber skiff
#

can I do this?

turbid hatch
#

got it

#

so just shittier rhel

austere talon
#

add stupid useless oracle repos to dnf

#

ye its dollar store rhel

turbid hatch
#

okay i know how to use oracle linux

austere talon
#

it was either ubuntu or dollar store rhel and honestly ubuntu haunts my darkest nightmares

turbid hatch
#

i usually exclusively use ubuntu server

#

mainly out of habit

austere talon
#

i have ptsd

turbid hatch
#

well anyhow

#

yes i can work with that

#

also by the time we hit like

turbid hatch
#

3GB im sure youd have enough sponsors to afford a slightly less terrible vps

#

xd

turbid hatch
#

but yeah, i can whip up a self-hosted version of that tomorrow

#

shouldnt be too difficult

#

then vencord settings sync can become a reality :3

austere talon
#

im sorry if you already integrated with cfs stuff

turbid hatch
#

nono dont worry

charred monolithBOT
turbid hatch
#

it was a PoC, i was bound to change all of it regardless

#

gu

austere talon
turbid hatch
#

h

#

all of that was the original code xd

#

lemme batch it

austere talon
#

well u pred it so its yours now ferrisBasedferrisBasedferrisBased

turbid hatch
#

true true

#

RCE is my baby now

#

oh wait no i wrote that

#

i just forgot i could do the shorthand

#

xd

austere talon
#

appreciate this high effort meme

turbid hatch
#

typEDEFS

austere talon
#

god they butchered paint in win11

turbid hatch
#

ye

#

it sucks

#

:<

austere talon
#

those return types are inline hints right

turbid hatch
#

yeh

austere talon
#

ah

#

is that builtin?

turbid hatch
#

if they werent id break them obvs

#

uhhhh

#

yyyyyyyyyyyyyes i think so

austere talon
#

im so torn on inline hints

#

On one handtheyre really useful

#

on the other hand they are so ugly

turbid hatch
#

i use inlays a lot to understand typing

austere talon
#

so i usually keep them off :P

turbid hatch
#

i dont like how they look but they provide a lot of context to me

austere talon
#

i wanna use them but every time i do i get headache

turbid hatch
#

e.g. for a query string, it can return string | string[] | undefined

#

and i get confused whenever i cant do certain things

#

and the big error doesnt help

#

anyway resolved ThumbsUp

charred monolithBOT
austere talon
#

do i test or no

#

kinda high effort

turbid hatch
#

ive been rolling with it since the start

turbid hatch
#

and youve seen me @ you with dev updates xd

#

though do test anyway

#

cuz

#

i mightve missed something

austere talon
#

too late

turbid hatch
#

ur doing what i asked you to nerd

austere talon
#

omg amazing plugin

turbid hatch
#

OH MY GOD GUYS

#

I ADDED SCREENSHARE AND TEXT CHAT TO STAGES

#

!!!

austere talon
#

no.json

turbid hatch
#

lol?

#

oh

#

norwegian?

austere talon
#

LOL

#

true

#

why is it 403 tho

turbid hatch
#

so is en

#

the url is just bork

austere talon
turbid hatch
#

i am so god damn proud of that

austere talon
#

what if

#

NOW (jk)

turbid hatch
austere talon
#

but someone will def request that in 2 business milliseconds

turbid hatch
#

well they can shit and piss on the floor

austere talon
#

whats a coloured role i can ping

turbid hatch
#

usurper

austere talon
#

<@&1062536788184404069>

#

workey

#

@turbid hatch

turbid hatch
#

that works too

#

xd

austere talon
#

wait is that dot normal

#

in the role mention

turbid hatch
#

thats the role dot plugin

austere talon
#

didnt know it affected role mentions

turbid hatch
#

neither tbh

#

anyway here's voice users too

austere talon
#

wait are mentions normally coloured

#

no right

turbid hatch
#

role mentions are

#

user mentions arent

turbid hatch
austere talon
#

i need to get in the habit of testing everything before merging

turbid hatch
#

i haev Contributed

#

to VencoRED

austere talon
#

its effort but there were more multiple times where I merged smth that looked perfectly okay

#

and then everything exploded

turbid hatch
#

m

#

yeah i hate doing pr review

#

YellOW!

austere talon
turbid hatch
#

but what if i was....... Pink

#

23 oh god

austere talon
#

do u want

#

pink

turbid hatch
#

lemme have a look at some

#

yeah ill take pink xd

austere talon
#

a lot of them are stale tbh

turbid hatch
#

pink is my bRanD color!

#

oh we should close #273

austere talon
#

whats the powertools colour picker shortcut

turbid hatch
#

i guess supersedes isnt a word github knows

austere talon
#

i can nenver remember

turbid hatch
#

ctrl+shift+c

#

win+shift+c*

austere talon
#

doesnt work

#

scammed

turbid hatch
#

not ctrl

austere talon
#

mm yes

turbid hatch
#

oh did you want my pink xd

#

ive got it noted down somewhere

austere talon
#

i just colour picked the ๐ŸŒบ

turbid hatch
#

i think for text and roles i use #ff6c91 cause the color contrasts better

austere talon
#

<@&1075595715297935532>

#

is that good

turbid hatch
#

m, try the one i sent

#

it looks a lil salmon

austere talon
#

whats wrong with salmon

#

also u can have diff name if u want :P

turbid hatch
#

oh there we go

austere talon
#

i liked the other one better tbh (but thats just me, u decide)

turbid hatch
#

hmm

austere talon
#

i like the softer tone cause this one is a bit bright

turbid hatch
#

ah hold on

#

try

#

#f5c2e7

#

that's catppuccin pink which is what i use on my site

#

perfect

#

not as harsh

turbid hatch
#

and re: role name, idk what to call it xd

#

up to you!

austere talon
#

ny rolle

#

lewi in new york

void echo
#

what's the sponsor amount to get a custom profile badge hehe

austere talon
turbid hatch
#

ny rolle

austere talon
#

ya

void echo
#

oh can i have one then? :3

turbid hatch
#

i actually forgot $5 gives you a custom role

#

i never redeemed it until now

#

:P

void echo
#

how do i redeemmm

turbid hatch
#

you Ask Ven

void echo
#

yay

austere talon
#

yayaya

#

what image and text do u want?

turbid hatch
#

anyway

#

settings tomo

#

wait

#

today

austere talon
#

so much pink

turbid hatch
#

yeah today

#

college first tho

#

xd

turbid hatch
#

ive got pink thigh highs too

void echo
#

look at this fuckin CATTTT

austere talon
#

port rust match to js and I'll merge

turbid hatch
#

after using rust match

#

yeah

#

switches suck

austere talon
#

literally any language but js has better switch

limber skiff
turbid hatch
#

pattern matching is my best friend

austere talon
#
const tooltipText = switch (typingUsersArray.length) {
  0 => return,
  1 => Formatters.Messages.ONE_USER_TYPING.format({ a: getDisplayName(guildId, typingUsersArray[0]) }),
  2 => ...
  3 => ...,
  4 => ...
}
#

port to js immediately

#

i think u could actually do this with arrays

#
const tooltipText = switcherino(typingUsersArray.length, {
  0: () => null,
  1: () => ...,
  2: () => ...,
  ...
})
#

could do this

turbid hatch
#

you can do it with arrays

#

or objects ye

#

something like

woeful sable
#

cursed

#

vap will create rusty ts soon

turbid hatch
#
type Branches<T, R> = { [matches: T]: () => R } & { _: () => R };

function switcherino<T, R>(input: T, branches: Branches<T, R>): R {
    return branches[input].?() ?? branches._();
}
turbid hatch
#

something like that will do it i think

woeful sable
#

fake

#

that's literally normal js switch

turbid hatch
#

looks nicer tho

#

ooh wait that wont work though

#

hmm

#

right right

austere talon
limber skiff
#

pog

limber skiff
#

whats the problem

turbid hatch
#
type Switchable = string | number | symbol;
type Branches<T extends Switchable, R> = { [matches in T]: () => R } & { _: () => R };

function switcherino<T extends Switchable, R>(input: T, branches: Branches<T, R>): R {
    return branches[input]?.() ?? branches._();
}
austere talon
#

youre importing from index.ts

limber skiff
#

I mean it works

#

how should I do it

turbid hatch
#

i forgor ๐Ÿ’€

austere talon
limber skiff
#

I can see the enabled plugins from there?

austere talon
#

the one in index is just that reexported lol

limber skiff
#

oh

austere talon
grave mangoBOT
limber skiff
#

we love crashing exploirer

austere talon
#

whaaaaa

limber skiff
turbid hatch
limber skiff
#

my pc is dying lol

turbid hatch
#
type Branches<T extends PropertyKey, R> = { [matches in T]: () => R } & { _: () => R };

function switcherino<T extends PropertyKey, R>(input: T, branches: Branches<T, R>): R {
    return branches[input]?.() ?? branches._();
}
#

i dont know what the use case would be though xd

austere talon
#

anyway the reason you shouldnt import from main is cause circular import

#

index -> plugins -> yourPlugin -> index

#

it might not cause issues now but it causes insane pain if unlucky

#

maybe ignore self?

limber skiff
#

guh

#

discord so dumb

limber skiff
#

aight done ven

austere talon
#

what do you want the tooltip text to be?

void echo
#

ty <33

austere talon
#

okay added!

limber skiff
#

ven ven can you merge typing indicator before sleep

austere talon
#

did u port rust match to js yet

limber skiff
#

I won't ๐Ÿ˜ก

#

actually give me a sec

#

ok done

austere talon
#

how do I unsub from this crap

#

that pr is long closed and I'm neither subscribed to that person's repo nor the pr

limber skiff
#

dunno if that works lol

austere talon
#

no

limber skiff
#

no idea then

austere talon
#

YES I AM DOUCHEBAG

limber skiff
#

lmao

austere talon
#

on the object

limber skiff
#

smart

austere talon
#

O(1) instead of O(n)

#

not that it matters haha

#

Filter is fine too

limber skiff
#

done

austere talon
#

just nitpicking at this point

limber skiff
#

I like it anyways lol

austere talon
#

I'm gonna look at the rest tmrw

limber skiff
#

no prob

#

thanks

#

letss goo

#

github errored when building

austere talon
#

Good

#

we love discord

#

crazy how github 500s like weekly

#

come on you're literally Microsoft get ur shit together

limber skiff
#

yes beautiful

austere talon
limber skiff
#

tmrw

#

I think tooltips have no limit though

charred monolithBOT
charred monolithBOT
spark cove
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
limber skiff
#

I'm so good

verbal pumice
#

fix a dumb when unfix a smort comes along

charred monolithBOT
limber skiff
#

this is so bad

#

horrible

charred monolithBOT
turbid hatch
#

@austere talon done, backend is selfhostable now

#

no more cf

austere talon
#

cool cool

#

how did u do auth and stuff now

turbid hatch
#

secret is generated on first oauth

#

and stored

#

subsequent oauths return the same secret so its easy to just log in

#

and then headers are just

#

Authorization: base64(userId:secret)

austere talon
turbid hatch
#

so nothing awfully fancy