#👾-core-development

1 messages · Page 154 of 1

jagged cloak
#

report them so they get flagged and thrown down

lime stone
#

to their parents?

dapper crest
#

No more spam from whitenames asking how to install messagelogger or other thirdparty plug ins

austere talon
#

least braindead vencord-dev misuser

woeful sable
#

I was thinking about adding a role to access vendetta dev channels but I'm lazy

spark pivot
#

if something new comes up i'll tell people so we know quickly

spark pivot
swift fjord
austere talon
#

trueee

austere talon
#

reminder to self to remove badge circle crop tmrw

charred monolithBOT
charred monolithBOT
hollow slate
#

i did that before and i did it again, same error

limber skiff
#

Message is a Type

hollow slate
#

right

#

cant i do new Message({..}) ? it has a constructor too

limber skiff
#

well you need the actual message class

#

not a type

hollow slate
#

oh well

#

alright

#

ty

spark pivot
limber skiff
#

const Message = findLazy(m => m?.prototype?.isFirstMessageInForumPost != null)

#

@hollow slate here's a way to grab discord Message class

hollow slate
#

dont mind me, am just learning tsx, all i know is python and java

limber skiff
#

do you know what are Types

austere talon
#

why are you trying to create a new message

austere talon
#

instead of the class

hollow slate
charred monolithBOT
#

this behaviour should definitely be configurable!

i really dislike this "feature", hence why i wrote the code this way. and the fact that noone complained about this inconsistency until now shows that people either don't mind or prefer it this way

to me this also seems kind of redundant because you can already have the same behaviour by just clicking the beginning of the seekbar

hollow slate
#

heyo, is there like any fuction or anything close to it that would return like a discord message react component/element which would be based on the Message object i'd pass onto it

charred monolithBOT
hollow slate
#

:c

fringe basalt
#

you can use react devtools to inspect a chat message, or the preview in some modal like the report one

#

then find some way to grab it

#

in case of the delete message modal it's this component right here

charred monolithBOT
austere talon
#

you most likely do not actually need the component

charred monolithBOT
charred monolithBOT
still wasp
#

is there a way to define a function to be called once a plugin option is modified?

verbal pumice
#

settings have an onChange option

still wasp
#

oh awesome thats perfect Catyes

#

gracias

verbal pumice
#

remember that it also fires when your plugin is disabled though

austere talon
#

both firing when disabled and not firing at all when a setting is changed are undesirable

charred monolithBOT
brazen bone
#

Is there any way to rerender the whole react tree?

austere talon
brazen bone
#

I'm changing a mapping that will affect basically every class name in the whole dom

limber skiff
#

then change before it's rendered 😛

brazen bone
#

I do, but reloading the page to test every small change is rather slow

#

I wouldn't do this in production of course, it's to speed up development

hollow slate
austere talon
#

look at MessageLinkEmbeds

hollow slate
#

Hm

hollow slate
hollow slate
limber skiff
#

what do you want to do

#

what's the plugin

hollow slate
#

Am Makin like a uhhh save/bookmark messages plugin

#

It would show the saved messages on a modal

#

And if the user wants, it would also save the accessories of that message

austere talon
#

you have the plugin as an example

#

try to replicate what it does

hollow slate
#

Alr

austere talon
#

see if it works for you, see if its what u want

hollow slate
#

Alralr

#

Understandable

charred monolithBOT
dapper tiger
#

@austere talon can vencord desktop get the hardware accel option like standard discord has

verbal pumice
# charred monolith

tested on vesktop and chrome, not on firefox. don't see how just disabling video locally requires something special from the browser side though

charred monolithBOT
#

Describe the bug
When in a call, audio recorded in Vesktop experiences a delay of ~0.5 seconds before being sent

To Reproduce
Apologies for the jank setup, but this is the best way I could think of to reproduce the problem.

In all calls, one person is muted and observes the audio received

  1. Start a call using a service other than Discord to provide a static reference audio channel to listen to, I used steam chat
  2. Start a call in Vesktop, say some stuff, and observe the di...
#
[Vencord/Installer] branch deleted: self-update
charred monolithBOT
dapper tiger
#

some users have problems with hardware accel

#

so they might want to turn it off

junior olive
#

Some ppl turn it off so more of their gpu is free to render games

dapper tiger
#

I will pr and ven will merge immediately

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

glass jasper
#

Can i get someone to test something for me?

charred monolithBOT
austere talon
#

dont ask to ask

charred monolithBOT
mortal fractal
midnight raven
charred monolithBOT
dapper tiger
dapper tiger
#

doing it myself cause ven so lazy

charred monolithBOT
mortal fractal
midnight raven
#

yeah

dapper tiger
#

what does that mean

#

insane

#

is thqat some abbrev

spark pivot
#

99% sure it means "let's cancel this merge"

#

so uh

#

L you ig

charred monolithBOT
spark pivot
#

nvm lol

dapper tiger
#

