#๐Ÿ‘พ-core-development

1 messages ยท Page 7 of 1

charred monolithBOT
umbral hedge
#

@quaint sapphire you love

austere talon
#

and thus the world exploded. Many will remember this day as the turning point

umbral hedge
#

blame me if vencord breaks

austere talon
#

@lament nimbus owoYay

quaint sapphire
#

:monkewholesome:

#

Huh

#

Nitrospoof broken?

umbral hedge
#

settings update shouldn't've broken it at least

quaint sapphire
#

Aliucord's

#

Nitrospoof

#

Vencord's is named nitrobypass

umbral hedge
#

o

#

smh

queen panther
#

updating rn :)

austere talon
#

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

umbral hedge
#

yea

#

it was joke review

#

we should just have one joke plugin with a bunch of toggles for each trollage

charred monolithBOT
charred monolithBOT
#

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:
@.***>

austere talon
#

why it greyed out

#

refinedgithub moment

umbral hedge
#

ig because its not a "real" commit

jagged cloak
#

fake commit real

umbral hedge
#

ooh I should add a slider setting type...

jagged cloak
#

yop

#

do this and change it to slider

#

trolley

charred monolithBOT
lament nimbus
#

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

charred monolithBOT
#
  • 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...

charred monolithBOT
austere talon
austere talon
lament nimbus
#

You can modify user agent through electron.session.defaultSession.webRequest.onBeforeSendHeaders, but it is just easier to use that custom header instead

lament nimbus
#

Apparently it was on a list of "disallowed headers" for a bit and it never got changed in chromium

austere talon
#

so perhaps we could add support for it somehow via that

lament nimbus
#

You have to do it from the patcher script

#

Not sure if you can get plugin stuff from there

#

It is easy though

austere talon
austere talon
#

