#πŸͺ…-progaming

1 messages Β· Page 15 of 1

fathom haven
#

I have idea for tag a everyone

dusty moth
#

/run hs main = putStrLn ('@': "everyone")

rugged berryBOT
#

Here is your hs(9.0.1) output @dusty moth

@​everyone
fleet cedar
#

Does jsx spec mandate (is there a jsx spec) that body is equal to children= key or is that just react's implementation?

cerulean plover
#

we have had 1 casualty in aisle 3

#

do not make another

dusty moth
#

i need atSomeone for bunny

cerulean plover
lone gust
#

hi

#

im back

cerulean plover
#

trol

lone gust
dusty moth
lone gust
#

aslo audit log should allow filtering by target 😭

#

its so silly that ucant

cerulean plover
dusty moth
#

/run hs main = putStrLn$'@': "everyone"

rugged berryBOT
#

Here is your hs(9.0.1) output @dusty moth

@​everyone
lone gust
#

whats the key

cerulean plover
lone gust
#

"target"?

#

kk

dusty moth
lone gust
#

no

#

i dont want it

cerulean plover
#

its undocumented but used in the client

lone gust
#

u should make a plugin for it

#

WAIT A SEC

#

THAT QUERY FIXES MY DISCORD BOTS SHIT CODE

cerulean plover
lone gust
#

i have a discord mod bot that just logs punishments instead of having cmds and dms ppl when theyre punished

#

wait a sec

#

i have a good idea @cerulean plover

#

i can turn that api response into a screenshot via httptoolkit

cerulean plover
#

hmm?

lone gust
#

forcefully editing the request

cerulean plover
#

wut

lone gust
#

so i can show the response as if i were using it in the clinet

#

lemme show u

cerulean plover
#

oh?

lone gust
#

brb

cerulean plover
#

wouldnt it be easier to use vencord itself trolley

lone gust
lone gust
cerulean plover
#

no

lone gust
#

yeah we could make one

#

would be cool

lone gust
cerulean plover
#

what i'm saying is just make a quick and dirty temporary plugin to patch where the api call is made

lone gust
#

yeah fair

#

i just dont know how to make patches very well (at all)

#
  • this was faster
cerulean plover
#

its only faster because you already have it setup

lone gust
#

fair

cunning moon
#

I actually got a few things working right now in my userplugin
but..
anyone has an idea how to get the client to join a voice channel?
I tried this:

const ChannelActions: {
    disconnect: () => void;
    selectVoiceChannel: (channelId: string) => void;
} = findByPropsLazy("disconnect", "selectVoiceChannel");
[...]
ChannelActions.selectVoiceChannel(channelID);

but that doesn't seem to work at all. according to dev tools it tries to retrieve messages and gets an 404, no matter the channel used here

also, is there some kind of documentation on FluxDispatcher events?

cerulean plover
#

there's ts typings for most flux event types

lone gust
#

wdym

cerulean plover
#

huge fluxEvents.d.ts file blobcatcozy

lone gust
#

LOL

#

thats like how vencord fetches all badges on startup

cerulean plover
#

also FluxDispatcher.addInterceptor(console.warn) VERY useful to me blobcatcozy

lone gust
#

W

cerulean plover
lone gust
#

wait

#

why warn

cerulean plover
#

i did this thing called enable gateway logging

lone gust
#

WAIT

#

HOW DO I GET RID OF IT

#

MY CONSOLE

cerulean plover
#

FluxDispatcher._interceptors.pop()

lone gust
#

omg 😭

#

ty

cunning moon
#

that sure is helpful for the events
found out that way that discord actually calls AUDIO_TOGGLE_SELF_MUTE instead of AUDIO_SET_SELF_MUTE

wanted to see how to specifically set it tho
but toggling is nice as well for now

deep mulch
#

@cerulean plover I have so many clones of you

cunning moon
#

ok discord is behaving weird if I set the user volume like this:

FluxDispatcher.dispatch({
   type: "AUDIO_SET_LOCAL_VOLUME",
   volume,
   userId: userid
});

i mean, it does set volume, but, eh, not to the value I give discord

nimble bone
final night
deep mulch
final night
deep mulch
#

yop

royal nymph
#

πŸͺ…

#

I love this emoji

#

oh wrong channel

dusty moth
brave burrow
cunning moon
#

thanks, that worked

formal belfry
#

@royal nymph seen dm

stoic helm
# dusty moth

youd just have to inject the web script and css wherever vencord normally injects it

#

i did it a while ago

dusty moth
stoic helm
#

idk if it still works tho, made it last year

#

id reccomend remaking it yourself

surreal condor
ruby halo
#

has anyone looked into how the signature for unverified_content inside a content inventory entry is generated? i wanted to look into screwing around with sending custom versions of these special embeds generated from the new activity view (see attached screenshot), but all entries have a signed key attached which the server checks against the other data in the request.

serene elk
#

how do you even send a message like that?

deep mulch
#

idk

#

@frosty obsidian would compose work on touch screen desktop

frosty obsidian
#

probably

#

just not real touch

deep mulch
#

I'll enable pull to refresh if there's a touch screen

#

somehow

frosty obsidian
#

just always enable

#

its very unlikely someone will do the gesture via mouse

deep mulch
#

and it just stays there

frosty obsidian
#

oh hm

#

nvm then

deep mulch
balmy lintel
ruby halo
#

got access yesterday

#

i was making an attempt to reverse how the signature was made on client but it was my first time working with deobufscated electron code, so you can probably assume it did not go well sadJoegbh

mild yoke
#

I love when a "production ready" framework uses a load of deprecated libraries that explicitly tell you not to use them

#

react native is just lovely

ruby halo
#

hm, wonder how it fetches the signature then

#