ven so evil

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Environment:

  • Stable 256231 (96a39c5)
  • Vencord 30bc979 (Vesktop V0.4.4)
  • Electron 27.1.2
  • Chromium 118.0.5993.144
  • Linux 64-Bit

Description:

During calls, other participants occasionally experience an extremely loud and high-pitched sound. This issue has persisted across the last two versions of the program.

Reproduction Steps:

  1. Join a call.
  2. Engage in conversation until the high-pitched sound occurs.

Additional Information:

A clip of the sound has b...

charred monolithBOT
austere talon
dusky sonnet
#

I wonder if the readme is properly translated or if they just used google translate

#

Oh they’ve translated way more than the readme

charred monolithBOT
turbid hatch
#

🙏

long stream
#

i looked a bit into them and they translated like, 2 other projects

#

nvm 3

verbal pumice
#

wait do custom keybinds just work on web and discord limits them purely cause they feel like it

long stream
#

i assume they would work just fine?

verbal pumice
#

yeah i dont see any way to make custom global keybinds so this just works lmao

verbal pumice
austere talon
verbal pumice
#

yeah im aware

turbid hatch
#

the guy makes japanese video content too and the jp responses seem to be good

long stream
#

yaya i saw

#

almost everything related to him is in jp xd

turbid hatch
#

might get them to do the translations if they're proper

lime stone
#

isn't i18n coming soon™ upstream anyway

#

ye

hollow slate
#

quick question, if i made like a message slur censor plugin and i want it to have a default worldlist, should i just make a json and put it in there and do a PR or...? i feel like that am not supposed to just push slurs into the vencord git repo

lime stone
#

not sure if I said this but isn't project fluent a bit overkill? is the gender stuff and plural stuff that important? or is it the easiest to use anyway

verbal pumice
#

module number got minified lol

austere talon
#

something similar to what discord has would be best

austere talon
lime stone
lime stone
#

totally good optimisation

#

who knows, maybe it adds up and you can save 4 bytes

turbid hatch
turbid hatch
#

i dont know what system discord uses

lime stone
#

i usually just create a map and use String.format or whatever the language has lol

turbid hatch
#

but even discord's is overkill

lime stone
#

i like qt's system but this isn't c++

#

c++cord when

turbid hatch
#

which can trigger javascript actions

#

so its like

#

ehhh

#

i could implement discord's i18n i guess

#

i just have to work out the best way of doing it

lime stone
#

does fluent work so you just wrap strings in a function call and they are magically translated? or do you need translation keys

turbid hatch
#

both, in theory!

lime stone
#

(well, qt actually uses a macro 😭 )

turbid hatch
#

fluent's actual react integration looks something like this:

return (
    <Localized id="lsndfkjhsdf">
        Then your content <span>exists here</span> and it will get automatically localized.
    </Localized>
);
lime stone
#