like js fetch(..., { headers: { "V-User-Agent" : "blah"})

lament nimbus
#

ohhh

austere talon
#

and translate that to real user agent header

lament nimbus
#

yeah that could work

austere talon
#

guhhh they will fix

umbral hedge
#

never

lament nimbus
umbral hedge
charred monolithBOT
charred monolithBOT
austere talon
#

@lament nimbus can u see if this works fine for u

#

also i added comments now to explain what it's doing

charred monolithBOT
lament nimbus
#

cool thanks

#

looks good

lament nimbus
#

again

umbral hedge
#

trol

#

git merge main

#

ez

lament nimbus
#

merge commits ๐Ÿ‘Ž

#

ugly

#

I prefer rewriting history trolley
git gaslighting

umbral hedge
#

trol

lament nimbus
#

what are you talking about, my branch was always up to date

umbral hedge
austere talon
austere talon
lament nimbus
austere talon
#

lmao what

umbral hedge
#

lmao

lament nimbus
#

cors

#

fuck cors

austere talon
#

no like

lament nimbus
#

oh

#

idk

woeful sable
#

the funny

umbral hedge
#

wasn't that already documented

vestal grove
umbral hedge
#

browser sends off preflights when you spoof useragent

austere talon
#

whats that

lament nimbus
#

preflight = extra request to fetch cors stuff

#

its like an OPTIONS request or something

umbral hedge
#

when you see an OPTIONS request that's red in ur network reqs

vestal grove
#

yes

umbral hedge
#

thats a preflight

#

checks for CORS headers and acceptable HTTP methods

austere talon
#

anyway that api does set proper cors headers

#

seems like it just doesnt like unknown headers?

lament nimbus
#

it has cors headers

austere talon
#

oh wait

#

so preflight sends OPTIONS

#

and ig that api doesnt support OPTIONS

#

so uh

#

is that gonna be a common theme

lament nimbus
#

most things that support cors support OPTIONS

austere talon
#

mm so its just that api being shitty

umbral hedge
#

meow

lament nimbus
#

probably

austere talon
#

so should i add that workaround?

#

i wonder what the overhead of onBeforeSendHeaders is

lament nimbus
#

just test with another site

austere talon
#

yes

#

other sites do it fine

#

okay so it also affects raw github

lament nimbus
#

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

austere talon
#

okay so

#

this workarounddoesnt work anyway

lament nimbus
#

it worked when I manually overrode the header for pronoundb specifically
maybe that was when I still manually disabled cors though

austere talon
#

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

lament nimbus
#

It's to prevent xss i think

#

csrf whatever

austere talon
#

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

lament nimbus
#

How many other plugins would need user-agent spoofing

austere talon
#

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

umbral hedge
vestal grove
austere talon
#

PHP

lament nimbus
austere talon
#

BAN THIS USER

austere talon
#

Also uh I think extensions have access to a non cors fetch

#

in the background process

vestal grove
#

a.k.a. make PHP actually nice to use by installing libraries that are well written

lament nimbus
austere talon
#

ipc

umbral hedge
#

I am the anti PHP

vestal grove
#

don't care

#

people wasting their breath on whining about how shit language X is won't stop me from comfortably using it

mortal fractal
#

i am the anti-PHP

umbral hedge
robust basin
#

h

fathom herald
charred monolithBOT
umbral hedge
jagged cloak
rare shale
#

fun

jagged cloak
#

LOL no

vestal grove
#

dumbass

austere talon
#

lmao

charred monolithBOT
#

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...

austere talon
#

why it Orange

charred monolithBOT
charred monolithBOT
tame escarp
#

lmfao

austere talon
#

lmao this guy

charred monolithBOT
tame escarp
#

๐Ÿ’€ what

quick ibex
#

bro???

tame escarp
#

is this guy good

limber skiff
#

lmao why such a big deal for something so small

umbral hedge
#

it's a bit odd but the default is true so its not like it's gonna affect anyone

quick ibex
#

wdym

tame escarp
#

it's useless

#

it's like having the option to vote for third-parties in US elections

#

pointless

quick ibex
#

ok lets not get political

umbral hedge
#

relating an auto pause feature to elections ???????????

#

nani?

limber skiff
#

lmao

tame escarp
#

im just saying they're both useless options ๐Ÿ’€

umbral hedge
#

not useless for someone that wants auto-pausing ๐Ÿ’€

limber skiff
#

the other option is literally not useless

#

while you might not use it other people may

tame escarp
#

please give me one real reason to enable auto-pausing

limber skiff
#

I use it myself

tame escarp
#

No im not talking about the other one that makes sense

limber skiff
#

ah

#

you said both

tame escarp
#

i didnt mean to ๐Ÿ’€

umbral hedge
#

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

limber skiff
#

I know right

umbral hedge
#

๐Ÿ’€

limber skiff
#

๐Ÿ—ฟ

tame escarp
#

๐Ÿ™„

#

feature creep

umbral hedge
#

adding zero features is now feature creep

#

we added settings so people could configure stuff

#

we may as well just remove settings again trolley

#

god i really need to implement volume slider so i stop getting jumpscared by moyais tho

jagged cloak
#

trol

#

you should remove settings cause it's bloat

#

remember that guy that kept crying about aliu badges

umbral hedge
#

trol

#

okay im praying the sliders api isn't dogshit

#

wish me luck

jagged cloak
#

it is probably horrendous

umbral hedge
#

not actually too bad

#

poggermode slider

tame escarp
umbral hedge
#

what's funny is

#

on the other components, onValueRender is serialize

#

why is it not consistent ๐Ÿ˜ญ

jagged cloak
#

_id id

charred monolithBOT
austere talon
#

@limber skiff btw do u have this update branch button too?

limber skiff
#

yeah

austere talon
#

neat

charred monolithBOT
charred monolithBOT
verbal pumice
#

anyone know how to turn an iso8601 timestamp into a discord friendly one

mortal fractal
#

Math.floor(new Date(timestamp).getTime() / 1000)

austere talon
#

snowflake?

#

oh u mean for timestamp markdown

charred monolithBOT
quick ibex
#

@austere talonI GENUINELY BEG YOU TO MERGE #120

#

๐Ÿ˜ญ

charred monolithBOT
quick ibex
#

holy shit

#

@umbral hedgeBRO SETTINGS LOOKS SO GOOD

#

@umbral hedge fart

#

fart

#

huh

#

fart

#

wtf

austere talon
quick ibex
#

so it only triggers on slash

austere talon
#

what

quick ibex
#

not when i say fart

#

@austere talon fart

mortal fractal
#

@austere talon i will put my horrible menu regex mess into vencord cope

austere talon
#

oh god

#

what is that even for exactly

mortal fractal
#

(not as horrible as whatever the fuc this shit is)

austere talon
#

u told me once but I forgot

quick ibex
#

@mortal fractal fart

mortal fractal
#

Menu's components has strict type checking

austere talon
#

yeye

mortal fractal
#

all i do is remap them back to their original names

austere talon
#

when would u need menu items realistically tho

mortal fractal
#

adding to menus

austere talon
#

I use menu items in context menu patch but I just capture the varname with regex

mortal fractal
#

making your own menus

austere talon
#

menu items are the ones that are just a bunch of return null funcs right

mortal fractal
#

yes

austere talon
#

fun times owoYay

mortal fractal
#

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

umbral hedge
quick ibex
#

@umbral hedge fart

#

๐Ÿ—ฟ

#

much better

golden gulch
#

goodness sake that scared me

#

I forgot I had the plugin enabled

quick ibex
#

BRO

umbral hedge
#

good thing it has a volume slider now trolley

limber skiff
#

best plugin ever

quick ibex
#

lower the volume ๐Ÿ—ฟ

golden gulch
#

I will turn it up ๐Ÿ—ฟ

austere talon
mortal fractal
#

it doesnt

#

i dont think

austere talon
#

then what did u mean by it allows them to have children

mortal fractal
#

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

austere talon
#

it wont throw

mortal fractal
#

theres extra processing in the Menu component towards these other components is the thing

austere talon
#

null is a valid react component

jagged cloak
#

megu will change fart to slider

mortal fractal
umbral hedge
jagged cloak
#

nop trol

umbral hedge
#

its so easy sk

jagged cloak
#

you added slider after i pred

#

ok i will do

umbral hedge
#

look at moyai plugin

#

for examp[le

austere talon
#

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

lament nimbus
#

me when discord pronouns

charred monolithBOT
lament nimbus
#

testing is fun

umbral hedge
#

deez nuts lmao

jagged cloak
lament nimbus
#

yeah I don't expect it to actually happen

#

they first added it a while ago

#

and yet nothing has happened since

jagged cloak
#

its been like a year since they added that lmao

lament nimbus
#

they already are insane

#

thats the issue

#

but yeah also discord doesn't want to moderate someones pronouns being "insert slur here"

charred monolithBOT
jagged cloak
#

its just a silly extra field

#

you can still just use bio

charred monolithBOT
lament nimbus
#

fair

austere talon
austere talon
#

bad javascript formatter

austere talon
#

fuck it im adding dotprop eslint rule

umbral hedge
#

W

lament nimbus
austere talon
#

produces imo very ugly code

lament nimbus
#

its decently configurable

austere talon
#

and doesn't let u customise anything

lament nimbus
#

you can customize plenty

austere talon
#

my main issue with it is that it doesn't adapt to ur custom formatting

lament nimbus
#

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

austere talon
#

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

lament nimbus
austere talon
#

i advise u to use .{0,50} instead

#

or whatever number of max characters would be appropriate

lament nimbus
#

I think I am matching more than 50 chars lol

austere talon
#

.+? has the potential to match way too much

lament nimbus
#

actually that may be matching too much I can probably use an inner element instead

austere talon
#
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"```
lament nimbus
#

yeah I hit that issue a couple times

#

regex101 yelled at me for "catastrophic backtracking" a couple of times

austere talon
#

LOL

umbral hedge
#

lmao

lament nimbus
#

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

lament nimbus
#

the devtools formatter

austere talon
#

oh

#

i had prettier imported at some point

#

we could add it back

lament nimbus
#

I need to know the paren boundaries and yet it doesn't help at all for that

austere talon
lament nimbus
#

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

austere talon
#

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

lament nimbus
#

yeah I just found that

austere talon
#

thats awesome i didnt know that

lament nimbus
#

btw is it safe to rely on the React global being "r"

#

just like the props are always "e"

jagged cloak
#

jk i read wrong but still

lament nimbus
#

well maybe not global idk how react works but

austere talon
#

you can just import REACT_GLOBAL

lament nimbus
#

the (THIS).createElement

austere talon
#
replace: `${REACT_GLOBAL}.createElement`
lament nimbus
#

well I meant more in regex

austere talon
#

oh

lament nimbus
#

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

quick ibex
#

should i try implementing a >greentext plugin tomorrow?

jagged cloak
#

in case they change off r i guess

#

even though they never will

austere talon
#

no u cant

#

it's not always r

austere talon
austere talon
#

try to find a better way

lament nimbus
#

I'll just add some lookarounds

austere talon
#

you could match the brackets perhaps or try to find some unique string

#

i would only do the .{0,x} trick for x < 200

lament nimbus
#

yeah ill add a lookaround for ""!==\w{1,3}&&

austere talon
#

\w{1,3}

#

is that a minified varnme?

lament nimbus
#

Z

austere talon
#

show

lament nimbus
#

the contrib docs said they are 1-3 chars

#

so thats what I have been using

austere talon
#

you can hardcode Z probably

#

Z = default

lament nimbus
fiery jungle
#

no not always

austere talon
#

oh

#

like that no

#

but foo.Z = foo.default

fiery jungle
#

bd devs said it was sometimes Z or Zp or some

#

lemme check

lament nimbus
#

whats lookbehind syntax again

austere talon
#

yes

#

it can also be ZP

lament nimbus
#

I need to memorize that

austere talon
#

but x.Z = x.default

austere talon
#

i always forget too lmao

#

i memorisedthem now finally

#

ahead
?=
?!

behind
?<=
?!<

lament nimbus
#

guh regex 101 will stop being stupid

austere talon
#

you love how once the < is before and the other time it's after

lament nimbus
#

it works in electron so it doesn't really matter if its non-fixed width

austere talon
#

non fixed width lookbehind probably has horrible performance

lament nimbus
#

oh true

austere talon
#

the quantifier makes it non deterministic

#

also uh

#

you shouldn't use \w btw

lament nimbus
#

should I just use \w or

#

oh

#

why

austere talon
#

always use . when possible

#

variable names may contain $

#

which isn't a word character

lament nimbus
#

oh

lament nimbus
austere talon
#

idk

lament nimbus
#

noOOOOOOOOOOOOOOOOOOOOoooo

austere talon
#

nested quantifiers ((foo*)*) are always a bad idea

umbral hedge
#

meow

lament nimbus
#

I'll just match the &&

#

it should still be specific enough at least

#

(?<=&&)r\.createElement\("div",{className:[().\w]+?\.userInfoSection\},r\.createElement\(.+?\}\)\)(?=,r\.createElement)

austere talon
lament nimbus
#

ohhhh ok so look ahead is ?= and lookbehind is the same but pointing to the left

austere talon
#

pronounsText.+&&.{1,2}\.createElement\("div".+?userBio:.{1,2}\}\)\)