cause it sends it in the request body for sending the message so it has to get it from somewhere

elder scaffold
mild yoke
#

that's awful lmfao

royal nymph
#

not really

#

Android also has a shit ton of deprecated stuff that's still widely used

#

cause its still useful and good

elder scaffold
#

the only thing id be somewhat concerned about is inflight which apparently has a memory leak

mild yoke
elder scaffold
mild yoke
mild yoke
#

It sounds pretty reasonable to warn for that

elder scaffold
elder scaffold
mild yoke
heavy quest
#

w h a t

royal nymph
elder scaffold
#

yeah most of those were babel plugins

royal nymph
#

oh no my build tool has a vulnerability where maliciously crafted input can crash it

elder scaffold
#

someone might steal the source code and crash a build!!

mild yoke
#

you paste code, your parser picks it up, and they pull an RCE on you?

elder scaffold
#

what if it doesnt

royal nymph
#

don't paste malware code

dusty moth
royal nymph
#

what if someone sends you a virus and you double click it and they pull a RCE on you?

mild yoke
#

Hypothetical, of course, but not out of the realm of possibility due to your train of logic.

royal nymph
#

no im saying that depreciations and most vulnerabilities are irrelevant to build tools

#

you should look into some of the build tools you use and see how many depreciations they have suppressed

#

or look into android code and see there

mild yoke
# dusty moth you use qubes

So your solution to javascript libraries depending on packages with known issues is to launch an entirely different OS exclusively for development?

elder scaffold
#

guys what if you install a babel plugin which replaces console.logs with malware

royal nymph
#

or look into any popular apps and see how much deprecated stuff they use

royal nymph
#

still using some deprecated things is very normal and done by the majority of platforms

#

you're just looking for reasons to shit on random js libs

royal nymph
#

even vencord uses some deprecated things...... so spooky

mild yoke
dusty moth
#

memory leaks in short-term programmes are fine

#

programs*

mild yoke
#

...

#

js developers are a different breed lol

dusty moth
#

if a program is going to run for only 5 seconds then it doesn't really matter if it leaks

dusty moth
royal nymph
#

anyway you do realise these are dependencies of dependencies of dependencies right?

mild yoke
royal nymph
#

it's impossible to avoid some depreciations

elder scaffold
mild yoke
royal nymph
#

you should try installing vencord dependencies and see how many deprecation warnings there are

elder scaffold
#

vchars I

elder yarrowBOT
dusty moth
elder yarrowBOT
# dusty moth vch

​​ n ​ LATIN SMALL LETTER N
​ o ​ LATIN SMALL LETTER O
​ ​ SPACE
​ I ​ LATIN CAPITAL LETTER I
​ ​ SPACE
​ ` ​ GRAVE ACCENT
​ B ​ LATIN CAPITAL LETTER B
​ o ​ LATIN SMALL LETTER O
​ x ​ LATIN SMALL LETTER X
​ : ​ COLON
​ : ​ COLON
​ l ​ LATIN SMALL LETTER L
​ e ​ LATIN SMALL LETTER E
​ a ​ LATIN SMALL LETTER A
​ k ​ LATIN SMALL LETTER K
​ ` ​ GRAVE ACCENT

royal nymph
#

library used for over a decade with no issues ever
maintainer moves on and deprecates it
STOP USING THIS LIBRARY THINK ABOUT SECURITY

elder yarrowBOT
mild yoke
royal nymph
#

0 days can be found in any software, not just deprecated things.

mild yoke
pearl stagBOT
royal nymph
elder scaffold
#

I feel like very used deprecated stuff went through more audits than something released a week ago

royal nymph
#

^

#

switching from something that has been maintained for many years and audited extensively to a brand new library written by some random person no one has ever heard of just to dodge a deprecation is definitely good for security

mild yoke
royal nymph
#

none of the ones you complained about have any security relevant issues

#

In fact half of the deprecated stuff in ur screenshot is just "this is now inbuilt, please switch to the new one"

#

maybe they need backwards compat

#

🧨

mild yoke
royal nymph
elder scaffold
#

i think removing that one dependency will fix all discord rn issues

royal nymph
#

^

mild yoke
#

Author: Do NOT use this library!
JS Developer: Awww no but I don't want to migrate 😒😒😒

frosty obsidian
#

if there aren't any actual issues then what's the problem

#

the software works fine

mild yoke
#

so do not use it

elder scaffold
#

so scary

frosty obsidian
#

it still works

#

any dev can put a deprecation warning on anything

mild yoke
# frosty obsidian it still works

if the author if a library explicitly tells you to not use what they made, you don't use it. just because it "works" doesn't mean there isn't a serious security / performance / stability issue on the table here.

frosty obsidian
#

vencord runs fine

dusty moth
royal nymph
#

who's a good boy

mild yoke
#

what the fuck?

royal nymph
#

😺

frosty obsidian
#

vencord works and is secure

royal nymph
frosty obsidian
#

you're right vencord doesn't work

#