(it's like tr("Hello %1").arg("world"))

turbid hatch
#

in fluent its translation keys

#

so

#

t("hello-world", { world: "Discord" });

#

is how i've exposed it atm

lime stone
#

you can create something similar to macros in javascript with compiler plugins probably? (famous last words)

turbid hatch
#

you can

#

you can use a typescript transformer

#

but there's not much point when it has to run at runtime anyway xd

lime stone
#

brb porting qt i18n to typescript

#

and QString why not

turbid hatch
#
-vencord = Vencord

hello = Hello my beautiful {$worldName}! And yes this works because {-vencord} is awesome!
t("hello", { worldName: "Discord world" }); // -> Hello my beautiful Discord world! And yes this works because Vencord is awesome!
#

is how the file works

#

i didnt think it was that overkill tbh

lime stone
#

well you can't see the strings in the source

turbid hatch
#

we can try react-i18next then i suppose

lime stone
#

so you could make something just as good for vencord's needs in 5 minutes with JSON.parse :P

turbid hatch
#

my main concern is languages where we cant really do that xd

lime stone
#

i know minecraft does that xd

#

shrimply reverse engineer and copy minecraft's translation engine

turbid hatch
#

also i need to think of a better way of doing translations where we need to insert links and stuff

#

though i dont suppose we really have anything like that do we

lime stone
#

plurals? do they matter

turbid hatch
#

a bit

#

polish has plurality based on none, some, and more

lime stone
#

just do item(s)

turbid hatch
#

that doesnt exist

#

it reads quite awkwardly from my understanding if you dont do plurality correctly

lime stone
#

just do some

turbid hatch
#

no as in

#

if you do some when you have more it doesnt read as a proper sentence

lime stone
#

but in english wouldn't it be like 1 items

turbid hatch
#

and looks really bad

#

:p

lime stone
#

does anyone care that much

turbid hatch
#

i imagine people do and would flag it up as an issue

#

saying it doesnt read as proper polish

#

or x language

lime stone
#

pedant

#

I wonder how Qt handles that now... probably doesn't

turbid hatch
#

it does

lime stone
#

i've seen people do count > 1 ? tr("items") : tr("item")

#

oh lol

#

read if qt

turbid hatch
#

there's a table that explains how qt linguist does it

#

because yes

#

languages are this complex

lime stone
#

you need a calculator for a brain to speak russian i see

turbid hatch
#

i imagine it becomes common sense when you learn

#

i am unsure how qt linguist seems to do it

#

but their translation tool seems to use the english strings as keys

lime stone
#

is there a language where prime numbers have a different plural

turbid hatch
#

so i think

#

well, i suppose what they would do is have multiple translations for the same sentence

#

e.g. in theoretical vencordi18n

#
// for polish, but we'll pretend
{
    "There are {} plugins available": {
        "none": "There are no plugins available",
        "some": "There is {} plugin available",
        "more": "There are {} plugins available"
    } 
}
#

i guess

lime stone
#

so maybe not overkill

turbid hatch
#

fluent itself probably isnt that overkill considering this

#

but we can definitely simplify it a bit

lime stone
#

yeah

turbid hatch
#

ourselves

lime stone
#

hm

turbid hatch
# turbid hatch

main reason why i picked it is because these rules are baked in

#

xd

lime stone
#

but gender

turbid hatch
#

and gender too

lime stone
#

vencord is woke now?? /s

turbid hatch
#

because language gender actually matters

turbid hatch
#

LANGUAGES SUCK

#

FUCK ME

lime stone
verbal pumice
#

wait

#

LoadingQuotes exists

turbid hatch
#

yes

lime stone
#

i feel like the usual practice would actually be to create multiple translation keys for that :P

verbal pumice
#

is that also getting translated

turbid hatch
#

i mean

#

i dont think some of the stuff really comes across well in other languages

#

but we could translate it and then the resultant translations are the xored versions

lime stone
#

xored

turbid hatch
#

so there's no spoilers

#

(or however its encoded i dont remember)

spark pivot
#

Lets make the only language for vencord simlish

long stream
#

meow language

turbid hatch
#

so its like

#

eh?

lime stone
#

huh?

#

i mean like

turbid hatch
#

i think most translations are try to be neutral if possible, but then just default to a gender

#

lets make our default gender female

lime stone
#

lmao

#

i meant like

n_rabbits = "You have %d rabbits"
n_foxes = "You have %d foxes"
#

don't ask

#

i have a lot of rabbits and foxes

verbal pumice
lime stone
#

use neopronouns

#

actually, other languages are a lot more complex with gender

verbal pumice
#

inb4 issue because vencord doesn't respect pronoundb pronouns

lime stone
#

poor brain

#

AA

turbid hatch
#

it'd either be gender neutral or default

turbid hatch
# turbid hatch

english
french
czech
lithuanian
polish
romanian
russian
japanese

are the ones discord supports, so we'd have to theoretically support too

#

so we dont have to implement all the rules, but we have to implement a lot

lime stone
turbid hatch
#

french

#

every thing has a gender

lime stone
#

but does you have need to change depending what the thing in question is

long stream
#

my computer has a gender ???

turbid hatch
#

yeah

#

because its like

#

le and la

lime stone
#

lemme get google translate out haha

turbid hatch
#

but if you really wanted to you could just encode it so its not obvious

lime stone
#

you could use configuration? or encryption like loadingquotes

turbid hatch
#

otherwise its masculine

lime stone
#

maybe hang around different people if this plugin is needed? catstare

#

(ew discord defauled to ugly pepe stare)

turbid hatch
#

so you'd have la famille and les enfants

#

un garçon, une fille

#

(boy, girl)

#

une chemise (a male-tailored shirt) and un jupon (a slip dress)

lime stone
#

amazing

turbid hatch
#

oh yeah that's a fun one

#

you is gendered too

#

that's male

long stream
lime stone
#

OH GOD THE READER NEEDS TO BE MALE

long stream
#

like i get a bunch of results first, but then i try and select one and it limits it to like 6

turbid hatch
#

i think its tu?

lime stone
#

SELECT YOUR GENDER TO USE VENCORD

turbid hatch
#

oh no

#

tu is informal singular

#

nevermind i am misremembering

verbal pumice
turbid hatch
#

yeah i got it wrong

#

its formaled

#

not gendered

lime stone
#

imagine if you is aged

long stream
#

lewi did u study french..?

turbid hatch
#

yes

#

i did it for like

#

9 years

#

but i didnt pay attention

long stream
#

dummy

turbid hatch
#

yes you is a formal and pluraled thing

#

tu is the singular informal, otherwise you use vous for everything

#

formal singular, or informal/formal plural

#

i dont know why

#

i dont care to know why

lime stone
#

because i wouldn't be surprised at this point

turbid hatch
#

anyway yeah languages have really arbitrary rules and if you dont follow them you look like a dumbass who cant use basic grammar

verbal pumice
#

i love languages

lime stone
#

you broke a load of rules in english in that sentence

turbid hatch
#

exactly

#

Anyway, yes, languages have very arbitrary rules, and if you do not follow them, you look like a dumbass who cannot use basic grammar.

lime stone
#

Anyway, yeah. Languages have really arbitrary rules - and if you don't follow them you like like a dumbass who can't use basic grammar.

#

UI';m bad at rgrammar

turbid hatch
#

- makes no sense here because of the and follow on

#

drop and and replace with ; for a better sentence

lime stone
#

I didn't know that

turbid hatch
#

:p

#

english is probably the worst offender for strange rules

austere talon
#

why not just use i18next

#

that seems to be the most popular

turbid hatch
#

i mean yeah that's what im looking into

#

a lot of this discussion is just how stupid languages are

austere talon
#

seems smarter than using some niche tool made specifically for mozilla stuff

turbid hatch
#

and if we can get away with 1:1 translations

#

wait

#

i completely missed the plurals page on i18next

#

lmfao

lime stone
#

use google translate at runtime

turbid hatch
#

it just uses ${key}_${plurality suffix}

#
{
  "key_zero": "zero",
  "key_one": "singular",
  "key_two": "two",
  "key_few": "few",
  "key_many": "many",
  "key_other": "other"
}
#
i18next.t('key', {count: 0}); // -> "zero"
i18next.t('key', {count: 1}); // -> "singular"
i18next.t('key', {count: 2}); // -> "two"
i18next.t('key', {count: 3}); // -> "few"
i18next.t('key', {count: 4}); // -> "few"
i18next.t('key', {count: 5}); // -> "few"
i18next.t('key', {count: 11}); // -> "many"
i18next.t('key', {count: 99}); // -> "many"
i18next.t('key', {count: 100}); // -> "other"
#

(arabic)

lime stone
#

puts a lot of work on translation writers

#

:P

turbid hatch
#

it does but also fluent does too

#

xd

long stream
#

all this language talk is making me dizzy AiriDizzy

turbid hatch
#

because you have to write all of the weird stuff for it

#
# Simple things are simple.
hello-user = Hello, {$userName}!

# Complex things are possible.
shared-photos =
    {$userName} {$photoCount ->
        [one] added a new photo
       *[other] added {$photoCount} new photos
    } to {$userGender ->
        [male] his stream
        [female] her stream
       *[other] their stream
    }.
lime stone
#

we are not parsing user pronouns

#

just use their

austere talon
#

we will simply not support bad languages that wanna be special

turbid hatch
#

i know im just saying like

lime stone
#

😭

austere talon
#

arabic? who needs that..

turbid hatch
#

fluent is complicated but is cool

#

and i know how to use it really well now

#

xd

#

but i suppose i18next works fine

austere talon
verbal pumice
lime stone
#

😔

verbal pumice
#

brb

austere talon
#

english is just "concat words in a predetermined order"

turbid hatch
#

i18next also supports ordinals

#

thats horrifying

lime stone
charred monolithBOT
lime stone
#

I did French at one point

#

I don't think I could even purchase a yoghurt 😔

turbid hatch
#

okay anyhow

#

oooooooh

lime stone
#

what kind of development channel has this become

turbid hatch
#

i18next makes this stupidly easy

austere talon
turbid hatch
#

i suppose

#

it just concats different "contexts" to the key

#

so you can have friend, friend_male, friend_female

#

and pass a context of male or female

#

and it'll work it out

austere talon
#

strictly SVO
other than he/she/it there are no conjugation
etc

turbid hatch
#

okay i will switch to i18next

#

which also means we get to use the react components

austere talon
turbid hatch
#

OH THIS IS FIRE

#

HOLY SHIT

#
return (
    <Trans>
        you just stick your <strong>bullshit</strong> in here and
        it'll work it out! including <Card>react components!</Card>
    </Trans>
)
austere talon
#

yes

lime stone
#

TRANS

austere talon
#

girl every translation framework supports that

lime stone
#

🏳️‍⚧️

turbid hatch
#

i avoided this because the examples show that you have to use an i18nKey

#

but when you read deeper into the docs there's an aside that says its optional and it'll generate one for you

lime stone
#

but also isn't that weird? like a pseudo-component?

turbid hatch
austere talon
turbid hatch
#

i will use this then

#

bye fluent

lime stone
#

i probably have more experience with winforms than react

turbid hatch
#

oh that means we get to use the uhhh

#

i18n extension too

turbid hatch
#

my love

#

actually if we do this

#

then we can just use i18n keys

#

and not have really stupid looking translation files

#

ill show what it does one sec

lime stone
#

why do people say i18n when they could say t9n

turbid hatch
#

i18n !== t9n

#

t9n is just the actual strings of text

lime stone
#

ohh

turbid hatch
#

i18n is making it actually international

lime stone
#

dates

turbid hatch
#

yeah

#

stuff like that

lime stone
turbid hatch
#

i18n is not just translations

lime stone
#

i love working with time

austere talon
#

this is how mine works

#

there's actually not much point repeating the entire string cause it just uses the tag from your children

#

but ig it feels more natural and that's why i18n react does it

austere talon
turbid hatch
#

yeah

austere talon
#

my homecooked framework gives you full intellisense

turbid hatch
#

it'll also replace the translation keys with the actual translated string

#

where applicable

#

so you can see what it is

austere talon
#

why do u need an extension for that lol

#

you can do that with pure typescript

turbid hatch
#

because the files are in json format

#

not typescript

#

silly

#

its resolving them from the json files themselves

austere talon
#
  1. you can import it as typescript file i think
  2. why not use ts file
turbid hatch
#

i could use typescript i guess but then you lose the entire purpose of i18n ally :P

#

which is to show you the string itself

#

not the translation key

austere talon
#

hover the t() func and look at return type

turbid hatch
#

like that?

austere talon
#

not inline no

turbid hatch
#

we use this extension at dbots cause it makes it easier

austere talon
#

that's cool ig

turbid hatch
#

it also makes editing translation files easier

austere talon
turbid hatch
#

its okay to do that but eh

#

also i18next wont support that

austere talon
turbid hatch
#

though i dont mind using a homegrown thing

austere talon
#

tbh copilot translated most things for me

#

it's really good at translating

turbid hatch
#

i'll work with i18next for now and see what i can do with it

austere talon
#

pretty nuts

turbid hatch
#

AI is good at translating

#

that's the one thing i like using it for

#

DeepL is pretty fire too from what i've seen it output

#

but i know GPTs are off the charts because obviously they have had literal books of languages thrown into them

austere talon
#

it correctly assumed tone based on tone in the source strings and was correct

#

poor translators losing their jobs

#

it seems much smarter to just use ai to translate and have a human approve / reject it

turbid hatch
#

yeah thats probably what ill end up doing for the most of it

#

just to begin with

austere talon
#

lame: translating strings and worrying about plurals, gender, etc
based: using purely english and translating the strings at runtime using gpt

#

hey gpt translate this sentence to turkish: 2 plugins

spark pivot
#

Chargpt says 2 eklenti

charred monolithBOT
turbid hatch
#

@austere talon

austere talon
#

doesn't show an error that "hello" is unrecognised and "name" is missing

#

lame

turbid hatch
#

i havent set it up yet

#

properly

#

this is just getting i18n ally working

austere talon
turbid hatch
#

time to do some

#

type definition bullshit

#

actually i wonder

#

does i18n ally support ts files now

#

IT DOES

#

HOORAY

#

FUCK JSON

austere talon
#

make sure that doesn't require loading all strings at once

#

and lets u danymically require

turbid hatch
#

you can

#

i18next is async

#

you can import bundles late

austere talon
#

but also im pretty sure you can import a json file as type in ts

#

cause json files are by definition just frozen objects

turbid hatch
#

they are but i think doing it the ts way is a bit easier anyway

#

since i dont have to worry about json file loading

turbid hatch
#

huh

#

i18next supports fluent

#

neat

#

anyway

#

hm @austere talon i cant seem to get i18next's typescript support to work

#

it wont resolve the keys and it wont check the interpolation

#

how strange

#

let me try making it json and seeing what happens

turbid hatch
#

hm?

#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2024 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import "i18next";

declare module "i18next" {
    interface CustomTypeOptions {
        resources: {
            vencord: typeof import("./translations/en/vencord");
        };
    }
}

cause this is what i had

#

and it didnt work

#

so im just gonna switch back to json translations

#

cause i18n ally got upset as well for some reason :(

grave mangoBOT
austere talon
#

might be this?

turbid hatch
#

dont think so

austere talon
#

i thought we didn't have strict null checks but we do

#

it's just no implicit any that we don't have

turbid hatch
#

the intellisense just doesnt do anything

#

ah well

#

it just says on their docs try typescript 5 but we are on typescript 5

#

so idk

#

its fine though

#

the extension gives you intellisense

#

it just cant do any strict typechecks like with the interpolation sadly

#

also i checked, no the extension wasnt breaking it, cause the typescript support also checks the interpolation variables but it wasnt erroring either

charred monolithBOT
turbid hatch
#

OH I GOT IT WORKING

#

maybe?

austere talon
#

except there's no way to do that yet

turbid hatch
#

:(

austere talon
#

noob

#

try Jason

turbid hatch
#

this is json

#

im gonna go reverse engineer the type now xd

charred monolithBOT
#

https://github.com/Vencord/Vesktop/assets/116850347/8476406a-1898-4f08-9585-807e621f7c11

On my actual screen, it's worse than this, flashing black bars everywhere and even sometimes turning the entire window black, but this video successfully captures the gist of what's going on. No other client I've used has done this. Using it on my 70Hz monitor is fine though, so I'll probably keep it on there but it's almost unusably horrid to even move the cursor in on my 240Hz monitor.

turbid hatch
#

that is very awfully strange

charred monolithBOT
austere talon
#

actually they seem to know how to code so maybe i didnt have to explain it

turbid hatch
#

worth it for non-coders who stumble on it

austere talon
#

WRONG FLAG

#

there edited

turbid hatch
#

I GOT IT TO WORK

#

IM SO PROUD OF MYSELF

#

its because namespaces are formatted differently

#

each translation file is a namespace

charred monolithBOT
#

In case it works and you want to make it permanent you can modify the shortcut on windows to always launch the application with these modified parameters like described above.

image

The short video you showed looks almost 1:1 to how the Battle.Net app behaves on Linux, another Chromium app that has some problems with hardware acceleration and looks exactly like that. That's a sync issue and at th...

turbid hatch
#

so you dont use dot notation to access it, even though theoretically it works

#

let me see if i can get i18n ally to behave now

#

got it behaving

#

it does say "failed to locate key" if you try and navigate to the key in the locale file but it does take you to the right file

#

so its still a bit.. bleh

#

but it works great

#

i suppose there wouldnt be a uh

#

way

#

of automatically doing this would there

#

we'll just have to add the file for every translation bundle

#

oh well!

#

let me test if this even works xd

charred monolithBOT
still wasp
#

Hey, im running into a weird VSCode issue. When I open a folder to edit with a plugin, some imports give errors. But if I open the .tsx file directly, there aren't any errors at all. Anyone else had this problem? im not sure if its a vencord thing specifically or just a vscode issue

spark pivot
#

did you do pnpm i?

turbid hatch
#

it wont contain the tsconfig for vencord

#

you just need to open vencord entirely and edit it

still wasp
olive aurora
#

@austere talon update vencord types when

austere talon
#

soon

#

you love that the current ones are like 8 months old

#

what are u using them for

olive aurora
#

honestly it doesn't rlly work if you want to use it for a plugin repo cuz the paths are gonna be wrong

#

u could prob make it work though

olive aurora
#

u cant import from @webpack

grave mangoBOT
olive aurora
#

vesktop is a vencord plugin

austere talon
#

yes

olive aurora
#

but read above

#

i meant for normal userplugins

austere talon
#

why would u use it for user plugins

#

put it in the vencord folder

olive aurora
#

i love throwing git repos inside vencord

austere talon
#

yes

#

but that idea has been scratched

charred monolithBOT
olive aurora
#

jumpscare

austere talon
#

it's dead

charred monolithBOT
grave mangoBOT
turbid hatch
#

need a better way of doing this ideally

#

i do think generating this type is probably easier

#

so

#

we can just make a script that generates it and we just commit it to the repo

#

should be easy enough

turbid hatch
#
const resources = await fs.readdir("./src/translations/en");

const imports = resources
    .map(r => `${path.basename(r)}: typeof import("../translations/en/${r}").default;`)
    .join(" "); // space padding

const typeDef = `
/* eslint-disable */
/* autogenerated, rerun script to update */
declare module "i18next" {
    interface CustomTypeOptions {
        defaultNS: "vencord";
        resources: { ${imports} };
    }
}
`.trim();
turbid hatch
#

when people add resources

#

it wont auto update the type, so the types will be wrong

#

so i'm just gonna write that as a script

austere talon
#

?

#

idgi

turbid hatch
#

make new file in translations/en

#

write translations for plugin

#

oh no

#

they dont work

#

because i18next doesnt know they exist

austere talon
#

idgi

turbid hatch
#

which bit

austere talon
#

we would always write strings in english

#

english is the file that has all strings

turbid hatch
#

yes

austere talon
#

so why would we ever add a string that doesn't exist in english in another language

turbid hatch
#

you arent going to put all of the translations in one file

#

you're going to split them up

austere talon
#

why not

turbid hatch
#

because the file will be huge

austere talon
#

so?

#

it doesn't matter does it

turbid hatch
#

it does

austere talon
#

how

turbid hatch
#

you would have to load every single translation string, including for things that arent being used

austere talon
#

everything is being used

turbid hatch
#

which defeats the point of even putting them in the asar

austere talon
#

vencord does not have lazy loading

turbid hatch
#

i18n does

#

i18n only loads translations that are actually ever used

austere talon
#

all translations will be used

turbid hatch
#

no

austere talon
#

the vast majority anyway

turbid hatch
#

for those

#

you can put them in the vencord.ts file

#

thats fine

#

for plugins that wish to be translated

#

their translations will be loaded lazily

#

thats what the script is for

#

im not saying we split up all of vencord's translations into separate things because yes

#

most of them will end up being used

#

im saying each plugin gets its own translation file, if they decide to translate

#

(or we translate for them)

austere talon
#

all plugins should be translated otherwise there's no point

turbid hatch
#

then yes

#

they get their own file

#

it keeps it organised and means we arent shoving everything into one translation file

#

otherwise we have to prefix keys with pluginName and that is literally what i18next's namespaces are for

#

vencord will be the default namespace

#

so we can just write translations without prefixing them

#

but plugins will use pluginName:abc or useTranslation in the react stuff

#

and the translation will be loaded on demand

#

this script is just generating a typings file for it

austere talon
#

why do namespaces use multiple files

austere talon
turbid hatch
#

they dont have to, but do you want to load one large file containing every single translation

turbid hatch
turbid hatch
#

why

#

its so wasteful

austere talon
#

loading one large file is faster than loading 100 smaller files

#

and there's no point splitting 100 bytes of strings into separate files

charred monolithBOT
turbid hatch
#

loading one large file is wasteful if you will never see it, and the small files thing only really matters over the network, but we're bundling them into an asar and at this point the optimization from bundling it into a large file is so tiny that the inconvenience in doing so will most likely make it harder to maintain than just having them in separate files

#

i think its crucial to remember all of this is happening locally

#

there is very little overhead in this case, and the optimizations we get are so miniscule that they would basically be considered noise by most people

#

no one will notice the difference in terms of UX, but we will in terms of maintainability

#

and remember this is discord, one of the slowest fucking react apps in existence

#

where the click between opening the settings panel and it actually showing up is really noticable in most cases

#

i do not think we have to worry

austere talon
#

i wasn't trying to say it matters

#

i was just saying it to counter your optimisation point :p

turbid hatch
#

ah

austere talon
#

personally for my website i use one single file per locale and just use nested objects to introduce categories

turbid hatch
#

i was thinking in the context of what we're doing

#

in the case of a web app

#

yes i fully agree

#

at dbots we do it by the language

#

but also we have translation tooling that maintains the files for us

austere talon
#

reeding one larger file is way faster than reading 100 small files

turbid hatch
#

we could, if we really really really wanted to, transpile it and then work out how to combine it into one file

#

but i do not think there's much point :p

turbid hatch
#

that does make sense yeah

charred monolithBOT
turbid hatch
#

FUCK

#

I KEEP

#

DOING THAT SHIT

still wasp
#

is there a function i can call to open the config modal of a plugin?

turbid hatch
#

xyproblem

#

why

#

what're you trying to accomplish

lime stone
#

does VencordToolbox do this

turbid hatch
#

no, it allows you to open quickcss

#

and notifs

lime stone
#

but just see what the ⚙️ button does

still wasp
#

i want to add a quick access button to configure my plugin on the vencordtoolbox

turbid hatch
#

ah

still wasp
turbid hatch
#
toolboxActions: {
    async "Open settings"() {
        openModalLazy(async () => {
            return modalProps => {
                return <PluginModal {...modalProps} plugin={pluginInstance} />;
            };
        });
    }
},
#

would be your goto

still wasp
#

what do i need to import to use openModalLazy?

turbid hatch
#

utils/modal

still wasp
#

anything else i need to import or fill out? im probably being a fuckin dumbass pain

austere talon
#

vscode tells u

#

type the name and it shows in auto complete

#

hit tab to complete and import

still wasp
#

it isnt autocompleting horror

austere talon
#

L

still wasp
#

my skill issue is just too bad for software to function

charred monolithBOT
#

Despite using nothing else but Vesktop source for the entire day, the problem persists. In fact, it has already occurred three times in just the past 15 minutes.

Interestingly, it seems to occur when I’ve been silent for a prolonged period and then suddenly start talking again. This pattern leads me to believe that the issue might be related to transitioning from a state of silence to sudden activity.

I’ve also checked the console log for any useful information, but it doesn’t seem to p...

austere talon
#

ME?

lime stone
#

YOU MEAN HE DIDN'T STEAL MY YOGHURT??

brazen bone
#

You're probably gonna hate me for asking, but is there any way to force download all lazy-loaded webpack chunks?

#

I have a plugin that downloads the webpack as a tarball, but it doesn't get all files (most localization is missing for example), and I suspect lazy loading is to blame

austere talon
#

our ci does that

charred monolithBOT
#

When interacting with the Screenshare feature on Linux, the behavior that allows you to close in on the application does not function properly.

image
This is how vencord-screen-share should function, as seen by qpwgraph

Some situations where an individual requests to screen share a singular application instead makes vencord-screen-share request every application, instead of the desired result ab...

spark pivot
#

the vencord.app page changed

#

they added an example contact form and change some styling

#

and they have only these plugins lol

long stream
#

im soo confused

#

what are they trying to do ??

spark pivot
#

idk

#

it's a wordpress website

#

and the contact form just straight up doesnt work

#

also the backend is php

long stream
spark pivot
#

holy shit there's a /admin route

#

it requires authentication but i just found the username is "vencord"

#

and now the person who owns this website has a password reset email in their inbox

#

oh my god i found a directory listing

still wasp
#

wtf is going on bruh

brazen bone
#

UBO blocks that page, probably for the best

spark pivot
#

yeah we put it on ubo

#

i had to disable it to get it to work properly

#

so this is a LiteSpeed Web Server running a wordpress website

austere talon
spark pivot
#

sorry lol i got carried away

turbid hatch
charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

LazyComponentWebpack(()=>{let e=Wc("AvatarDecorationModalPreview");return B.memo(e)}...)

Bad Starts

None

Discord Errors

None

austere talon
#

joever

still wasp
#

is there a callback for when a new page/tab gets loaded?

austere talon
#

why

#

when asking a question, ALWAYS include what youre trying to do

spark pivot
still wasp
brazen bone
#

Wouldn't it be better to hook into the relevant react components?

shy veldt
#

what is this big virus :(

brazen bone
charred monolithBOT
charred monolithBOT
austere talon
#

if anyone else has the same issue please comment with your info as well

charred monolithBOT
junior olive
#

thankfully its only canary rn

#

we're back

junior olive
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
limber skiff
#

explode

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

@junior olive you shall be happy

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
limber skiff
#

@austere talon btw codeberg sync isnt working

charred monolithBOT
austere talon
charred monolithBOT
spark pivot
austere talon
#

inspect the gif logo

#

go up the tree and look at every components code til u find the right code

spark pivot
#

ok i found the function but i have absolutely no clue how to get this in my plugin

limber skiff
#

what do you want with it

spark pivot
#

i want to render the favorite gif button on normal images

limber skiff
brazen bone
#

Just after that function, there's a ```js
return q.IMAGE_GIF_RE.test(e.filename) && null != n && null != s
? (0, a.jsx)(eE.default, {
width: n, height: s, src: t, url: t,
format: u.GIFType.IMAGE,
className: eN.gifFavoriteButton,
})
: null;

#

That looks relevant I think

limber skiff
#

@spark pivot here you go

limber skiff
#

wait that isnt it

#

😂

#

I thought it said gif

#

but that's gift

brazen bone
#

The one I posted very clearly says IMAGE_GIF_RE though

spark pivot
#

no it's for gifs

#

there's two types of gifs for some reason

brazen bone
#

Oh, so it's gif subtype t, not gift as in present

spark pivot
#

yeah

#

silly discord

#

gifts are just urls that render cool

verbal pumice
#

is like
gifts for gif gifs and gifv for videos that render like gifs (ex from tenor)

spark pivot
#

yeah

brazen bone
#

There's a gifFavoriteButton: eR(t),, where ```js
eR = (e) => () => {
let { proxy_url: t, width: n, height: s } = e;
return q.IMAGE_GIF_RE.test(e.filename) && null != n && null != s
? (0, a.jsx)(eE.default, {
width: n,
height: s,
src: t,
url: t,
format: u.GIFType.IMAGE,
className: eN.gifFavoriteButton,
})
: null;
};

#

eE.default is the component for the actual button, with click listeners and all

austere talon
#

just override the IMAGE_GIF_RE

#

regex patch IMAGE_GIF_RE to match anything

#

done

brazen bone
#

Why the double lambda in (e) => () => { tho

austere talon
#

cause then all images will have the gif badge

#

which u dont want

#

ull figure it out tho

spark pivot
#

yeah i'll just patch the gif badge to not render on not gifs

#

or smth

spark pivot
#

ok i did it but it only shows the gif badge and not the favorite button

#

ok this is really buggy actually

#

on some images it will show it and then when you hover over it it will disappear

still wasp
#

i made a plugin inspired by the 🗿 plugin, essentially you can list any amount of triggers and sounds to play (seperated by a comma)

charred monolithBOT
charred monolithBOT
still wasp
charred monolithBOT
verbal pumice
#

doesn't this already ex- oh

verbal pumice
spark pivot
verbal pumice
#

using class= and then keeping the class hash is the best part

spark pivot
#

i didnt even notice that

#

omg

junior olive
jagged cloak
#

lmao

#

why even use it like that then

jagged cloak
#

lol

charred monolithBOT
spark pivot
brazen bone
#

What did you patch instead?

spark pivot
#

when you open an image in the big view

#

the star appeared there instead of on the image

#

anyway this is how im doing it now

const GifAccessory = findComponentByCodeLazy("GIF_TOOLTIP_REMOVE_FROM_FAVORITES");
#

i found the actual component

spark pivot
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
charred monolithBOT
charred monolithBOT
still wasp
spark pivot
#

ive been wanting to make this for forever but i struggled getting the patches right

#

then i spent all of today rewriting how the favorite gifs menu is rendered and how the favorite button is rendered

still wasp
#

dude ive been wanting a plugin like this since i moved from bd ages ago

#

youre my hero bruh

spark pivot
#

now we wait for it to get merged blehhhjolly

#

(around 3-4 buisiness years)

still wasp
#

ruh roh

#

funn

#

wtf this plugin is so fucking broken idk how i didnt notice

charred monolithBOT
still wasp
#

@spark pivot i tested the plugin and it works great, it would be cool if you could replace the gif text with "media" or something, and the gif button icon with a photo

spark pivot
#

good idea

still wasp
#

you should be able to do it with just css injection actually

spark pivot
austere talon
#

looks off centre

spark pivot
#

cause it is

#

i think that's better

still wasp
#

that looks awesome

spark pivot
#

i actually changed "Search Favorite Gifs" from the FavoriteSearch plugin when my plugin is active

grave mangoBOT
austere talon
#

don't import from that file

spark pivot
#

oh i just figured out multiple images doesn't work without nomosaic