#

obviously insert ur groups as needed but smth like this should be safe

lament nimbus
#

mmm ok

#

\.pronounsText.+&&(.{1,2}\.createElement\("div",{className:[().\w]+?\.userInfoSection\},.{1,2}\.createElement\(.+?\}\)\))(?=,.{1,2}\.createElement)

austere talon
#

that work?

lament nimbus
#

yeah

austere talon
#

did u get the custom formatter to work

lament nimbus
#

I never tried

austere talon
#

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

lament nimbus
#

nice one

austere talon
#

yeah like i said

lament nimbus
austere talon
#

like what code exactly

#

&&createElement(allThisJazz) => &&[createElement...), yours]

#

?

lament nimbus
#

I am modifying an argument to createElement

austere talon
#

got the custom formatter to work

lament nimbus
#

amazing formatter

austere talon
#

gonna add the prettify(moduleId)

lament nimbus
austere talon
#

yaya

lament nimbus
#

Deez nuts lmao

austere talon
#

pronouns right

lament nimbus
#

now time to replicate bio styles

lament nimbus
austere talon
#

doesn't discord have a pronoun system already?

#

maybe u could just hijack that

lament nimbus
#

I thought about it

austere talon
lament nimbus
#

but it is locked behind an experiment so it isn't shown otherwise, and I doubt it will ever be used

