#๐พ-core-development
1 messages ยท Page 7 of 1
maybe rename to fetchUser or userGet? I know discord themselves name this getUser but that name is more self explanatory. also type would be cool
getUser: lazyWebpack(filters.byCode(".USER(", "getUser")) as (id: string) => Promise<User>,
@quaint sapphire you love
and thus the world exploded. Many will remember this day as the turning point
@lament nimbus 
Ayy
:monkewholesome:
Huh
Nitrospoof broken?
settings update shouldn't've broken it at least
I wasn't gonna merge that cause we already have enough troll plugins imo
idk I don't wanna have like 3 billion troll plugins
yea
it was joke review
we should just have one joke plugin with a bunch of toggles for each trollage

these lines are very badly written
1a9d3b7 fix(Experiments): Broken isStaff match - MeguminSama
5a18292 fix(Experiments): Broken isStaff match - MeguminSama
Shitpost branch when
At the moment, all plugins that need the required plugins are shown, instead of only the enabled plugins.
these lines are very badly written
ur moom very badly written
just access Settings directly, this method also creates a state under the hood and does a bunch of unnecessary logic
you can import it from the same file
974cc97 feat: gitignored src/userplugins directory - MeguminSama
However, if you want to install your own ones, create a `userplugins` folder in the `src` directory and create or clone your plugins in there.
Don't forget to rebuild!
Once you've made your plugin, make sure you run `pnpm test` and make sure your code is nice and clean!
656a23f Update docs/2_PLUGINS.md - MeguminSama
does the resolve dir not cause issues? since now imports are resolved from src instead of src/plugins
or maybe I'm missing the point of resolveDir
resolveDir is where it looks for the imports, but since the imports are now ./plugins/<file> and ./userplugins/<file> instead of just <file> it's fine.
9d6021f feat: gitignored src/userplugins directory (#112) - MeguminSama
Thanks for the feedback!
On Tue, Oct 18, 2022, 12:06 AM Animal @.***> wrote:
these lines are very badly written
ur moom very badly written
โ
Reply to this email directly, view it on GitHub
https://github.com/Vendicated/Vencord/pull/85#issuecomment-1281494596,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQERV2PMKACD6LBFVU3I6GDWDW5VXANCNFSM6AAAAAARB3KJLE
.
You are receiving this because you commented.Message ID:
@.***>
ig because its not a "real" commit
fake commit real
ooh I should add a slider setting type...
guhhh
why does default in options not actually set the value
it is just undefined until you save once
the fuck is this code
I hate
this is why I comment my code
so it doesn't end up like this
I'm not touching that
- Adds "X-PronounDB-Source" header to differentiate requests to pronoundb (at the request of cynthia)
- Adds options to the plugin
- Pronoun format (they/them vs They/Them)
- Show/hide pronouns for current user
- Also fixed a bit of logic where it checked if the user was a bot AND the system user rather than OR
I noticed that the default options doesn't really work, it will return undefined if the options haven't been saved once, so that should probably be fixed before this gets merged, so...
will be fixed soon
why use that header and not just user agent
beb9aae show only the dependants that are enabled (#111) - stijnvdkolk
2871734 Updater: Fix error when update check fails - Vendicated
adds settings to the filenames plugin and new ways to change names
check timestamp method cuz its pretty ugly
Easier, you can't add user agent directly in fetch() because chromium is stupid
You can modify user agent through electron.session.defaultSession.webRequest.onBeforeSendHeaders, but it is just easier to use that custom header instead
oh I didn't know that
Apparently it was on a list of "disallowed headers" for a bit and it never got changed in chromium
sending custom user agent is a common need
so perhaps we could add support for it somehow via that
You have to do it from the patcher script
Not sure if you can get plugin stuff from there
It is easy though
nah I was thinking about using a custom header
like js fetch(..., { headers: { "V-User-Agent" : "blah"})
ohhh
and translate that to real user agent header
guhhh they will fix
never
yop

This will need updating to avoid conflicts with this commit https://github.com/Vendicated/Vencord/commit/9d6021f0b985ca09fded65af87166c1f7a70141a
just undo the build script changes since I already did them
@lament nimbus can u see if this works fine for u
also i added comments now to explain what it's doing
trol
what are you talking about, my branch was always up to date

but it doesnt matter in prs cause i will squash anyway 
make sure to add that in the web version too
lmao what
lmao
the funny
wasn't that already documented
have you ever used git merge (it doesn't make a merge commit)
browser sends off preflights when you spoof useragent
whats that
preflight = extra request to fetch cors stuff
its like an OPTIONS request or something
when you see an OPTIONS request that's red in ur network reqs
yes
anyway that api does set proper cors headers
seems like it just doesnt like unknown headers?
it has cors headers
oh wait
so preflight sends OPTIONS
and ig that api doesnt support OPTIONS
yes
so uh
is that gonna be a common theme
most things that support cors support OPTIONS
mm so its just that api being shitty
meow
probably
so should i add that workaround?
i wonder what the overhead of onBeforeSendHeaders is
just test with another site
if its just that one site its not much of an issue
though you don't even really need the user agent thing for at least right now
the X-PronounDB-Source header works fine
it worked when I manually overrode the header for pronoundb specifically
maybe that was when I still manually disabled cors though
what are cors even good for
what if we just yeeted them
arent cors just there to protect other sites basically
not the current one
It's to prevent xss i think
csrf whatever
yeah it's more like to protect other servers
it makes it so that i can't embed github iframe onmy site that does something malicious if a github user open my site
well anyway let's not mess with it
How many other plugins would need user-agent spoofing
uhh
idk

we can see in future
no need for now
could also just expose non cors non chromium limitations fetch from nodejs
if it's needed

me when I fucking hate cors and I just want my asp.net app to be able to make requests to the api
https://github.com/lexisother/gilde-restaurant/blob/882114fab10b8e57b92ececb49e0642d3628f9c7/API/index.php#L13-L18
PHP
That's probably the best solution
Allows bypass only for plugins
Though it wouldn't work on web because no nodejs
BAN THIS USER
they can install anti cors extension
Also uh I think extensions have access to a non cors fetch
in the background process
I literally use composer calm down
a.k.a. make PHP actually nice to use by installing libraries that are well written
How would you expose that tho
ipc
I am the anti PHP
don't care
people wasting their breath on whining about how shit language X is won't stop me from comfortably using it

i am the anti-PHP

h
just ping ducky for a bypass
someone complained about it idc
replace: "Vencord.Plugins.plugins.ShowHiddenChannels.isHiddenChannel($3)||$1.locked$2switch($3._isHiddenChannel?2:$3.type)$4"
Sorry, I somehow missed this PR
Thanks! Please see #1032200195582197831 message for why this was closed, feel free to post it there
Thanks! Please see #1032200195582197831 message for why this was closed, feel free to post it there
Thanks! Please see #1032200195582197831 message for why this was closed, feel free to post it there
Thanks! Please see #1032200195582197831 message for why this was closed, feel free to post it there
const ext = file.match(/\..+$/g) ?? "";
to handle non matches where ext will be "null"
since this is used in two places now, could you move it into a util export please?

fun
LOL no
dumbass
lmao
7cdc4e4 feat: randomiseFileNames -> anonymiseFileNames ... - x6r
I don't think there's a way to fix the CSP issue without doing a big refactor to use a @grant which means window -> unsafeWindow and it just overcomplicates things. I solved the issue in the proper browser addon by making a background script but this is not possible in UserScripts. The best solution would probably to use an anti csp extension like this one (Disclaimer: I never used it and have no idea whether it works and is safe) unless so...
Hi Mister grant sorry for pinging you ๐
I still don't know what exactl you mean by this, could you please elaborate / show a mockup?
why it Orange
Hi Mister grant sorry for pinging you ๐
Hi Ven, it's ok. I get about 1 ping every day because of my name. You are the first to apologize in advance. Have a good day!
lmfao
lmao this guy
Improve Spotify premium bypass, turn disable auto pause into an option and add option to keep the activity playing when idling
Why in the hell would you want to re-enable autopausing
Why in the hell would you want to re-enable autopausing
It doesn't hurt to have it as an option
๐ what
bro???
is this guy good
lmao why such a big deal for something so small
it's a bit odd but the default is true so its not like it's gonna affect anyone
wdym
it's useless
it's like having the option to vote for third-parties in US elections
pointless
ok lets not get political
lmao
what
im just saying they're both useless options ๐
not useless for someone that wants auto-pausing ๐
the other option is literally not useless
while you might not use it other people may
please give me one real reason to enable auto-pausing
I use it myself
No im not talking about the other one that makes sense
i didnt mean to ๐
I am so confused
literally none of these settings seems like a problem to me
no idea why you're raging other than the fact you'll never use the settings
I know right
๐
๐ฟ

adding zero features is now feature creep
we added settings so people could configure stuff
we may as well just remove settings again 
god i really need to implement volume slider so i stop getting jumpscared by moyais tho
trol
you should remove settings cause it's bloat
remember that guy that kept crying about aliu badges
it is probably horrendous
so true bestie
what's funny is
on the other components, onValueRender is serialize
why is it not consistent ๐ญ
_id id
d97c3e2 Fix ViewIcons, make banner have right cursor - Vendicated
what's the point of changing this patch?
I haven't found any difference but that patches the very source of where isPremium comes from, seems better to avoid issues
I disagree, it's much more complex than the old one so I would prefer the old one
After firing the dispatch discord returns the object, which means if they ever use it body.product will still be "free"
please prefer direct property access (Settings.plugins.Ify) and remove the comparison to true, it is obsolete
I took inspiration from the experiments plugin, that's why it's like, gonna change it
Then that should be changed as well (not in this PR). Maybe there's an eslint rule which can enforce this in the future? ๐ค
@limber skiff btw do u have this update branch button too?
yeah
neat
could you please change the patches from using $1$2 to using a function?
replace: (fullMatch, firstGroup, secondGroup) => ""
this way its more readable since thanks to named groups you don't have to decipher what each group stands for
Can this be considered resolved?
c25258b feat: settings sliders - MeguminSama
Adds a Slider component type to plugin settings
anyone know how to turn an iso8601 timestamp into a discord friendly one
Math.floor(new Date(timestamp).getTime() / 1000)
Adds a simple setting to change the video to whatever
why the rename to tsx? it doesn't matter I'm just curious
shouldn't this be
replace: "src: Vencord.Settings.plugins.BANger.source"
remember that not everyone has console shortcuts enabled
why the rename to tsx? it doesn't matter I'm just curious
Because I was messing with things and forgot to change it back lol
Ah I did not know that was apart of console shortcuts
for future ref the only guaranteed window props are Vencord and VencordNative, anything else is console shortcuts
const ranges: number[] = [];
ranges.push(Math.round(value * 100) / 100));
btw discord-types may have types for these
efab399 feat(BANger): Customisable gif or video (#121) - GlitchChan
3cc0eba Update src/components/PluginSettings/components... - MeguminSama
bd2343d Update src/components/PluginSettings/components... - MeguminSama
the Slider types in discord-types are very incomplete.
I have no idea what any of this does so please document it
overflow scroll is very ugly, try text wrap
holy shit
@umbral hedgeBRO SETTINGS LOOKS SO GOOD
@umbral hedge fart
fart
huh
fart
wtf

so it only triggers on slash
what
@austere talon i will put my horrible menu regex mess into vencord 
(not as horrible as whatever the fuc this shit is)
u told me once but I forgot
@mortal fractal fart
Menu's components has strict type checking
yeye
all i do is remap them back to their original names
when would u need menu items realistically tho
adding to menus
I use menu items in context menu patch but I just capture the varname with regex
making your own menus
menu items are the ones that are just a bunch of return null funcs right
yes
fun times 
they exist just as property holders
it just seems like a stupid hack that discord didnt want to design in a smarter way
i guess it also allows them to have children as well
since thats how submenus work
it very cursed
meow
BRO
good thing it has a volume slider now 
best plugin ever
lower the volume ๐ฟ
I will turn it up ๐ฟ
?? don't tell me this works
React.createElement(null, {}, "hi")
then what did u mean by it allows them to have children
it just doesnt render extra elements
its still technically a component
its just an empty container basically
React.createElement(null) != React.createElement(ComponentThatReturnsNoChildren)
the first will throw an error
the second will just do nothing
it wont throw
theres extra processing in the Menu component towards these other components is the thing
null is a valid react component
megu will change fart to slider
bruh
DIY 
nop 
its so easy 
nvm
anyway
Vencord.Webpack.findByProps("render", "flushSync").render(React.createElement(() => null, {}, React.createElement("p", {}, "hi")), $("#message-content-1032386134224945284"))
this no render
so () => nullchildren aren't rendered
me when discord pronouns
Adds /track, /album, and /artist commands to send song info to your current channel.

testing is fun
deez nuts lmao
still not implemented cause internal controversy probably

yeah I don't expect it to actually happen
they first added it a while ago
and yet nothing has happened since
its been like a year since they added that lmao
they already are insane
thats the issue
but yeah also discord doesn't want to moderate someones pronouns being "insert slur here"
in case you don't use prettier, that comment disables automatic formatting for the next block/statement
well, you never really answered my question, will this be made into an API or not?
there really is no reason to document this if i am going to erase it later either way...
fair
solution: don't use prettier
bad javascript formatter
fuck it im adding dotprop eslint rule
W
whats wrong with it
produces imo very ugly code
its decently configurable
and doesn't let u customise anything
you can customize plenty
my main issue with it is that it doesn't adapt to ur custom formatting
well it reformats entire files, it doesn't just make existing code look kind of nicer
anyways r\.createElement\("div",{className:[().\w]+?\.userInfoSection.+?\}\)\)(?=\)\}var) I HATE REGEX MATCHING CODE
most formatters have a default style but if you manually add an additional newline they adapt and format around that
prettier does not fucking care it yeets manual formatting
at least this is giving me a nice reminder on how to use +?
i advise u to use .{0,50} instead
or whatever number of max characters would be appropriate
I think I am matching more than 50 chars lol
.+? has the potential to match way too much
actually that may be matching too much I can probably use an inner element instead
createElement(.+?"foo")```
doesn't actually mean find the createElement that is closest to foo, it means find the first createElement after which foo appears at some point and then do not search further to see if there's a foo where i can eat even more (that would be .+ without ?) so you will match the entire thing here with .+?, a .{0,15} would have prevented that
```js
createElement(saijsoijaoijqijeqhqokeijqeoiqporwqjraweijqcreateElement(sappqsasj"foo"```
yeah I hit that issue a couple times
regex101 yelled at me for "catastrophic backtracking" a couple of times
LOL
lmao
but I fixed that by making sure it matched the one with className "userInfoSection"
and there should only be one of those
aaaaa this formatter sucks

formatter?
the devtools formatter
I need to know the paren boundaries and yet it doesn't help at all for that
should I?
I have just been copy pasting into vscode and running prettier with the vscode extension
you could add that along with the react devtools option
well i don't think there's a way to make devtools use prettier
so it would more be
prettify(modId)```
and that would return a fake module with the formatted code
huhhh
yeah I just found that
thats awesome i didnt know that
btw is it safe to rely on the React global being "r"
just like the props are always "e"
jk i read wrong but still
global?
well maybe not global idk how react works but
you can just import REACT_GLOBAL
the (THIS).createElement
replace: `${REACT_GLOBAL}.createElement`
well I meant more in regex
oh
and I don't want to deal with regex string interpolation
I have just been using \w{1,3} but if it is always r then that would be better to use
should i try implementing a >greentext plugin tomorrow?
you love .{0,1100}
I'll just add some lookarounds
you could match the brackets perhaps or try to find some unique string
i would only do the .{0,x} trick for x < 200
yeah ill add a lookaround for ""!==\w{1,3}&&
Z
show
no not always
whats lookbehind syntax again
I need to memorize that
but x.Z = x.default
?<=
i always forget too lmao
i memorisedthem now finally
ahead
?=
?!
behind
?<=
?!<
guh regex 101 will stop being stupid
you love how once the < is before and the other time it's after
it works in electron so it doesn't really matter if its non-fixed width
non fixed width lookbehind probably has horrible performance
oh true
always use . when possible
variable names may contain $
which isn't a word character
oh
what should I do then
idk
noOOOOOOOOOOOOOOOOOOOOoooo
btw this blog has a great explanation for catastrophic backtracking https://wanago.io/2019/09/23/regex-course-part-four-avoiding-catastrophic-backtracking-using-lookahead/
nested quantifiers ((foo*)*) are always a bad idea
meow
I'll just match the &&
it should still be specific enough at least
(?<=&&)r\.createElement\("div",{className:[().\w]+?\.userInfoSection\},r\.createElement\(.+?\}\)\)(?=,r\.createElement)
why not use pronounstext as anchor?
ohhhh ok so look ahead is ?= and lookbehind is the same but pointing to the left
pronounsText.+&&.{1,2}\.createElement\("div".+?userBio:.{1,2}\}\)\)
obviously insert ur groups as needed but smth like this should be safe
mmm ok
\.pronounsText.+&&(.{1,2}\.createElement\("div",{className:[().\w]+?\.userInfoSection\},.{1,2}\.createElement\(.+?\}\)\))(?=,.{1,2}\.createElement)
that work?
yeah
did u get the custom formatter to work
it doesnt work for me
are u replacing children?
that won't work like that cause you're injecting ur array randomly in the middle of the previous components props
nice one
yeah like i said
no clue, I have just been trying both wrapping the component and using arrays until one works lol
like what code exactly
&&createElement(allThisJazz) => &&[createElement...), yours]
?
I am modifying an argument to createElement
amazing formatter
gonna add the prettify(moduleId)
f81ab5e Add volume settings to fart plugin (#113) - ItzOnlyAnimal
have u checked if this supports replies?
no im just stupid and forgot to add back the consumed \.pronounsText.+&&
yaya
Deez nuts lmao
pronouns right
now time to replicate bio styles
yeah
I thought about it
youre literally referencing it here lmao
but it is locked behind an experiment so it isn't shown otherwise, and I doubt it will ever be used
formatter jumpscare
woooooo rewriting the entire regex time
force enable experiment and patch profile
nah this one is gonna be really easy
no regex needed
well for getProfile() patch yes
but for the thing to show u can just enable the experiment
wouldn't that also show the box in user settings
just hide it 
I would just use a patch to force enable it in the popout only
or you could just remove the experiment check from render
if thats not complicated
oh yeah
then do that
and replace the profile.pronouns with call to plugin
well it's async so you would probably need to hack in a Vencord.Util.useAwaiter
so V is the pronouns variable?
ah
k = c.Z.useExperiment({}).showPronouns,
match: /=.{0,7}.useExperiment.{0,6}\.showPronouns,/,
replace: "=true,"```
trollage
how do I patch the .pronouns though
I can just do a capturing group around the (V) and then replace that with a wrapper element right?
you can match the V and then use a backreference
yeah
just patch the userstore
/,(.{1,2})!==""&&.{1,2}\.createElement.+?pronounsText\)\},\1/```
replace: (m, pronouns) => yourCustomPronoun + m.slice(pronouns.length, -pronouns.length) + yourCustomPronoun
I hadn't checked, but it doesn't appear to support them - I can look into using the APIs that interactionKeybinds uses to implement it.
""!==(.{1,2})&&(r\.createElement\(r\.Fragment.+?\},\1\)\))
i think all you have to do is
sendMessage(..., {
referencedMessage: findByprops("getPendingReply").getPendingReply(channelId)
})
and dont forget to clear the pending reply
I wouldn't be surprised if you knew discord's codebase better than discord themselves
okay i got it
strencher be like
const MessageCreator = lazyWebpack(filters.byProps(["getSendMessageOptionsForReply", "sendMessage"]))
const PendingReplyStore = lazyWebpack(filters.byProps(["getPendingReply"]));
function sendMessage(channelId, message) {
const reply = PendingReplyStore.getPendingReply(channelId);
MessageCreator.sendMessage(channelId, message, void 0, MessageCreator.getSendMessageOptionsForReply(reply))
.then(() => reply && FluxDispatcher.dispatch({ type: "DELETE_PENDING_REPLY", channelId }))
}```
go ahead, would love that
Or use an inline self callable function to do shit the way you want
**commandsAPI.ts: **Line 15
`((()=>Vencord.Api.Commands._BuiltIn=${v})())${rest}`,
Too bad that you removed that code
createElement(( window.yes="some stuff", someMoreStuff(), "div"))```
yes but sometimes like in ur case u can achieve the same thing via comma operator
In my case you removed it completely and just call a function from the API to init
Bad ven
(y(), z)
runs y then returns z unconditionally (unless y throws ofc)
useful to know
Is that why you do (0, eval)()?
That's to prevent webpack from messing with it iirc
Or completely unrelated
that's also the comma operator, but for a different use case. the reason for that is that it turns the eval into indirect eval
But I understand how that works now very epic
I don't feel comfortable calling comma an operator
It just chains multiple statements together
guh
Tf is that?
openasar
streams don't load for me with openasar lol
Can't we make a plugin to mimic OpenAsar?
yes but why
No?
Openasar (or the default app.asar) is what loads discord
function foo() {
let x
eval("x = 'direct eval can access locals'");
(0,eval)("x = 'while indirect eval cannot'")
console.log(x) // direct eval can...
console.log(globalThis.x) // while indirect eval...
}
this is why I do (0,eval)
indirect eval always runs in the global scope
Yes, we can make vencord patch the file 
u can't
u cant like you want it to lol
It is basically a zip
plugins run entirely in renderer, openasar is main/preload though
Well, plugins are also part of vencord and we frequently modify vencord itself to accommodate plugins so...
it's impossible to modify discords asar from within the mod
Why??? Just use openasar
the best u can do is require and monkeypatch
Tyman is dum dum
No I'm just slightly sane
Is it locked by the filesystem or smth?
Openasar compatibility works fine so no reason to do jank stuff
Tyman is super dum dum
yop
more like u super dumb bumb
Doesn't enjoy doing fun things
troll
if you call that fun make everything inside renderer and see how far you get