not available on ios :(

royal nymph
#

samie made it available actually

#

as Safari extension xd

#

you will install

mild yoke
#

A developer said not to use his library due to multiple reasons. You should not use that library. I'll chalk this up to a difference of opinion but that doesn't seem like an unreasonable train of thought to me.

mild yoke
frosty obsidian
#

if we find vulnerability or any performance issues arise we can talk about removing it

#

until then its not causing any issues

mild yoke
frosty obsidian
#

i don't have a mac

mild yoke
mild yoke
frosty obsidian
#

technically yes it can

royal nymph
#

people tell you all the time not to use their software. often times whatever their reasoning is is completely negligible

frosty obsidian
#

would be a lot of work

royal nymph
#

"they said stop using it so stop using it" is a weird take

#

if a library works without problems for your use case why switch

mild yoke
mild yoke
#

how does it work? Akin to RN with native components?

frosty obsidian
#

platform specific functionality

#

theres more than just ui

mild yoke
#

example?

royal nymph
frosty obsidian
#

not to mention ios is native and android is jvm

#

its not at all impossible but would require a lot of work

mild yoke
frosty obsidian
#

probably can

mild yoke
#

I gotcha

frosty obsidian
#

but my point isn't that its impossible

mild yoke
#

jetpack does seem promising

#

well more than that, isn't it common for android nowadays?

frosty obsidian
#

it is

#

lots of android apps have moved or are moving to compose

#

big apps too

mild yoke
#

shoulda been flutter 😒

frosty obsidian
#

play store is compose

mild yoke
#

oh I didn't know that

frosty obsidian
#

settings app is moving to compose

mild yoke
#

that's pretty cool

frosty obsidian
#

reddit, twitter, github

#

they all use compose in parts of their app

ornate quiver
mild yoke
#

I swear I can't critize any part of javascript without instantly getting 5 people trying to argue with me

#

If it's okay to use, it shouldn't be deprecated. If the developer says you shouldn't use it, you shouldn't use it. If you want to use it, fantastic, I won't stop you.

#

I don't want to argue. I pointed out a problem, of which has been somewhat well documented in node's history. It's actually insane how much JS developers will just argue about trying to defend why their language is actually so good. I don't care. I pointed out a problem, you want to deny that problem.

Seriously, do you not have anything better to do? It's a problem with JS. I don't want to argue. My initial message was pointing out how I didn't like those messages in a "production ready" library. Is that all JS developers do? Just argue about how their language is actually good? Please find something better to do, all I want to do is point out a problem.

ornate quiver
#

no i hate javascript and npm

#

my main point of contention is that "library developers know best" when you have some that privatize every single useful api and have the language then enforce it (not related to js but w/e)

lavish frigate
#

you should all use my libraries ill promise to only steal your token once

royal nymph
#

could ask u the same

#

do you not have anything better to do than whine about Javascript in a random server you don't even actively talk in

#

no one is claiming js is better than other languages, you're the one going around calling languages shit and shilling flutter

royal nymph
ornate quiver
#

yop

hushed pebble
deep mulch
#

i use is-even

#

and is-odd

hushed pebble
#

not like most security fixes are relevant to whatever I'm doing

deep mulch
#

i like being on newest version

hushed pebble
#

Also if it's a library and you're using npm...it could mayhaps affect downstream users if another dependency uses the bugged library

hushed pebble
mild yoke
# royal nymph no one is claiming js is better than other languages, you're the one going aroun...

I didn't say that. All I did was voice concerns that I didn't like something about a JavaScript library. I'm sorry you can't handle that. If someone criticizes flutter, I often agree as there are problems with it. If someone praises JavaScript, I don't have a problem with that, I've used JavaScript for a few years and it does a lot of cool stuff.

I've worked with people like you on programming projects and it's very obnoxious. Just learn how to take criticism, and grow up. For the sake of the rest of us.

mild yoke
hushed pebble
#

Yeah I'm pointing out that it's not very useful to call out the bad parts of JS because people aren't actively interested in using them

mild yoke
deep mulch
#

i havent wrote a js project of my own in so long

hushed pebble
mild yoke
#

I have the right to point out problems when I see them. It doesn't invalidate the ecosystem. It's exactly what it is- a problem. Not an unsolvable problem. Not a fundamental, unfixable issue, but a problem. People like august can't accept criticism to their ecosystem of choice. Any attack on the language is perceived as an attack on themselves, when in reality I just want to critic a single aspect of something.

hushed pebble
#

besides, most of those are transitive dependencies, I bet

mild yoke
#

I see this a lot when people only know a single language. It's not just JS developers, although it is more common in beginner languages like such. But it's often much more difficult to critic a language like JS because those who know it exclusively see it as a personal attack rather than an education critic of such.

mild yoke
hushed pebble
mild yoke
#

I mean like I'll critic JS where it's bad, and praise it where it's good

hushed pebble
mild yoke
#

it's just that the former is too much for people like august to handle

hushed pebble
mild yoke
hushed pebble
mild yoke
#

yeah I'm aware of it but what's the question?

hushed pebble
#

I'm just pointing out that RN might be using a dependency that includes a dependency that happens to use a deprecated package

mild yoke
#

oh yeah I'm aware, I'd say it's likely but I haven't looked into the specifics of how this error is being caused

#

my concern was largely that, if it's not an issue, don't tell me there's some critical issue, if it is an issue, we should actually be resolving it

#

Regardless of how the dependency is being depended upon, it's still getting to my machine and running

#

this discussion was never intended to be insanely long, I just wanted to send a message with a concern I had with an error

trail night
#

i mean the simple answer to your concern is that it happens in a lot of languages, not just the javascript ecosystem, and most of the time the issues are unsolvable

#

you cant just upgrade the dependency or move away from it because most of the time it's not you who is adding it directly, it is something you are using, or a dep of a dep of a ... repeat forever

#

tons of frameworks have deprecation warnings pop up because a lot of people deprecate libraries as a "i'm not maintaining this anymore, here's a viable alternative, you should check that out instead" but there are also tons of unmaintained libraries still widely used that aren't deprecated

#

but in the end the person who has to deal with it is not you, most of the time, it is your upstream authors of the library you are using

#

and, a lot of the time, it is not viable to upgrade the dependencies of that library because of breaking changes

#

transitioning from one library to another is not just a drop in replacement, im sure you know that

#

and sometimes the library that is recommended with a deprecation notice doesnt fill the role of the original, or has a completely different API surface that requires different inputs to get the same outcome, and the development effort of working it out is too high

#

so you just stick with ol' reliable until it actually becomes a problem

#

and it goes on forever

runic sundial
trail night
#

privates are fine for API surfaces that are subject to heavy change and stuff that genuinely should never be used, but then you have people that make tons of stuff private and then dont expose a way of doing the thing in the library publicly when you could really do with it

#

so then you have to use reflection and whatnot to access it

#

i've had to do that a lot

#

especially in java libraries

hushed pebble
#

but what if they completely drop it in the next minor or patch version lol

trail night
#

then i rewrite the code, either reimplementing the feature in my own codebase or using whatever they've provided this time around

hushed pebble
trail night
#

because in the end it is my fault for using library internals

hushed pebble
#

right

trail night
#

(.NET reflection is ace as well)

hushed pebble
#

i forgor .net exists

runic sundial
trail night
#

react suffered from the "making stuff private and then not exposing any proper way of doing the thing" issue

#

they seem to have improved that

trail night
#

now they have a semi-private api for some of the stuff that used to be in there, where it's clear that you should ideally not be using it but they still let you use it

hushed pebble
trail night
#

yeah

hushed pebble
#

What sort of wacky stuff was in there?

trail night
#

ReactCurrentOwner springs to mind

hushed pebble
#

wat dat do

lone gust
#

what we talkin abt

trail night
#

it was a property that was set to the current component that was being constructed at the time

trail night
#

ignore that message

#

i misremembered, just looked it up

lone gust
#

lol

trail night
#

anyway

lone gust
#

happens

trail night
#

but yeah you can use it to write really weird and interesting hooks

lone gust
#

use what

#

to write weird and interesting hooks

trail night
#

__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

lone gust
#

LMFAO

#

W NAME

hushed pebble
#

yes it is peak hilarity

trail night
#

why did you render uses the internals to

#

well

#

explain why a component rendered lol

#

because there is literally no other way, react doesnt expose this information on purpose

lone gust
#

found em

#

what if i use it

trail night
#

yep

lone gust
#

will i be fired

trail night
#

you will be fired

hushed pebble
lone gust
#

oh fuck

hushed pebble
#

πŸ”₯

lone gust
#

better not use those

trail night
#

this is a debug-time library

#

react still doesnt expose this information blobcatcozy

hushed pebble
#

just as it should be, for stuff shipped to the user

trail night
#

WDYR is really useful

frosty obsidian
#

something you can just suppress if you know what you're doing

#

you may still end up needing reflection though since idea/as will pressure you into privating lots of time

trail night
#

yeah

hushed pebble
#

as?

frosty obsidian
#

android studio

hushed pebble
#

Oh

#

Does Kotlin play well with VS Code?

frosty obsidian
#

uhh not really

autumn sigil
frosty obsidian
#

there is no official lsp

frosty obsidian
hushed pebble
frosty obsidian
#

theres a community one

#

but i haven't heard anything good about it

hushed pebble
#

probably because Jetbrains only cares about its own IDE lol

frosty obsidian
#

yeah

#

that's exactly it

#

they want you to use the official kotlin plugin bundled with idea and android studio

#

idea is a pretty good program but its still a bit of an asshole move

frosty obsidian
#

all language support in jb ides are like that

autumn sigil
deep mulch
#

@frosty obsidian we will make better LSP

frosty obsidian
#

the graphql plugin(s) i use also use it

pearl stagBOT
# frosty obsidian <@289556910426816513> https://github.com/MateriiApps/Gloom/blob/main/api%2Fbuil...

api/build.gradle.kts: Lines 46-55

introspection {
    endpointUrl = "https://api.github.com/graphql"
    headers = mapOf(
        // GLOOM_INTROSPECTION_TOKEN Should be set to the authorization token obtained after
        // logging in to the mobile client, it should start with "gho_"
        "Authorization" to "Bearer ${System.getenv("GLOOM_INTROSPECTION_TOKEN")}",
        "User-Agent" to "Apollo GQL Introspection"
    )
    schemaFile = file("src/commonMain/graphql/com/materiiapps/gloom/gql/schemas/github.schema.graphqls")
}
deep mulch
#

what's that

frosty obsidian
#

its used to generate the schema file

deep mulch
#

funny

#

I wish YouTube API was that simple

frosty obsidian
#

i think the non public stuff is exposed bc of enterprise

#

bc companies can host it themselves

deep mulch
#

@frosty obsidian find where innertube gets its data

#

maybe theres another api

frosty obsidian
#

is it not just the api

deep mulch
#

its server side rendering

frosty obsidian
#

it probably gets the data from the server then

deep mulch
#

their data api is so limited

#

@frosty obsidian i might use jsonpath in the serializer idk

#

might be really slow with the huge json bodies

#

dumb youtube changes the api structure too much

#

even if you set the version

deep mulch
#

@frosty obsidian kotlinx serialization errors are so awful

#

kotlinx.serialization.MissingFieldException: Field 'sources' is required for type with serial name 'dev.zt64.hyperion.api.network.dto.ApiImage', but it was missing at path: $.header

#

got no idea why

frosty obsidian
#

you don't provide a default value for sources

deep mulch
#

its there

frosty obsidian
#

show

deep mulch
frosty obsidian
#

no not there

#

your model

deep mulch
#

it shouldnt error

#
@Serializable
internal data class ApiImage(
    @JsonNames("thumbnails")
    val sources: List<ApiImageSource>
)
frosty obsidian
#

those look like different shapes

#

where is it getting .header from

deep mulch
#

i wish youtube api could just be normal

frosty obsidian
#

im confused at what's going on

#

insane json

deep mulch
#

yes

#

kotlinx serialization is not designed for this awful kind of api

#

i hate youtube so much

frosty obsidian
#

I've just been doing a million refractors for gloom

deep mulch
#

how

#

ugh

#

http toolkit with its stupid pay walled dark mode

#

nothing else as easy as it

#

thiis is why i lost interest before cause the api is so god damn annoying to deal with

deep mulch
#

$14/mo

viscid grove
#

but dark mode isn't free??

#

that is so fucked up

frosty obsidian
#

@deep mulch i love updating compose multiplatform and all the backgrounds disappearing

frosty obsidian
#

slight chance it may be due to using now deprecated constructor

deep mulch
#

this is so disappointing how limited youtubes own public api is

#

like if youre gonna make a public api at least put the effort in to make it complete

#

hatred

frosty obsidian
#

guh

deep mulch
#

@frosty obsidian

#

what do i do

frosty obsidian
#

idk

deep mulch
#

guh

frosty obsidian
#

gotta make this ugly thing work

deep mulch
frosty obsidian
#

avatar shape customization

deep mulch
#

neat

deep mulch
#

i cant figure out how to make a json factory that uses ktx serialization

#

fusdhgfgsdvbhfbwhje

#

fucking fuck

#

cant do anything right

#

UGH

#

WHY IS THIS SO HARD

autumn sigil
#

dont java or whatever

#

all you know is class infrastructure

#

but you suck at actually programming

fallow jasper
void leaf
#

(idk what channel to ask this in)

fleet cedar
#

What's the difference between options 4 and 7 and 9

void leaf
#

idk these options confuse me…

cerulean plover
void leaf
cerulean plover
#

i mean it isnt an only changes the name thing

#

mostly just helps mods blobcatcozy

lavish frigate
cerulean plover
#

do go with the generic talk to mods option though

void leaf
#

okai… I’m murdering both of you if I get punished though blobcatcozy

cerulean plover
#

The role for all the snippet channels is the same

void leaf
cerulean plover
lone gust
#

can anyone here jsx :3
i need a like popup with an input box, a done button, and a cancel button (basically just window.prompt) but uh idk how to do ts 😭

lone gust
#

its disabled

#

(it does nothing besides show an error that it wont ever be supported in console)

ionic lake
#

I didn't quite get that

fleet cedar
#

Works on my machine

ionic lake
#

if you need an actual dialog there's the <dialog> element

lone gust
lone gust
fleet cedar
lone gust
#

wdym

lone gust
#

i meant in jsx

#

nvm ill look for one

ionic lake
#

it doesn't really matter

lone gust
#

?

ionic lake
#

what are you doing? react?

lone gust
#

yeah

ionic lake
#

yeah you can do this in react, just handle state for it in idiomatic react fashion

lone gust
#

wtf does that even mean bro 😭

#

idiomatic react fashion

ionic lake
#

javascript:

const dialog: HTMLDialogElement | null = document.querySelector('#dialog');

const showDialogButton: HTMLButtonElement | null = document.querySelector('#show');
if (showDialogButton && dialog) {
    showDialogButton.addEventListener('click', () => {
        dialog.showModal();
    });
}

const closeDialogButton: HTMLButtonElement | null = document.querySelector('#close');
if (closeDialogButton && dialog) {
    closeDialogButton.addEventListener('click', () => {
        dialog.close();
    });
}

and html:

<button id="show">Show Dialog</button>

<dialog icon="dialog">
    <p>super epix dialog</p>
    <button id="close">Close</button>
</dialog>

react:

const MyDialog: React.FC = () => {
    const dialogRef = useRef<HTMLDialogElement>(null);

    const showDialog = () => {
        dialogRef.current?.showModal();
    };

    const closeDialog = () => {
        dialogRef.current?.close();
    };

    return (
        <>
            <button onClick={showDialog}>Show Dialog</button>

            <dialog ref={dialogRef}>
                <p>This is a dialog box.</p>
                <button onClick={closeDialog}>Close</button>
            </dialog>
        </>
    );
};
lavish frigate
ionic lake
#

react handles state for you so you don't do this event listener jank

#

yeah I suggest learning react

lavish frigate
lone gust
#

should i try hating react too

ionic lake
#

nothing to hate about css and html

lavish frigate
ionic lake
#

are you a student or something

#

we've been there

fleet cedar
#

React is legit really good

lone gust
fleet cedar
#

Especially compared to raw dom manipulation

#

Don't know how it compares to other frameworks though

lavish frigate
#

I prefer quite literally anything else

ionic lake
#

king

lavish frigate
#

I love vue

#

Vuecord when

lone gust
#

xd

ionic lake
fleet cedar
#

Mdn is also invaluable

lone gust
#

i just hate them besides js

ionic lake
#

there's nothing to hate about html lmao

#

maybe css sure I can agree on that

lavish frigate
#

css isnt that bad either once you get into it

#

hating on html and css just sounds like not knowing it enough to me

lone gust
#

no

#

its just that

#

i hate to spend time making minor changes to css

#

just for it to look a tiny bit better

lavish frigate
ionic lake
#

I mean, you're going to spend time using css to make your site pretty

#

lack of experience isn't a excuse to hate it

lone gust
ionic lake
#

not yet

lone gust
#

well dont

#

it looks like shit

ionic lake
#

oh yeah lmao it's slightly fucked

lavish frigate
#

sorry but i dislike sites that take over your scroll

lone gust
#

ur loss

#

guess u cant use dc im p sure

lavish frigate
#

discord doesnt take over your scroll

lone gust
#

then how does it use a custom scroll bar

#

cuz to disable the existing one youd need to do overflow-y: none

lavish frigate
#

everything is freely scrollable, unlike your site where every time you scroll it scrolls to a certain distance

lone gust
#

oh

#

thats what u mean

lavish frigate
lone gust
#

fr?

#

i didnt know this!

lavish frigate
#

yes

#

here is how discord does it

ionic lake
#

scrollbar hijacking is bad

lavish frigate
# ionic lake scrollbar hijacking is bad

Not only does it feel awful it also puts you into the same boat as stupid companies which think they need to make the most complicated site ever to grab your attention like a TikTok video

frosty obsidian
fallow jasper
#

yipee

#

hows progress? are you working on explore/search first or issues first?

#

or something different?

frosty obsidian
#

so far just refactors

#

reorganizing the codebase

#

once thats done I'd like to redo the profile screen

fallow jasper
#

i get the refactors but why focus on the profile screen afterwards

mild yoke
#

sometimes your code shouldn't work

#

html is great in getting pretty much everything to run

#

but I'd prefer my app not try to render something that is completely broken

#

of course there are definitely situations where that's useful

lavish frigate
frosty obsidian
deep mulch
#

@frosty obsidian bugs inside you

fallow jasper
#

@deep mulch duke inside you

deep mulch
#

how

fallow jasper
#

java runs on everything

deep mulch
#

@frosty obsidian you use catppuccin in intellij right

#

do popups ever appear like half transparent for you

#

ill see if i can screenshot

frosty obsidian
#

not that they aren't important

#

but they just don't occupy my mind as much

fallow jasper
#

wong you are silly

frosty obsidian
#

yeah

deep mulch
#

ok i couldnt get screenshot in time

fallow jasper
#

@deep mulch you

deep mulch
#

yop

wide crow
#

hello i am new to regex but i wanted to make a very nice text replace rule for yxtwitter but also include the original

#

so what i currently have to work with is

#

and replaced with

#

it works but i'm wondering if there's a way to have the replaced outcome paste the second link a line below the first one

jade stone
wide crow
#

it does work just wondering if the formatting could be modified

#

cuz currently if i were to use it this would be the outcome

#

and its kinda link spaghetti and i wanted to make it at least look half nice with one link being a line below the other

lavish frigate
#

regexr on top

jade stone
lavish frigate
#

php 😭

jade stone
#

they're just most commonly used in PHP

wide crow
#

apparently (?m) allows regex to detect multiple lines but i'm not sure if there's a way to output multiple lines

#

is this just a discord moment

lavish frigate
#

js does not support (?m)

jade stone
wide crow
#

not sure wym (my entire experience with this is about 10 mins of fiddling around)

formal belfry
#

.

lavish frigate
#

regex has different versions

#

because different languages/libraries implement it differently

#

discord uses javascript

#

so make sure to select javascript (ecmascript) here

formal belfry
#

Vecord doesn't want to work at all on my discord

lavish frigate
elder yarrowBOT
wide crow
#

I see, so ?m wouldn't work

lavish frigate
#

nope

wide crow
#

since it's not ecma

#

darn

#

welp I guess what I got rn does enough

#

might fiddle around and see if there was any way to output it in multiple lines still though

lavish frigate
#

(?m) is just a modifier change, you can also just do this:

#

the character between the tests is a new line, not a space

wide crow
#

dang doesnt look like using that can make the output 2 lines but ty

lavish frigate
#

yeah nvm, the input doesnt support new lines, those were 2 spaces 😭

wide crow
#

LOL

frosty obsidian
#

\r\n

autumn sigil
#

fuck \r

deep mulch
#

im not even gonna ask

#

my faith in humanity lowers every day

lavish frigate
fleet cedar
#

\r can and will go burn in die

lavish frigate
valid jetty
#

carriage return isn't a windows only thing

#

it's quite useful for cli's because what it does is go to the start of the current line

fleet cedar
#

Carriage return is useful for certain things

#

Crlf is not

valid jetty
#

yeah the fact that windows requires a carriage return to do a newline correctly sucks

#

but don't blame \r blame windows

wide crow
#

very cool

frosty obsidian
#

its probably still the default but windows handles both line endings

ornate quiver
#

apps still save as crlf but pretty much everything understands both like endings

frosty obsidian
#

its really only programs that need to work on much older windows versions that have to worry about it

ashen badge
#

Hello

deep mulch
frosty obsidian
#

@deep mulch im adding compact number formatting

frosty obsidian
#

needs different code depending on the platform and api version

deep mulch
#

is compact nuimber formatting different for other localizations

frosty obsidian
#

yes

deep mulch
#

a

#

@frosty obsidian minky made my ide freeze

frosty obsidian
deep mulch
#

beautiful

frosty obsidian
#

@deep mulch you love android compatibility

deep mulch
#

guh?

#

waht other platforms is it for

frosty obsidian
#

jvm

#

android doesn't support the java equivalent

#

probably only available in newer java version

deep mulch
#

guhh

autumn sigil
#

where was the cpp guy

mild yoke
#

The wasted space is wild

frosty obsidian
#

the wasted space in question being the window that tells me what errors and warnings there are

#

?

#

legitimate question btw

viscid grove
#

is this for problems?

lone gust
viscid grove
#

?

#

what's that line for

lone gust
#

theres no line there

#

thats for problems

#

you can tell by the fact its labeled "problems"

viscid grove
lone gust
#

k

viscid grove
#

it isn't for problems actually

#

at least i dont think

lone gust
#

srs?

#

how could u tell

viscid grove
#

what's it for then if you're going to be like this

lone gust
#

its not for anything

#

otherwise there would be something there

frosty obsidian
#

thats just extra horizontal space???

#

code goes there

viscid grove
#

oh

#

what's the line though

frosty obsidian
#

idk

viscid grove
#

oh wait

#

might be related to the longest line?

#

wait no

frosty obsidian
#

that could just be where the preview would be if i had it shown

#

yeah any right side windows take up everything to that line

viscid grove
#

Do you have a big monitor?

frosty obsidian
#

depends on how you define big

viscid grove
#

this is intellij but the space on the right seperated by the line isn't very big

#

(but this is also a fairly small laptop

#

oh maybe that line is the max width a line should be

frosty obsidian
viscid grove
#

that's much bigger than my big laptop screen so that's big

viscid grove
frosty obsidian
#

its a visual preview of certain kinds of files

#

like vector images or layout xmls

viscid grove
#

oh that

wraith rose
#

so we have the emojis download script but I don't know how to modify it to work with stickers

I am not really sure what bit I need for this

jade stone
wraith rose
#

It seems stickerstore is stored elsewhere

#

which is a huge problem

#

cause I don't know where it's stored in vencord

jade stone
#

enable console shortcuts

#

and Stores.StickerStore

wraith rose
wraith rose
#

also the method that it relied on was:
Vencord.Webpack.Common.EmojiStore.getGuilds()

#

which doesn't have stickers

jade stone
#

ill look at the code in a bit

#

busy rn

wraith rose
#

It would also be cool to somehow extract the unicode that discord uses into json too

#

i noticed something UnicodeEmoji()

#

it would be nice to see how the client sees the outputted json

wicked stump
royal nymph
#

I turned it off cause it's ugly blobcatcozy

dusty moth
fleet cedar
#

It is! You aren't allowed to make lines shorter than 80 chars

jade stone
#

Pad your lines with zwsp's to get to 80 chars

hushed pebble
#

wait are zwsps rendered like regular spaces in text editors

jade stone
#

depends on your editor

#

neovim shows them as <200b>

hushed pebble
#

buh

jade stone
#

some show them as a normal space but with some kind of error around them

hushed pebble
#

oh yeah

#

VS Code does that, doesn't it

jade stone
#

idk, i use neovim in vsocde, so its weird

lavish frigate
#

Jetbrains IDEs also type out the character name (like ZWSP not sure exactly)

#

i was right

light tree
elder yarrowBOT
royal nymph
#

look at other plugins

low pendant
#

The current doc is pretty limited.

royal nymph
#

if you need docs for such basic things then you're in the wrong place

#

since you'll also have to reverse engineer discord's code

low pendant
royal nymph
#

once again look at the code

solar sand
#

is there an easy way to convert a tampermonkey userscript to a vencord plugin?

#

nvm it wouldnt work

#

so I had this idea to block specific user's profile pictures, and replace it with another picture

supple vault
#

idk everyone else was alright

formal belfry
solar sand
viscid grove
#
img[src*='avatars/866084333809958922/'] {
  content: url('https://cdn.discordapp.com/avatars/683171006717755446/762584460155a3b8815c406a0f1b544c.webp?size=128');
}

just used my pfp because it's right here, but you can use any image

sterile umbra
#

Y'all i dont know if this is what the channel is about, but im wondering if u guys know how to make a mirror in unity (c++)

south moon
#

can someone help me with setting up venbot

south moon
#

can someone help me setting up venbot?

i need help with setting up the variables in .env and running it

low pendant
pearl stagBOT
balmy lintel
#

Check that plugin and see how it's done

dusty moth
#

btw you may need to put your user ID in quotes

stoic helm
#

no

#

it needs to have an n after it

#

2047016392629n

#

as an example

dusty moth
#

iirc both work

stoic helm
#

devs constant uses bigint

dusty moth
#

n constructs a bigint while quotes construct a string

stoic helm
#

its better to keep it consistent

dusty moth
royal nymph
valid jetty
#

i love bigint

kindred blade
#

Is there a way to check whether a channel is viewable when lurking a server via an endpoint? rn what im doing is sending a messages request and if it fails then that means I can't access it but im afraid if I do that too much I might hit cloudflare fail limit right?

royal nymph
#

you won't hit cloudflare limit

#

it's 10k failed requests

kindred blade
#

oh ok

lavish frigate
#

worry about hitting the cf limit is insane

#

you should more so be worried about discord antispam

#

but i doubt that even applies to message sending/viewing

kindred blade
#

a guy on dmdgo told me that it does but I guess I will find out

#

and i was worried about cf limit because I plan on scaling this a lot
but I should just use proxys instead I think right

royal nymph
kindred blade
#

πŸ₯Ί

lavish frigate
kindred blade
lavish frigate
#

the fuck are you trying to do

kindred blade
#

exporting chatlogs

#

from servers on discovery

lavish frigate
#

creepy

kindred blade
#

πŸ˜“

#

why

lavish frigate
#

yea no im not gonna help you with this

#

spy.pet 2 πŸ”₯

kindred blade
#

NOOO

#

I knew someone was gonna mention that site

#

and its so disgusting

#

but no im in no way gonna use it to stalk like that guy did

#

I just want to index the public servers since theres lots of info gated behind discord

#

specially on ml/ai

mellow phoenix
mellow phoenix
kindred blade
#

😭

lone gust
#

bro just scrape redit

#

trust me

#

you do NOT want a discord chat scraper for a ml ai

autumn sigil
kindred blade
lone gust
#

what

kindred blade
#

nothing

viscid grove
#

Does anyone know why tabs aren't showing from txt file previews?
for example this as a file:

a    b
#

it's only in the display

#

if you download it, it does have the tabs

ornate quiver
#

interesting that aliucord file preview also has the same issue

dusty moth
#

and bunny (no space whatsoever)

south moon
#

@grim flare ive put the bot things into src

#

but now it does this

grim flare
#

update your package.json

south moon
#

with what

#

this is my package.json

{
  "name": "dumbbot",
  "version": "1.0.0",
  "description": "",
  "main": "src/index.js",
  "scripts": {
    "dev": "nodemon index.js",
    "register": "node deploy-cmds.js",
    "start": "node ."
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "discord.js": "^14.15.3",
    "dotenv": "^16.4.5",
    "fs": "0.0.1-security",
    "path": "^0.12.7",
    "random": "^4.1.0"
  },
  "devDependencies": {
    "eslint": "^9.9.1",
    "nodemon": "^3.1.4"
  }
}
grim flare
#

actl ima clone ur

#

repo

#

wait

south moon
#

nono wait

#

it's not updated

#

lemme sync changes

#

@grim flare updated

#

clone it now

#

also make a pull request with the changes if you can

grim flare
#

dafq happened

#

im not getting any errors

#

the structure should look like the one i have

south moon
#

oh wait

#

now it doesn't to me too

grim flare
#

yea

south moon
#

actually

#

it errors this

Error: Cannot find module 'C:\Users\Davide\OneDrive\Desktop\dumbBot\src\index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
#

when i run the bot

grim flare
#

works on my end

#

did u npm i?

#

wait lemme

#

publish my version on a branch

south moon
#

i use pnpm by the way

grim flare
#

o

#

still works

#

no push perms btw

#

but heres what my package.json is

#
{
  "name": "dumbbot",
  "version": "1.0.0",
  "description": "",
  "main": "src/index.js",
  "scripts": {
    "dev": "nodemon src/index.js",
    "register": "node src/deploy-cmds.js",
    "start": "node src/index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "discord.js": "^14.15.3",
    "dotenv": "^16.4.5",
    "fs": "0.0.1-security",
    "path": "^0.12.7",
    "random": "^4.1.0"
  },
  "devDependencies": {
    "eslint": "^9.9.1",
    "nodemon": "^3.1.4"
  }
}
#

i havent really changed anything other than the dir

south moon
grim flare
south moon
#

still the same error btw

south moon
grim flare
#

i even tried running it from src/

#

it still works on my end

#

probably a misconfiguration?

south moon
#

idk

grim flare
#

yep

south moon
#

i invited you as a collab

grim flare
#

try running from the migration branch

south moon
grim flare
#

dont forget to pnpm i

#

i pushed

south moon
#

oh

grim flare
#

also im also stupid i shouldve forked then sent a pr but eh trolley

#

this works ig

south moon
#

the migration branch works

#

can you make a pr to merge it into the main branch

south moon
#

why are there multiple files

#

i will delete the .js ones

grim flare
#

i didnt rename the js to ts

#

i just did the migration

south moon
#

another issue @grim flare

grim flare
#

do you have ts-node installed?

south moon
#

no...

grim flare
#

thats why

south moon
#

i'm installing it with pnpm

#

lemme see if it works now

#

wtf

42   client.once(event.name, (...args) => event.execute(...args));
                              ~~~~~~~
src/index.ts:44:26 - error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.

44   client.on(event.name, (...args) => event.execute(...args));
                            ~~~~~~~

    at createTSError (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:859:12)
    at reportTSError (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:863:19)
    at getOutput (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:1077:36)
    at Object.compile (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:1433:41)
    at Module.m._compile (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Object.require.extensions.<computed> [as .ts] (C:\Users\Davide\OneDrive\Desktop\dumbBot\node_modules\.pnpm\ts-node@10.9.2_@types+node@22.5.2_typescript@5.5.4\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  diagnosticCodes: [ 7006, 7006, 7019, 7019 ]
}
grim flare
#

now this is where i leave you be

#

thats a type error btw

south moon
#

do i follow that guide

grim flare
#

yea

#

for the mean time you can run strict:false in your compiler options

south moon
grim flare
#

ts errors should show up in your IDE already

#

use google to fix them

#

src/index.ts:44:26 - error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.

#

dont forget to install types for packages that dont have them yet

#

(they should alr have types)

south moon
#

@grim flare

#

i'm having so many issues

#

wanna do a shared code session on vscode

lavish frigate
cerulean plover
#

as in, stop them writing into your terminal

#

iirc terminals are set to read only by default trolley

#

DONT count on that

lavish frigate
#

1 minor bug and boom

#

someone runs rm -rf / on your computer

cerulean plover
#

its ok i almost had someone rm -rf / my computer before

#

key word: almost

deep mulch
#

@frosty obsidian

frosty obsidian
#

@deep mulch sentenced to debug coroutines for a week

fleet cedar
#

Better than debugging threads

frosty obsidian
#

they're both asynchronous programming

fleet cedar
#

Yeah but coros are domesticated asynchrony

thorny ingot
#

genuine question, im dumb and i wanna learn C, but idk what i should try to make, uhm i know like the basics for C and would like some sugestions

lavish frigate
#

make a very simple cli text editor

fleet cedar
#

Why do you want to learn such an archaic language

thorny ingot
#

what else wshould i learn

#

i know python basics

#

id rather kill myself then learn java or JS

lavish frigate
#

rust

#

ts

thorny ingot
#

mmmmm

#

no.

summer mulch
#

heres why

summer mulch
ornate quiver
#

theres not really anything to learn

#

its so shrimple

autumn sigil
#

c string manip TeeHee

royal nymph
#

😭

brave gyro
#

that was my first c project

calm ruin
#

I wont use C in aoc again

brave flame
#

1st day of optional html/css classes and i've been told they were expecting a bit of experience. i have been staring at my screen for a solid hour wondering how these people are resizing several images at once.
so yeah its going awesome :D

#

how long do yall think it will take me to figure out

fleet cedar
#

You mean you are receiving education in html/css, or that you are learning about html class attribute

brave flame
#

its just called "frontend" and i think its meant to be html/css education

royal nymph
#

generated new random solution every time

#

if you had run it often enough eventually it would have gotten the correct solution blobcatcozy

dusty moth
#

use unsafe rust, without safe rust

deep mulch
dusty moth
#

only unsafe operations can be used