austere talon
#

HAHHAHAHA

#

i forgot again and was like whaaa why did webpack troll me

lament nimbus
#

formatter jumpscare

austere talon
#

works fine

#

just hijack discord pronouns

lament nimbus
#

woooooo rewriting the entire regex time

austere talon
#

force enable experiment and patch profile

#

nah this one is gonna be really easy

#

no regex needed

lament nimbus
#

yeah I know

#

wait

austere talon
#

well for getProfile() patch yes

#

but for the thing to show u can just enable the experiment

lament nimbus
#

wouldn't that also show the box in user settings

austere talon
#

just hide it trolley

lament nimbus
#

I would just use a patch to force enable it in the popout only

austere talon
#

or you could just remove the experiment check from render

#

if thats not complicated

lament nimbus
#

I just have to remove the ""!==V

#

its easy

austere talon
#

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

lament nimbus
austere talon
#

so V is the pronouns variable?

lament nimbus
#

yes

#

k = the experiment check

austere talon
#

ah

lament nimbus
#

k = c.Z.useExperiment({}).showPronouns,

austere talon
#
match: /=.{0,7}.useExperiment.{0,6}\.showPronouns,/,
replace: "=true,"```
#

trollage

lament nimbus
#

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?

austere talon
#

you can match the V and then use a backreference

lament nimbus
#

yeah

umbral hedge
#

just patch the userstore

austere talon
#
/,(.{1,2})!==""&&.{1,2}\.createElement.+?pronounsText\)\},\1/```
#
replace: (m, pronouns) => yourCustomPronoun + m.slice(pronouns.length, -pronouns.length) + yourCustomPronoun
charred monolithBOT
lament nimbus
#