actually working method
const MessageCreator = lazyWebpack(filters.byProps(["getSendMessageOptionsForReply", "sendMessage"]))
const PendingReplyStore = lazyWebpack(filters.byProps(["getPendingReply"]));
function sendMessage(channelId, message) {
const reply = PendingReplyStore.getPendingReply(channelId);
MessageCreator.sendMessage(channelId, message, void 0, MessageCreator.getSendMessageOptionsForReply(reply))
.then(() => reply && FluxDispatcher.dispatch({ type: "DELETE...
Mf can't read
Are ya integrating pronoundb with Discord's new pronoun thingy?
hm ig I could remove string concat because I use interp anyways
No I am hijacking their "new" pronoun thingy to add pronoundb 
Does pronoundb allow you to have anything you want?
- discords asar is owned by root on Linux so good luck overwriting that without running the entire app as root (you're insane)
- nodejs requires the file once then caches it so modifying the file does nothing
- renderer has no access to node, the file system or anything else, hell it doesn't even know what a nodejs is
- the idea is too silly even for all the silly people here
- a full restart would be my answer
- ofc tight integration with the preloader would be a necessity
- then just use OA or make ur own mod lmao
That ain't fun
the asar is just a zip containing non minified js
I did say that
decompile, edit, rebuild, profit
Btw

The asar has a module in it
To enable dev tools
I wonder if it will work or not
Does discord not have dead code elimination?
actually asar is its own dumb file archive format
For all purposes, it is a zip with a special program to manipulate it
neither is adding pointless openasar integration when everything already works perfectly fine
Man, you are taking it too seriously ffs
Can't even troll in this server
Tyman no baka
yooooo it works
@lament nimbus tell me my pronoun
my client has you cached as unspecified so it won't show that until I reload
That's ga- straight
/s
glorified zip*
niice
its not glorified zip its more like minimalist zip
maybe invalidate cache after a while
some people have discord open for weeks
(me)
just store like timestamp with each cache entry and if it's older than say an hour ignore cache
Or invalidate only for users that have no pronoun
Incase they added one
btw @golden gulch i haven't actually tested if that new sendMessage code still works when there isn't any reply
Pushed a commit that uses your reply code Ven, I sat down to work on it right as you commented which was neat (thanks for figuring that out, I would have taken forever)
does it?
Yeah but...does a pronoun really matter if you change it?
At that point aren't you just plainly lying to yourself?

discord message sender so weird
why do they take two different objects?
??
Also I still have no idea what that third argument to sendMessage is
did you check usages
it's a function I think and it causes send to wait for some onReady
?
If ur pronoun is important to you, you won't change it every week.
So invalidating the cache for users with pronouns seems wasteful.
sure its not being changed often but its also not being added just as often
Added and changed are diff
Not me for sure
Fuck that shit
You ain't royalty to tell me how I must address you
debugging go brrr
๐
I never understood Record in ts, is it like a data class or smth?
its just a fancy way of saying object
Record<string, unknown> means an object where the keys are all string and the values are all unknown
Record is a utility type that's a shortcut for object type
well its a shortcut for ts { [key: K]: V }
not only
with better syntax
Record<"foo" | "bar" | "baz", string | number>
// equiv
interface {
foo: string | number;
bar: string | number;
baz: string | number;
}```

thats literally the definition of record
yeah
record is still pretty ugly imo tho
like this record kinda ughhh
Don't get me wrong, I just think of pronouns as retarded, they are just a means of mentioning someone, since when are they part of our personalities?
๐
then don't enable it
Sharing my opinion is not equal to me complaining
so being a guy isn't part of ur personality?
You are reading it the way you want to
Guy ain't a pronoun
I don't want to bother answering that but pronouns match your identity
no I'm not lmao
anyways I am great at this
They are just words to identify ur sex
*gender
when you see someone irl you can usually guess what their gender is and automatically know the right pronouns, if someone guesses wrong and calls you a she you would obviously correct them and tell them you're a he (a guy).
online you (usually) don't know people's appearance so if their name doesn't make it obvious you have no way of knowing their gender. So instead of having to bother with using neutral pronouns, it's way more comfortable to just see their gender right away
what's the issue?
Online, you just assume male, bc females are an illusion

As for irl, it's ok to get it wrong
You will be corrected
And you won't repeat that mistake
Getting offended is dumb
noone has ever brought up being offended
Yeah
But people do get offended
no correlation
which should take priority
discord pronouns or pronoundb pronouns
i am already hijacking the component so might as well future proof it
discord's
Well maybe not for now
since probably anyone who has ones set has meme pronouns
Won't that be nitro only or smth?
is there even anyone who has them set?
doubt it
if they ever release it, Discord's should take preference
wait
just make it a setting
lols
but don't add it yet cause that'd be confusing
so just ignore discord pronouns for now
neat! Since that sendMessage function is pretty useful, I will probably refactor it to be an exported helper at some point
default: true ๐ฟ
๐ฟ
- you don't need to webpack search, it's a global (DiscordNative.window)
- it's only a thing on electron, not on Web, so please add web logic or wrap it in an
if (!IS_WEB) {} - you're listening to really weird music but it goes hard kinda
@limber skiff
- useful pr, I was in a teams meeting once and the loudest fucking vine boom ever played from backgrounded discord and I'm pretty sure everyone heard
lmao

does anyone know how the discord pronouns are going to be displayed
its part of the experience
we sent Screenshots above
like so
except there is text under the header
wait do u just force show it lmao
๐
pin
yeah the regex consumes the condition, and then I just don't add it back
is the pronouns thing gonna be like a selector or bio
guh
I will expand my queen died copypasta
a separate text box
love
though keep in mind
there is very slim chance it ever gets used
this is just code left over that hasn't been touched in forever
do you want me to listen to the focus event
are you sure? did they abandon that idea
I feel like even if they abandon the idea the code will never be deleted
poggermode is also still a thing lmao
I would advise you to search for usages of the native method in the code and you'll surely find code you can snatch
it was ages ago and nothing has been seen since
so
just guessing
that's what we thought about RN
then one day it happened

RN was expected
ig don't delete ur manual pronoun component code yet
and then we procrastinated everything
I already did
well it never existed I just deleted the regex that adds it
if they do remove this code then its not that big of a deal
it just won't show anything, its not like discord will crash
the regex just won't match anything
yeah
that's also one of the goals u should aim for for ur regex
that it will 100% not match anything if the thing you're patching is altered
obviously can't always do that but precise regex gud

does document.focus() work fine on electron?
hasFocus()? yeah
Also uhhh you should move the focus checks below the other checks so it's only checked for moyai hits
you never know what it does under the hood, it might not have the best performance
aight
actually just put it in the Boom function
words never before said:
๐
it probably doesn't matter but better be safe than sorry
we don't wanna make BDFDB 2 on accident
yeah
I already almost did that
making BDFDB is kind of easy in js
love how it just rerenders 5 times when I open profile
electron shut up
whatever

