#๐Ÿ‘พ-core-development

1 messages ยท Page 132 of 1

mortal fractal
#

ill give you my regex tho

junior olive
#

it will i think im goood

mortal fractal
#
/(?<=avatarDecorationOverride:(.)}.+?void 0:(.)\.avatarDecoration,.+?)return{avatarPlaceholderSrc:.,avatarDecorationSrc:(.),isAvatarDecorationAnimating:(.),/
mortal fractal
austere talon
#

huhh why

mortal fractal
#

idk i thought you were anal about it in vencord patches

austere talon
#

nah thats fine cause its in a lookbehind

austere talon
mortal fractal
#

ah

dire trench
#

why use .+?

austere talon
#

if it can be avoided yes absolutely

#

but we commonly use it in lookbehinds to match variables

#

although we put the lookbehind BEHIND the match

#

it does the same thing, just more performant (usually) and easier to digest imo

junior olive
#

I'm gonna keep the avatarDecorationURL patch, ditch the user patching though

austere talon
austere talon
junior olive
#

places where the override is used

#

its fine it'll work out

charred monolithBOT
junior olive
#

waht i thought it wasnt fixed

austere talon
#

i fixed it blud

junior olive
#

ok

charred monolithBOT
austere talon
#

okay i REALLY sleep now

junior olive
#

go

#

the rats are coming

dire trench
#

try svgo

spark pivot
#

add a review comment

jagged cloak
#

27 lions sorry they multiplied for a second

dire trench
#

why is it duplicated

#

github moment

jagged cloak
#

its not for me

#

These SVGs could be optimized. Try using SVGO.

dire trench
#

yeah i refreshed and now its fine

#

i thought i messed something up fear

wintry violet
#

we are working on fixing everything

#

just saw im on the alt acc

#

lol

charred monolithBOT
jagged cloak
#

u wot

uncut glen
#

as i was saying we are fixing everything and we are optimizing with svgo

jagged cloak
#

kfc men lmao

uncut glen
jagged cloak
#

oh i forgot

#

also

austere talon
#

:(

#

vscode said it was valid

jagged cloak
#

you became the very thing you swore to destroy

#

actions exploder

#

i hope there are no conflicts with me pushing this lmao

charred monolithBOT
austere talon
#

FUCK YOU SHITHUB WHY MAKE A BRANCH

jagged cloak
#

branch protection lol

#

i used shithub editor for the first time in years horror

charred monolithBOT
jagged cloak
#

If anyone has last min nitpicks

#

nows your chance before i poof for the night

pine olive
#

Why vencord-installer isnt running

spark pivot
#

vns

nimble pendantBOT
jagged cloak
#

whys it showing it twice

#

it should just be a reply its not a separate review gh wot

spark pivot
jagged cloak
#

i have tried devourign a macbook

spark pivot
#

did you turn it on afyt eajmkarweoe

jagged cloak
#

whar

spark pivot
#

cgdhj,t, nb TURN IT ON fnewioak jm,tgwae

jagged cloak
#

same energy as this

spark pivot
#

energy? what's that

jagged cloak
#

in ur walls

spark pivot
#

can i eated it

jagged cloak
#

do eat drywall

spark pivot
#

i cant because I EATED ITN KJAEWLW>

uncut glen
dire trench
#

had to manually merge husk

#

there's most definitely a better way to do this

jagged cloak
#

wait why

dire trench
#

dev constants conflict

#

cuz new plugin got merged

#

yeah there was definitely an easier way to do this

charred monolithBOT
dire trench
#

somehow i messed it up???

#

i checked like 10 times

jagged cloak
#

hard reset and try again shiddohwell

#

always works for me

dire trench
#

but like i swear i copied it exactly

#

and there is still conflicts

jagged cloak
#

ded link moment

dire trench
#

guess only i can see it

jagged cloak
#

yeah

#

conflicts redirects to pr if you dont have any

#

but if its not ur pr it 404s because ???

dire trench
#

there is no way to undo a commit from the github website

#

its not in their api

#

its just impossible

#

thanks microsoft

fringe eagle
#

created a vsc plugin that lets you create plugins

#

prob gonna update it soon to make it for userplugins

dire trench
#

had to download github desktop and clone just to revert

fringe eagle
#

same

austere talon
#
git reset --hard HEAD~1
git push --force origin yourbranch
#

deletes last commit

#

destructive

#

stop using shithub desktop for everything got damn

#

teach urself git cli basics, future you will thank you

fringe eagle
#

i know git cli basics

dire trench
#

i could have juse used the resolve conflict thing on github ๐Ÿ’€

fringe eagle
#

most of the time it's git clone, git push, git pull, and git add .

jagged cloak
#

i have been learning it as needed

#

but most of the time its just pulling changing branch or git reset --hard lol

charred monolithBOT
uncut glen
olive aurora
#

i use lazygit because im lazy

#

its actually really good bc it doesnt abstract away what git is like gh desktop does

#

but lets you do lots of advanced things easily

jagged cloak
#

peppy jumpscare

uncut glen
charred monolithBOT
fringe eagle
#

wai

#

FUCK

#

CHAT SCROLL

dire trench
uncut glen
# charred monolith

GitHub did funny and showd the index and css files in a non existent folder๐Ÿ’€

#

Had to reupload both

fringe eagle
#

imagine i actually contribute to Vencord (i will not because i dont have plugin ideas)

uncut glen
#

Just look at what ppl here are searching for and make that

fringe eagle
#

maybe i should find a bd plugin 5-year olds want to use in vencord and recreate it in vencord

oak hull
#

it will make discord 200% faster

dire trench
#

web 1.0 discord

livid heath
#

remove all the js, will be as ffast as light

uncut glen
dire trench
#

discord but its in vbscript

uncut glen
#

Just see what ppl are most looking for and make that ez

dire trench
#

discord.hta

zenith jackal
#

guys my discord is really really fast but it doesnt work help

#

i removed all the js and css

uncut glen
#

Looks good

fringe eagle
#

screw this

#

i'm making an embed plugin

uncut glen
#

What are u doing in the plugin?

fringe eagle
#

prob something like the 3y3 encoded profile thems

uncut glen
#

Oooo

dire trench
#

no more profile space

#

theres probably more invisible characters that can be used tho

#

the 3y3 chars are from 0xE0001 to 0xE007E inclusive

#

but those are special cuz they are invisible and zero-width

fringe eagle
#

i'm looking at FakeProfileThemes source

dire trench
#

look at the source for mine

#

its way more efficient

junior olive
#

Why did nobody tell me how powerful lookaheads are.

livid heath
#

when done right

dire trench
#

thats like the most useful feature of regex

#

u might as well not use regex

junior olive
#

ok like

#

i didn't know ok..

#

i just made most of my patches in decor use them

dire trench
#

i learned regex just to automate parsing css

#

took like 0 seconds

#

search google

junior olive
#

bruh i learnt enough to make a big ass plugin

dire trench
#

what was ur prior experience?

junior olive
#

like zero

#

i made always animate

#

that was it

dire trench
#

like even outside of vencord plugin development

junior olive
#

vendetta dev

dire trench
#

outside of that?

junior olive
#

idk man general coding shit

#

not really regex

dire trench
#

all i know is some java ๐Ÿ’€

#

the mf public static void main(String[] args)

#

i love java

shy veldt
dire trench
#

58 billion soon...

junior olive
#

ok chat humor me

#

if ids is undefined, will this set the ids parameter?

#

I think it will

#

bc ids?.length will result in undefined

#

and undefined !== 0 = true

#

@austere talon this is why i had that explicit ids check

dire trench
#

just test in console

junior olive
#

i did

#

its true

dire trench
#

if ids is null or undefined then ids?.length will be undefined

junior olive
#

yes

#

which will make that statement true

dire trench
#

and you are checking against 0

junior olive
#

mhm

dire trench
#

strict type

junior olive
#

gonna js add a ids && before it

dire trench
#

yeah thats the best way to do it

fringe eagle
#

if i add myself to the devs list when making a pr-

fringe eagle
#

it's okay right

dire trench
#

yeah thats what ur supposed to do

fringe eagle
#

k

junior olive
#

i swear to god i look at the decor plugin funny and it gains 10 lines of code

fringe eagle
#

anyways i'm gonna install fakembed vencord

#

and i broke discor

uncut glen
fringe eagle
#

cause i didnโ€™t pnpm install

uncut glen
#

Oh lol

fringe eagle
#

just added a 3y3 command for looking at this

#

but i forgot to change it to content

#

i mean

#

the 3y3

#

cause this happens

rare shale
#

i will explod gradle

cunning canyon
#

ven ancient pfp

charred monolithBOT
#

Discord Account

edm115

What happens when the bug or crash occurs?

Nearly all places that holds an asset on top of another asset have an offset.
This applies to the red dot on the pinned icon, the user status (Online, Idle, ...), the user avatar in several places (User profile popout, chat list, members list, ...), the user banner (same), but also in the Shop.
See screenshots for more

What is the expected behaviour?

These assets shouldn't collide nor have an offset.

###...

fringe eagle
#

wow an issue

charred monolithBOT
#

Within Webcord () the user has a menu that is handy to have for its browser container which are accessible by pressing the alt key:

https://github.com/Vencord/Vesktop/assets/96911866/ad1cf127-8b3b-432a-9b38-14a0151b950d

Some settings in WebCord are already handled by VenCord plugins such as blocking science, and typing, but most everything else is missing including what's mentioned in the title. An alt-key menu would improve Vencord by allowing the user to block most everything to incre...

steep burrow
charred monolithBOT
umbral hedge
#

OH this is why my modloader keeps breaking

#

smh now i gotta update it

charred monolithBOT
charred monolithBOT
austere talon
#

but that only applies to !==, not ===

charred monolithBOT
#

Discord Account

No response

What happens when the bug or crash occurs?

macros donmt work on logitech to mute your self

What is the expected behaviour?

non muteable

How do you recreate this bug or crash?

logitech headset g733 n logitech g hub

Errors

Replace this text with your crash-log.

asfdasd

Request Agreement

  • [X] I am using Discord Stable or tried on Stable and this bug happens there as well
  • [X] I have read the requirements for opening a...
crude raptor
#

stupendous

livid heath
#

doesnt look like vencord issue

nimble plaza
#

yeah

dusky sonnet
#

when the bug starts with logitech

steep burrow
dusky sonnet
#

the 1970th issue

dapper crest
dapper crest
dapper crest
nimble pendantBOT
junior olive
livid heath
ocean garden
#

Hey, if I edit a message's content in MessageStore after it's loaded into the UI (I'm using a flux handler for CHANNEL_SELECT to do this), is there a way to trigger a refresh afterwards so that the updated message shows up on the UI? I tried dispatching a MESSAGE_UPDATE flux dispatch on the message but I didn't see any change immediately until I switched to another channel and came back.

#

pseudocode of what I'm trying to achieve

async CHANNEL_SELECT({ guildId, channelId }) {
            let messages = MessageStore.getMessages(channelId)._array;
            messages.forEach(async (m: MessageObject) => {
                if (m && meetsCondition(m.content))) {
                    m.content = modifyMessage(m.content);
                    await FluxDispatcher.dispatch({ type: "SOME_EVENT", message: m });
                }});
charred monolithBOT
ocean garden
#

No it's not possible to patch message content on UI like fakenitro does it because I need to call an async function there and I learned yesterday that there is no way to get a return value from an async function in a sync function.

charred monolithBOT
limpid badger
#

huh?

nimble plaza
#

read the commit name

limpid badger
#

yeah i'm not up to date

#

been busy nowadays

charred monolithBOT
void echo
#

How can I verify that the user has nitro before applying a patch?

verbal pumice
#

you probably cant

void echo
#

ah

verbal pumice
#

you'll probably need to check at runtime

void echo
#

yeah

verbal pumice
void echo
#

non nitro users who use SuperReactionTweaks are getting this

#

if then enable the always super react option

charred monolithBOT
#

Could you please try and run venmic in the Rest-Server mode and then use any HTTP-Client to see if using the server results in more meaningful errors?

Please see the "Compiling" section in venmic, then run the binary from the command line and perform the following requests:

  1. (GET) http://localhost:7591/list, pick any node (i.e. Firefox)
  2. (POST) http://localhost:7591/link with the following body:
    {
      "props": [
       ...
junior olive
limber skiff
#

why doesnt discord code check for it

livid heath
#

oh wait

charred monolithBOT
olive aurora
#

if ids?.length

#

just do that

junior olive
#

no bc i want to check if they pass ids but it's got zero entries..

#

if (ids && ids.length === 0) return {};

austere talon
junior olive
#

guh maybe it is right

#

i hate that

void echo
dire trench
#

you can use UserStore from @webpack/common

const user = UserStore.getCurrentUser();
if (user.premiumType < 1) // Disable super reacts
austere talon
#

when you press the super react button

#

we just change the default state to true

verbal pumice
austere talon
#

but the state can never be true in vanilla discord if u don't have nitro

void echo
austere talon
void echo
#

there was a guy in support complaining abt it

#

Idk if we should default to false though since then nothing changes by default

dire trench
#

couldnt you add a setting to disable it that requires restart?

junior olive
#

predicates are weird to me there's no indication the plugin needs restarting to patch after a setting changes

void echo
#

it would be nice to just be able to grey out an option that's nitro only

junior olive
#

u could use the disabled feature

dire trench
#

you could even add an if statement in the patch that uses $self to fetch a variable
default the variable to true
and in start() get the current user and set false if not nitro

austere talon
#

it should be self explanatory to the developer

#

and you can mark specific settings as requiring a restart

junior olive
#

its fine to a dev but to a end user not

dire trench
junior olive
#

didn't know that

void echo
#

I think there's some sort of conflict too

#

It's just outright not working for some people

junior olive
#

works fine for me

dire trench
#

how u react that fast

junior olive
#

shift key

void echo
#

@sour rain

dire trench
#

nah even with shift key thats too fast

void echo
#

has that issue

junior olive
#

not really

lime stone
dire trench
#

it all appeared in 1 second for me

#

latency i guess

junior olive
#

you must have high ping

sour rain
#

wut

void echo
#

i was js mentionning u here

sour rain
#

wtf

void echo
#

the plugin isnt working at all for you?

#

are you on vesktop or desktop

#

or web

sour rain
#

its enable

#

but i have to actually

#

click and select

void echo
#

wdym

sour rain
#

i cant do that

#

i have to click this button here

#

the add reaction button

#

see

#

when i do the other way it wont work

void echo
#

waht's the other waty

junior olive
#

oh bruh thats expected

sour rain
#

that

void echo
#

oh

#

yeah

sour rain
#

yall mfs are not that quick at manually clicking add reaction and selecting random emojis

void echo
#

you can hold shift and it keeps the react panel open

sour rain
#

oh rlly?

void echo
#

yeah

sour rain
#

oh

#

ok nvm

#

My bad

#

discords hidden fucking features man

#

they suck

void echo
#

if we messed with the right click ones that would be a nightmare for non nitro users

sour rain
#

๐Ÿ’€

dire trench
# void echo yeah

the nitro ad that shows when u open the reaction picker can be hidden with css

[class*=emojiPicker_] [class*=wrapper_]{display:none!important}
#

ok but it doesnt load anything other than the first page of emojis unless you click the x button so nvm

void echo
#

Should I just default it to false

#

or add a note saying "You need nitro for this to work"

dire trench
#

did u try any of what i suggested earlier?

void echo
#

im on my laptop without vscode

dire trench
#

ill see if it works

dire trench
dire trench
#

cant they just set it to false

#

since they dont have nitro

void echo
#

They can yea

#

but most people dont look at plugin settings

dire trench
#

yeah the css isnt a solution for it

void echo
shy veldt
charred monolithBOT
steep shore
#

this should be faced with a warning

#

so you don't accidentally press it like the dumbass that I am did

#

if you have one already

limpid badger
#

since when sort button causes the cursor to act like it's about to select an text

limpid badger
#

welp, i think i gotta stop overlooking at small details

void echo
dire trench
#

could easily be fixed with css then

void echo
#

yea but it'd need to be added to base client

dire trench
#

oh that plugin menu

void echo
#

no point making a quickcss js for that

dire trench
# void echo no point making a quickcss js for that

i think this will work

{
    find: ".hasAvailableBurstCurrency)",
    replacement: {
        match: /(?<=\.useBurstReactionsExperiment.{0,20}useState\()!1(?=\).+?(\i===\i\.EmojiIntention\.REACTION))/,
        replace: "!!Vencord.Webpack.Common.UserStore.getCurrentUser().premiumType&&$self.settings.store.superReactByDefault&&$1"
    }
}
void echo
#

could you test it? i have nitro and i dont have any alts lmao

dire trench
#

i dont have nitro and the super react ad doesnt show for me

#

just need someone with nitro to test

lime stone
#

you don't ned that i don't think

#

:/ i prefer to do != null but javascript has multiple nulls

dire trench
# lime stone why !!

premiumType can either be undefined, 1, or 2
i want it to be false if undefined and true if 1 or 2

#

!undefined is true

#

!!undefined is false

lime stone
#

it's redundant though

dire trench
#

!1 is false and !!1 is true

#

same for 2

lime stone
#

yes?

#

it doesn't change the behaviour of the code not having it

dire trench
#

its the shortest and best way to accomplish what i was trying to accomplish

#

it worked for me

lime stone
#

you can just remove it ๐Ÿ˜ญ

dire trench
#

wdym

lime stone
#

i think?

dire trench
#

idk what ur trying to say

#

remove what

lime stone
#

just Vencord.Webpack.Common...

dire trench
#

nah it wont work otherwise

#

UserStore isnt global

lime stone
dire trench
#

new nitro teir $25 per month

shy veldt
#

1 is classic

#

2 is nitro

dire trench
#

i thought there was only classic and full nitro

#

wtf is basic

lime stone
#

there's just basic and full

dire trench
lime stone
#

(technically you can get classic but you shouldn't)

lime stone
#

js weird

#

OK that makes sense then

dire trench
#

also null && true is null

shy veldt
#

bros a bit behind

#

basic nitro replaced classic

dire trench
#

i stayed away from discord for like 2 years

#

games too

#

i live under rock

lime stone
#

cold turkey

nocturne haven
dire trench
#

fr

#

its fr just a distraction

#

@void echo also im pretty sure

shouldPlayBurstReaction(playingCount: number) {
    if (settings.store.unlimitedSuperReactionPlaying) return true;
    if (playingCount <= settings.store.superReactionPlayingLimit) return true;
    return false;
}

could be replaced with:

shouldPlayBurstReaction(playingCount: number) {
    return settings.store.unlimitedSuperReactionPlaying || playingCount <= settings.store.superReactionPlayingLimit;
}
#

u could even just put it directly in the patch

junior olive
junior olive
#

Would just make it more confusing

dire trench
#

cuz u made the variable names so long

#

i did that at first with my plugin and it just got so unreadable

junior olive
#

They're fine lol

dire trench
#

for example, shouldPlayBurstReaction could be changed to playSuperReaction

junior olive
#

it's fine as it is

#

Having a func that the patch just calls is way neater than putting the func in the patch

#

more obvious what it's deciding doing to decide to play

dire trench
#

in this specific case i think it could be more readable actually

junior olive
#

no

#

it's good as is lol

dire trench
#
{
    find: ",BURST_REACTION_EFFECT_PLAY",
    replacement: {
        match: /(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,
        replace: "!($self.settings.store.unlimitedSuperReactionPlaying||$1<=$self.settings.store.superReactionPlayingLimit)"
    }
},
#

nah thats honestly cleaner than the function

junior olive
#

I really do not see the harm in the function bro

#

change for the sake of change

dire trench
#

only made the change cuz i was already looking at the plugin to fix an issue with it

junior olive
#

pointless change though

dire trench
#

sooo clean tho

#

look at how clean this is

#

wow

#

patch only plugin

#

๐Ÿ”ฅ

junior olive
#

Just leave it as a function it was harmless

#

Easier to modify in the future

dire trench
#

ur header doesnt give eslint error but mine does

junior olive
#

what

dire trench
#

so the super react plugins header includes names and mine doesnt
thats the only difference
but when i add my name to my plugins header, i still get the eslint error

junior olive
#

weird

#

@cunning canyon could you separate the highlighted code into a utility similar to Decor's?

dire trench
#

idk why u would limit it to certain preset numbers

junior olive
#

better experience

#

wanted a slider

dire trench
#

worse experience

#

think about the user

junior olive
#

it's fine bruh ๐Ÿ˜ญ

dire trench
#

bro what

junior olive
#

i wanted a slider and the slider is a pain to use

dire trench
#

just make it a number input

#

isnt this for the users of the plugin tho?

#

why limit it to 5, 10, 20, 40, 60, 80, and 100

#

u cant even select 0

junior olive
#

5 = discord
20 intervals = full message of super reacts
at some point it's pointless to finely control how many can play.. just turn on unlimited

#

you can only hover over so many at once

#

add 0 sure, but the slider is fine

#

if the user really wants a fine grained number they can set it in the console, but for most ppl the slider is fine and provides a way nicer experience than a number box

dire trench
#

nah thats crazy

charred monolithBOT
dire trench
#

goes against every ux philosophy

junior olive
#

ezpz slider providing nice default numbers that work well vs clueless number box that you have to think of a number for

#

it is fine

#

just fix what u wanted to fix.. leave the rest alone it is fine :/

dire trench
#

imagine if the mfs who made operating systems had that same viewpoint

junior olive
#

discord literally does this

#

it. is. fine.

dire trench
#

thats cuz its font, spacing, and zoom

#

for those there are actual unsuported values

junior olive
#

please bruh

#

slider with good defaults is way nicer

dire trench
#

did you confirm the max burst reaction thing even works?

olive aurora
#

ur mom is nicer

dire trench
#

setting it to 0 doesnt do anything

junior olive
dire trench
#

even 0?

olive aurora
#

anyways if you really want you can manually set the config

dire trench
#

thats crazy to expect people to do that

#

when u can just do OptionType.NUMBER

#

nobody will complain about it not being a slider

#

but somebody will complain about it not being a number input

#

why limit user input when you dont have to

#

especially when there are no downsides to not limiting user input

olive aurora
#

me when i set NaN

junior olive
#

ryan

dire trench
#

you can only type - and 0-9

#

it doesnt let u type anything else

junior olive
#

ryan please js cease

junior olive
dire trench
#

and Number.isNaN

junior olive
#

ryan i do not want to use a number field nor does ant0n

#

leave the slider and shouldPlayBurstReaction function alone

#

fix the super react by default issues like you wanted to

dire trench
#

u crazy

charred monolithBOT
junior olive
dire trench
#

nah thats stupid

#

if i wish for something bad for the users doesnt mean it will get merged

#

like what

junior olive
#

dude it is literally fine as is

dire trench
#

nah makes 0 sense

junior olive
#

fix the thing you wanted to fix

dire trench
#

also im on the version in vencord rn

#

and it dont work

junior olive
#

works fine for me

#

at 10

dire trench
#

i set it to 5

#

and it does nothing

#

do i have to restart?

junior olive
#

no

livid heath
#

I think slider is better

junior olive
dire trench
#

i have it on 5 but none play

junior olive
#

just doesn't apply to the random ones

dire trench
#

ok 0 works i just thought it would make them default reacts

#

but on 5 none of them play

junior olive
#

5 and 10 work fine for me lol

dire trench
#

only like 1 plays

junior olive
#

ยฏ_(ใƒ„)_/ยฏ

void echo
#

Thereโ€™s also the random ones that arenโ€™t affected

shy veldt
#

ermm what

jagged cloak
#

ermm what

woeful sable
#

ermm what

dire trench
charred monolithBOT
#

I spoke too soon. The first launch after update, all was well. I closed, and yes, it does happen again.

The bug from what I understood happens on relaunch

Dead on the money. Now to test 0.4.3-1.... yes! Even with the broken cache, 0.4.3-1 renders properly. I can swap back to 0.4.3 and still see it broken, so electron v29 was definitely the correct fix.

Good to know. I remember seeing libdrm being mentioned as the main thing causing the corruption itself, chromium bu...

charred monolithBOT
dire trench
#

@void echothis is what i got

export const settings = definePluginSettings({
    superReactByDefault: {
        type: OptionType.BOOLEAN,
        description: "Reaction picker will default to Super Reactions",
        default: true,
    },
    unlimitedSuperReactionPlaying: {
        type: OptionType.BOOLEAN,
        description: "Remove the limit on Super Reactions playing at once",
        default: false,
    },

    superReactionPlayingLimit: {
        description: "Max Super Reactions to play at once",
        type: OptionType.SLIDER,
        default: 20,
        markers: [0, 5, 10, 20, 40, 60, 80, 100],
        stickToMarkers: true,
    },
}, {
    superReactionPlayingLimit: {
        disabled() { return this.store.unlimitedSuperReactionPlaying; },
    }
});

export default definePlugin({
    name: "SuperReactionTweaks",
    description: "Customize the limit of Super Reactions playing at once, and super react by default",
    authors: [Devs.FieryFlames, Devs.ant0n],
    patches: [
        {
            find: ",BURST_REACTION_EFFECT_PLAY",
            replacement: {
                match: /(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100}\i\(\i,\i\)>=)\d+/,
                replace: "$self.settings.store.superReactionPlayingLimit&&!$self.settings.store.unlimitedSuperReactionPlaying"
            }
        },
        {
            find: ".hasAvailableBurstCurrency)",
            replacement: {
                match: /(?<=\.useBurstReactionsExperiment.{0,20}useState\()!1(?=\).+?(\i===\i\.EmojiIntention\.REACTION))/,
                replace: "!!Vencord.Webpack.Common.UserStore.getCurrentUser().premiumType&&$self.settings.store.superReactByDefault&&$1"
            }
        }
    ],
    settings
});
#

didnt include header and imports cuz discord message limit

#

when i set it to unlimited they dont all animate

#

is that how its supposed to be?

#

i was expecting them to all animate at once

#

i guess it works tho cuz when its 0 none play
and on values above 0 some will play

void echo
charred monolithBOT
junior olive
#

@austere talon by the way i resolved the reviews you made

torpid thicket
#

so decor has been working, however I noticed that the reviewdb plugin isn't showing up in the plugins section, is this a bug?

torpid thicket
junior olive
cunning canyon
#

LMAO

toxic bough
#

Day 48439483 of asking for a free avatar decor plugin!

olive aurora
#

mf

fringe eagle
#

how to make tytd a PartialObjectDeep<Message, {}>

#

btw i'm just testing a plugin rn

junior olive
austere talon
dire trench
#

cant start vars with numbers so thats probably why they did that

fringe eagle
#

3y3โ€™d

#

thatโ€™s basically the namd

charred monolithBOT
#

One idea:

  • make a listener process that connects to the org.kde.kglobalaccel DBus.
  • user can now register global shortcuts via KDE systemsettings.
  • when it receives the globalShortcutPressed signal, use a Vencord plugin to run FluxDispatcher.dispatch({ type: "AUDIO_TOGGLE_SELF_MUTE" }) or whatever.
  • that vencord plugin also disables the keybinds menu, and encourages the user to use their system settings.
  • add actions to the .desktop file like how KDE Spectacle does.
frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

charred monolithBOT
spark pivot
#

is there anyway i can change the data of a flux event that is sent to the client? like i have a message_create event that i want to change something on, can i change it before it is used by the client?

limber skiff
#

yes

#

patch the websocket handler that dispatches the event

spark pivot
#

i mean when the event is received by the client

#

i assume it's mostly the same?

limber skiff
#

yeah

#

it has to dispatch it somewhere

little wing
charred monolithBOT
fresh cloak
#

Gosh, i was looking into the global keybind api and it does not support keyup/down

#

implementing ptt alone would be rather involved likely requiring iohook

#

simple things like mute/deafen shortcuts would be easy though

austere talon
#

why in the world does iohook have 1k stars but only 300 monthly Downloads

#

and why does it require such weird dependencies

fresh cloak
#

No idea

#

After looking around that seems to be able to do it though

#

I'll experiment with it

austere talon
#

cursed

fresh cloak
#

If someone else can find the functions that toggle ptt that would be awesome

austere talon
#

it looks fine probably

austere talon
#

search for
TOGGLE_PUSH
TALK_TOGGLE

fresh cloak
#

No idea what that means i write native code usually

austere talon
#

ctrl shift f in devtools

fresh cloak
#

But yes I'll check (somewhere)

austere talon
#

actually i can just check myself from phone

fresh cloak
#

None of the other web discords have this implemented either

austere talon
#

doesn't seem to be a flux event

fresh cloak
#

Looking at one implementation from another app it didn't look that bad

fresh cloak
austere talon
#

PTT might not be possible

fresh cloak
#

Why not

#

It's gotta be a function we can call

austere talon
#

no

#

discord desktop uses their own custom voice chat native module

#

discord web uses webrtc

#

webrtc doesn't seem to support push to talk

fresh cloak
#

? Push to talk works when focused

#

Why can't we just call that

austere talon
#

oh huh

fresh cloak
#

Works on webcord

#

And in that's discord screen audio thing

#

And in browser normally

#

Of course we can do it

#

It's just about having a global hotkey that calls it

junior olive
#

also could u not just spoof it

#

mute/unmute based on key press state

fresh cloak
#

Of course i could but i want to hold it down

junior olive
#

yeah

fresh cloak
#

And not be constantly muted

junior olive
#

shrug

fresh cloak
#

Because then people don't talk to me thinking I'm afk

junior olive
#

yeah was just a idea

fresh cloak
#

Because i often leave without saying anything to smoke weed

austere talon
#

i never understood PTT people tbh, just single button press to toggle mute is way more convenient

fresh cloak
#

It's just years of muscle memory and the reason above

#

We can easily implement mute hotkeys with the global hotkey api

austere talon
#

anyway just reverse engineer to find the PTT function then

#

not the best guide but it works

fresh cloak
#

this would be so much easier if this was a native application

austere talon
#

no it wouldn't lmao

fresh cloak
#

it literally would

#

just IDA it ๐Ÿ˜ญ

#

it's so great because there's no actual button i can search for

austere talon
#

disassembled bytecode is more readable than human readable Javascript code that you can debug and run any scripts on?

austere talon
#

PTT
PUSH_TO_TALK
pushToTalk

#

or look at the event listeners for keypresses

#

getEventListeners(window)

fresh cloak
#

lol none of these keypresses have.. any letters assigned to them

#

ahh

#

you have to expand them

junior olive
#

@fresh cloak module 227602 may be of use

fringe eagle
#

anyways SOMEBODY give me a way to turn a string into a PartialObjectDeep<Message, {}>

fresh cloak
fresh cloak
#

found a handleKey function but where do i go from whatever this is

e.exports.prototype.handleKey = n("986083"),
fringe eagle
#

no wait lemme just

fresh cloak
junior olive
#

uhh

#

i don't remember uhh

austere talon
#

Vencord.Webpack.extract(227602)

#

you only get the shortcut if you enable consoleshortcuts plugin

fresh cloak
#

that's real

#

gotcha

#

lemme enable that

fringe eagle
#

what

#

what's happening

fresh cloak
#

so i've pretty much found what happens when you press the PTT key

#
[g.GlobalKeybindActions.PUSH_TO_TALK]: {
                onTrigger(e, t) {
                    T.default.getMode(t.context) === g.InputModes.PUSH_TO_TALK && (O[g.GlobalKeybindActions.PUSH_TO_TALK].isPressed = e,
                    T.default.getMediaEngine().eachConnection(t=>t.setForceAudioInput(e, !1), t.context))
                },
                keyEvents: {
                    keyup: !0,
                    keydown: !0
                },
                isPressed: !1
            },
#

now i ned to figure out what this T is

fringe eagle
fresh cloak
#

See if this was a native application i could simply be taken to the definition of T with a button press

austere talon
#

you also can in js

#

put a breakpoint

#

and u can look at everything

fresh cloak
#

I tried but it's all so confusing

#

T is a "Module" object

jagged cloak
#

oh thats why you said ida

fresh cloak
#

The constructor takes me to some weird looking function

jagged cloak
#

its you

fresh cloak
#

It's me

#

I violate game engines

jagged cloak
#

im aware

#

xd

#

you and many others

fresh cloak
#

I hate web dev bro

#

This is somehow worse than ida

austere talon
#

it's really not, you're just having what we call a little skill issue

#

but you'll get there

fresh cloak
#

I will come to your house

austere talon
#

okay bet

#

don't threaten me with a good time

jagged cloak
#

dont worry this is just worse harmony patching (its not even close lol)

fresh cloak
#

Gotta regex to find your function dogkek

austere talon
#

hooking? clueless

jagged cloak
#

hookers? you've been at the bar too much

fresh cloak
#

But yeah no this is definitely worse

#

Hunting down one definition is like a blindfolded scavenger hunt

jagged cloak
#

have fun

austere talon
#

it really is just skill issue catstare

fresh cloak
#

Like i already found the function

jagged cloak
#

it is likely more than one ocurrence

fresh cloak
#

But it's on some mysterious T object and i have no idea where it ends. It's probably an object on an object on an object on an object

austere talon
#

the mysterious T object is just a variable

#

.default implies it's a default export

fresh cloak
#

Yes i know

austere talon
#

you just put a breakpoint and jump to the definition or even just search for the name

#

takes 5 seconds

fresh cloak
#

I already put a breakpoint but the constructor takes me God knows where

austere talon
#

or you literally just type findByProps("getMediaEngine") in the console

fresh cloak
#

that's not real i think

jagged cloak
#

wym

livid heath
#

there took me 2 seconds, its module 42887

fresh cloak
#

maybe part of the console shortcuts plugin

jagged cloak
#

it is

#

Vencord.Webpack.findByProps

livid heath
#

Vencord.Webpack.findByProps

fresh cloak
#

please stop thinking i know anything about this stuff

#

i'm literally just diving in blind

#

thank you

livid heath
#

there's a first for everything

jagged cloak
#

u think i patch shit KEKW

fresh cloak
#

if i had to write a website i'd write it in rust

#

that should tell you how much i know about js etc

livid heath
#

YES PLEASE

fresh cloak
#

literally just use Yew

#

html rust macro, runs in wasm

livid heath
#

rsx blobcatcozy

fresh cloak
#

dom manipulation through js interop, still 5x faster than react

austere talon
#

banned permanently

livid heath
#

idk ven, rust aint all that bad for web dev

fresh cloak
#

it's just what i'm familiar with

#

it's either rust or C#

austere talon
fresh cloak
jagged cloak
#

i almost exclusively use svelte thats it

austere talon
#

wasm is garbage for frontend ui

fresh cloak
#

mfw still faster than react

austere talon
#

that's just blatantly wrong lol

fresh cloak
#

it's not

austere talon
#

but react is bad anyway

livid heath
fresh cloak
#

:)

austere talon
#

id rather cut my leg off

jagged cloak
#

consider

fresh cloak
#

rare v L

livid heath
#

in all fairness tho, rust ui state isn't great right now

fresh cloak
#

mhm

#

anything serious using them usually has to fork and expand

#

which is in turn good when those contributions make it back upstream

#

i.e. PopOS

austere talon
#

heavily using js apis like dom from wasm will always perform terribly compared to pure js

and using webgl / canvas rendering instead ruins accessibility and UX

using rust or similar for frontend is just massive cope

use svelte, it's good

fresh cloak
#

real

void echo
jagged cloak
#

opengl in current year is just death by the same 27 lions

void echo
#

its no better than it ever was

jagged cloak
#

for basically anything unless you want to be deemed old as fuck

#

i dont think it was even meant to do as much as people used it for

livid heath
austere talon
#

doing that is not possible

#

ipc is inherently slow

fresh cloak
#

yes, it is slow

austere talon
#

serialisation is inherently slow

fresh cloak
#

that's true

#

it's still a very fast framework all things considered

#

and once wasm finally gets native dom manipilation that'll go away too

austere talon
#

using anything but js for frontend is delusional and has no future unless browsers add wasm bindings for dom which they'll never do or in 20 years from now

livid heath
#

right you have to serialize objects between wasm and js :blobpain:

#

just use shared memory /j

fresh cloak
#

i remember trying to make wasm interact with unity

#

i had to directly fuck with memory to pass anything more than a number around

#

then i said "fuck this"

livid heath
#

anyone using rust and wasm to do web dev is already coping so i dont think they'd care about performace that much

austere talon
#

i never understood why people even do it

you're literally just shooting yourself and also your users in the foot

#

but tbf you gotta be a masochist to even like rust

fresh cloak
#

i am

austere talon
fresh cloak
livid heath
#

they just wanted to say "we use the blazing fast ๐Ÿš€๐Ÿฆ€๐Ÿš€ rust language" rocketcrash

austere talon
livid heath
austere talon
#

well now you're just contradicting yourself ๐Ÿ’ž

austere talon
#

and are some of the best performing options you can get (other than just rendering everything on the server)

livid heath
#

i used astro for my personal website
and react for anything else

austere talon
#

svelte is just hot

#
<script>
    let count = 0;
    
    function handleClick() {
        count += 1;
    }
</script>

<button on:click={handleClick}>
    clicks: {count}
</button>
{#if count === 727}
    <p>holy shit</p>
{/if}
livid heath
#

astro loads fast, but the 3js blob rendering in the background makes performance on mobile infinitely worse

void echo
#

i need to learn that

livid heath
#

omg if statements

#

that one thing has convinced me to use svelte

void echo
#

if statements in html ๐Ÿคค

austere talon
#

yeah instead of using js conditionals and array map like react, in svelte you have those things in your markup

livid heath
#

also 727 lol

void echo
#

ok that's next on my list

grave mangoBOT
livid heath
#

taking notes for my rust gui crate nyabom

austere talon
#

NO

livid heath
#

its native gui

void echo
#

it looks too good to be true whats the catch

livid heath
#

wasm support is just more work

fresh cloak
#

rust native gui can look nice

jagged cloak
grave mangoBOT
# austere talon and it has inbuilt animations/transitions and `use:` which lets u run code on no...

**Plugins.svelte: **Lines 121-126

<p
    use:overflowTooltips={p}
    class="description ellipsis-overflow"
>
    {@html highlightMatches(p.description)}
</p>

**Plugins.svelte: **Lines 53-68

function overflowTooltips(node: HTMLElement, _: PluginData) {
    const applyTitle = () => {
        const hasOverflow =
            node.scrollWidth > node.clientWidth ||
            (!node.classList.contains("author") &&
                node.scrollHeight > node.clientHeight);

        node.title = hasOverflow ? node.textContent! : "";
    };

    applyTitle();
    return {
        update() {
            applyTitle();
        },
    };
austere talon
#

okay ill stop shilling svelte now sorry

junior olive
#

i like react and jsx

fresh cloak
#

what the FUCK is a Set

austere talon
#

HashSet

junior olive
#

I LOVE SetS

fresh cloak
#

no

#

a Set

austere talon
#

it's a HashSet

livid heath
#

array but unique values only

#

kinda

fresh cloak
#

how the fuck do i access this

void echo
#

is SolidJS any good

livid heath
#

.get

void echo
#

or

fresh cloak
#

not real

austere talon
#

[...set] gives you a plain array

jagged cloak
#

use

#

turn on console shortcuts

fresh cloak
#

i have

austere talon
fresh cloak
austere talon
#

or just use set.forEach(v => {})

livid heath
#

oh right .get is for maps

austere talon
#

or plain for of loop

#

many options

junior olive
#

ven

fresh cloak
#

i swear to god the forEach loop was not working earlier

#

ahh i've found something much better i htink

#
findByProps("getMediaEngine").getMediaEngine().connections.forEach(v => {
    v.input.setPTTActive(false)
})
#

cool

#

this works

#

now to look at iohook

limber skiff
#

what does ptt mean

fresh cloak
#

push to talk

#

i want global ptt in vesktop

limber skiff
#

oh

fresh cloak
#

it's annoying, electron has an api for global hotkeys

#

which is great for mute/deafen toggles

#

but it doesn't support keyup/down

#

so now i have to work around that

#

Why does js do weird shit like setting this to a random variable in scope while intermittently using both this and the new variable

#

Just seems like.. random waste

livid heath
#

huh

fresh cloak
#

Yeah

livid heath
#

wdym random variable in scope

fresh cloak
#

It was using this a lot

livid heath
#

this has a very well defined meaning

fresh cloak
#

Yes

#

I know that

#

I program

#

But what I'm saying is

livid heath
#

oh

#

i see

fresh cloak
#

I notice that input was on a variable r

livid heath
#

you are talking about minification artefacts

#

yeah that's just minification

fresh cloak
#

But r is also this

#

But that's more code than needed

livid heath
#

well it is how it is

fresh cloak
#

That's literally an expansion, adding an extra assignment

#

And useless if you're using this most of the time anyways

livid heath
#

this.someMethod(this.someProp, this.otherProp) vs r = this; r.someMethod(r.someProp, r.otherProp)

fresh cloak
#

Unless the browser figured out that r is this except in that one occasion

#

And then shows me this instead of r?

#

No idea

#

Either way I'm happy i finally found it

#

It's fun stepping into things you know nothing about and learning

austere talon
#

what r u waffling about

#

you should almost never be using this in js, it sux

fresh cloak
#

Wha

#

What do you mean

#

Oh

#

Idk bro I'm just talking about the code i looked at to find the function

#

Complain to discord

charred monolithBOT
fresh cloak
#

iohook doesn't work on node15

fresh cloak
#

there's a different one but it wont build

jagged cloak
#

probably just discords minifier

#

or rspack

#

i doubt they use this like that themselves lol

#

(oh btw rust reference Real)

charred monolithBOT
fresh cloak
#

i love it bro

#

it uses some native module, but it says it doesn't exist

#

yet the node module happily does come with prebuilts

#

prebuilds folder has to be moved to dist ๐Ÿ˜ญ