""!==(.{1,2})&&(r\.createElement\(r\.Fragment.+?\},\1\)\))

charred monolithBOT
lament nimbus
# charred monolith

I wouldn't be surprised if you knew discord's codebase better than discord themselves

charred monolithBOT
austere talon
austere talon
# charred monolith
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 }))
}```
brave forge
quaint sapphire
grave mangoBOT
quaint sapphire
#

Too bad that you removed that code

austere talon
#

you don't even need that tho

#

comma operator exists

quaint sapphire
#

comma operator?

#

Tf is that

austere talon
#
createElement(( window.yes="some stuff", someMoreStuff(), "div"))```
quaint sapphire
#

I'm not talking about react stuff

#

Overall, inline functions are useful

austere talon
#

yes but sometimes like in ur case u can achieve the same thing via comma operator

quaint sapphire
#

In my case you removed it completely and just call a function from the API to init

#

Bad ven

austere talon
#

(y(), z)

runs y then returns z unconditionally (unless y throws ofc)

#

useful to know

quaint sapphire
lament nimbus
#

That's to prevent webpack from messing with it iirc

quaint sapphire
#

Or completely unrelated

austere talon
#

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

lament nimbus
quaint sapphire
#

I don't feel comfortable calling comma an operator

#

It just chains multiple statements together

lament nimbus
quaint sapphire
#

Tf is that?

lament nimbus
#

openasar

limber skiff
#

streams don't load for me with openasar lol

quaint sapphire
#

Can't we make a plugin to mimic OpenAsar?

jagged cloak
#

yes but why

quaint sapphire
#

Well

#

Bc we can

lament nimbus
#

Openasar (or the default app.asar) is what loads discord

austere talon
#
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

quaint sapphire
austere talon
#

nah

#

u can't

umbral hedge
#

u can't

jagged cloak
#

u cant like you want it to lol

quaint sapphire
#

It is basically a zip

austere talon
#

plugins run entirely in renderer, openasar is main/preload though

quaint sapphire
austere talon
#

it's impossible to modify discords asar from within the mod

lament nimbus
quaint sapphire
#

That's no fun

austere talon
quaint sapphire
#

Tyman is dum dum

lament nimbus
quaint sapphire
lament nimbus
#

Openasar compatibility works fine so no reason to do jank stuff

quaint sapphire
lament nimbus
#

yop

jagged cloak
#

more like u super dumb bumb

quaint sapphire
#

Doesn't enjoy doing fun things

jagged cloak
#

troll

#

if you call that fun make everything inside renderer and see how far you get

charred monolithBOT
#

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...
quaint sapphire
#

I didn't write fun

#

I wrote dum

#

Autocorrect changed it

jagged cloak
#

terolley

quaint sapphire
#

Mf can't read

jagged cloak
#

read again

#

dum dum

lament nimbus
quaint sapphire
#

Are ya integrating pronoundb with Discord's new pronoun thingy?

lament nimbus
#

hm ig I could remove string concat because I use interp anyways

lament nimbus
quaint sapphire
#

Does pronoundb allow you to have anything you want?

austere talon
# quaint sapphire Is it locked by the filesystem or smth?
  1. discords asar is owned by root on Linux so good luck overwriting that without running the entire app as root (you're insane)
  2. nodejs requires the file once then caches it so modifying the file does nothing
  3. renderer has no access to node, the file system or anything else, hell it doesn't even know what a nodejs is
  4. the idea is too silly even for all the silly people here
quaint sapphire
austere talon
#
  1. then just use OA or make ur own mod lmao
quaint sapphire
#

That ain't fun

austere talon
#

the asar is just a zip containing non minified js

quaint sapphire
#

I did say that

austere talon
#

decompile, edit, rebuild, profit

quaint sapphire
#

Btw

austere talon
quaint sapphire
#

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?

lament nimbus
quaint sapphire
lament nimbus
quaint sapphire
#

Man, you are taking it too seriously ffs

#

Can't even troll in this server

#

Tyman no baka

lament nimbus
#

yooooo it works

quaint sapphire
#

@lament nimbus tell me my pronoun

lament nimbus
quaint sapphire
#

I literally made an account just to have it/its

lament nimbus
#

my client has you cached as unspecified so it won't show that until I reload

quaint sapphire
#

That's ga- straight
/s

austere talon
austere talon
lament nimbus
austere talon
#

some people have discord open for weeks

lament nimbus
#

(me)

austere talon
#

just store like timestamp with each cache entry and if it's older than say an hour ignore cache

quaint sapphire
#

Incase they added one

lament nimbus
#

you can change them too

#

so its better to do it for all

austere talon
#

btw @golden gulch i haven't actually tested if that new sendMessage code still works when there isn't any reply

golden gulch
#

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)

austere talon
#

does it?

golden gulch
#

yep

#

(I had tested before just wanted to double check xP)

quaint sapphire
#

Yeah but...does a pronoun really matter if you change it?
At that point aren't you just plainly lying to yourself?

austere talon
#

discord message sender so weird

#

why do they take two different objects?

austere talon
#

Also I still have no idea what that third argument to sendMessage is

lament nimbus
austere talon
#

it's a function I think and it causes send to wait for some onReady

austere talon
lament nimbus
#

*Check

#

I can write

quaint sapphire
# lament nimbus ??

If ur pronoun is important to you, you won't change it every week.

So invalidating the cache for users with pronouns seems wasteful.

lament nimbus
#

sure its not being changed often but its also not being added just as often

quaint sapphire
#

Added and changed are diff

lament nimbus
#

who cares

#

its easy to have consistency anyways

quaint sapphire
#

Fuck that shit

#

You ain't royalty to tell me how I must address you

lament nimbus
#

debugging go brrr

lament nimbus
quaint sapphire
#

I never understood Record in ts, is it like a data class or smth?

lament nimbus
#

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

austere talon
#

Record is a utility type that's a shortcut for object type

lament nimbus
austere talon
#

not only

lament nimbus
#

with better syntax

austere talon
#
Record<"foo" | "bar" | "baz", string | number>

// equiv

interface {
    foo: string | number;
    bar: string | number;
    baz: string | number;
}```
lament nimbus
austere talon
#

lmao

#

yeah ig

#

it's just less ugly owoYay

lament nimbus
#

yeah

austere talon
#

record is still pretty ugly imo tho

austere talon
quaint sapphire
# lament nimbus ๐Ÿ˜

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?

lament nimbus
#

๐Ÿ˜

quaint sapphire
austere talon
fiery jungle
#

it's not a required plugin

#

bleh

quaint sapphire
#

Guy ain't a pronoun

lament nimbus
austere talon
#

no I'm not lmao

lament nimbus
#

anyways I am great at this

quaint sapphire
lament nimbus
#

*gender

austere talon
#

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?

quaint sapphire
austere talon
quaint sapphire
#

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

austere talon
#

noone has ever brought up being offended

quaint sapphire
#

But people do get offended

austere talon
#

no correlation

quaint sapphire
#

No correlation with what you are saying

#

Sighs

lament nimbus
#

which should take priority
discord pronouns or pronoundb pronouns
i am already hijacking the component so might as well future proof it

austere talon
#

discord's

#

Well maybe not for now

#

since probably anyone who has ones set has meme pronouns

quaint sapphire
#

Won't that be nitro only or smth?

austere talon
#

is there even anyone who has them set?

lament nimbus
#

doubt it

austere talon
#

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

lament nimbus
charred monolithBOT
lament nimbus
limber skiff
#

yes

#

๐Ÿ—ฟ

austere talon
#

๐Ÿ—ฟ

austere talon
# charred monolith
  1. you don't need to webpack search, it's a global (DiscordNative.window)
  2. it's only a thing on electron, not on Web, so please add web logic or wrap it in an if (!IS_WEB) {}
  3. you're listening to really weird music but it goes hard kinda
#

@limber skiff

limber skiff
#

aight

#

completely forgot about web lol

austere talon
#
  1. 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
lament nimbus
#

lmao

limber skiff
fiery jungle
#

does anyone know how the discord pronouns are going to be displayed

lament nimbus
#

its part of the experience

austere talon
#

we sent Screenshots above

fiery jungle
#

where

#

guhhh

lament nimbus
#

except there is text under the header

austere talon
#

wait do u just force show it lmao

lament nimbus
fiery jungle
#

is the pronouns thing gonna be like a selector or bio

#

guh

#

I will expand my queen died copypasta

lament nimbus
fiery jungle
#

love

lament nimbus
#

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

limber skiff
austere talon
#

I feel like even if they abandon the idea the code will never be deleted

#

poggermode is also still a thing lmao

austere talon
lament nimbus
#

so

#

just guessing

austere talon
#

then one day it happened

lament nimbus
#

RN was expected

austere talon
#

ig don't delete ur manual pronoun component code yet

lament nimbus
#

and then we procrastinated everything

lament nimbus
fiery jungle
#

undo

#

husk

lament nimbus
#

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

austere talon
#

the regex just won't match anything

lament nimbus
#

yeah

austere talon
#

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

limber skiff
#

aight done

#

no longer uses the windowstore

austere talon
#

does document.focus() work fine on electron?

limber skiff
#

hasFocus()? yeah

austere talon
#

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

limber skiff
#

aight

austere talon
#

actually just put it in the Boom function

lament nimbus
#

words never before said:

limber skiff
#

๐Ÿ‘

austere talon
#

it probably doesn't matter but better be safe than sorry

#

we don't wanna make BDFDB 2 on accident

limber skiff
#

yeah

lament nimbus
#

I already almost did that

austere talon
#

making BDFDB is kind of easy in js

lament nimbus
#

love how it just rerenders 5 times when I open profile

limber skiff
#

damn it

#

gotta love the conflict

austere talon
#

lmao

#

Google having a normal one

lament nimbus
#

electron shut up

limber skiff
#

whatever