#🪅-progaming

1 messages · Page 14 of 1

lavish frigate
#

:(

royal nymph
#
Object.hasOwn(count, stat.name)
stat.name in count
lone gust
#

what

royal nymph
#
function statsSort(stats) {
    const counts = stats.reduce((counts, stat) => {
        counts[stat.name] ??= 0;
        counts[stat.name]++;
        return counts;
    }, {});
    return Object.entries(counts)
      .sort(([, a], [, b]) => b - a);
}
#

you will do this

lone gust
#

oh

#

thats a thing???

#

since when

#

ty

#

so much

lavish frigate
#

Why should I die

#

Do you not like rust..

lone gust
#

they were talking to me

lavish frigate
lone gust
#

who wants to see how i format spaces

#
function spaces(text, total) {
    const segmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
    const segments = [...segmenter.segment(text)].map(seg => seg.segment);
    const textLength = segments.length;

    if (textLength > total) {
        return segments.slice(0, total - 3).join("") + "...";
    } else {
        const sides = (total - textLength) / 2;
        return " ".repeat(Math.floor(sides)) + segments.join("") + " ".repeat(Math.ceil(sides));
    }
}

// example usage:
spaces("Hi", 6);
// would return: "  Hi  "
dusty moth
#

why use php when you can use perl

lavish frigate
#

In every way shape or form

#

It’s even worse than php

#

Because php is actually making a redemption arc

#

Even if it’s years too late

dusty moth
#

*!=*@; is a perfectly sane statement

lavish frigate
#

?!

#

What does that do

fleet cedar
#

It's the cheat code for instantly failing code review

#

Probably *! and *@ are special variables for something

lavish frigate
dusty moth
#

*@ is the default error variable variable

fleet cedar
#

Sanest language

#

Why are io errors and default errors different things

dusty moth
#

if you set the variable variables equal to each other, $! and $@ refer to the same variable

#

since die prints $@ by default it'll print the io error

#

meaning you can open out or die

fleet cedar
#

Do programs behave better if you threaten to execute them

royal nymph
#

Rule 11: Do not [...] talk about [...] Animated Status

silver mauve
#

the bypass UMG plugin not working? or it Sony wasnt taken into account?

elder yarrowBOT
silver mauve
#

/j

autumn sigil
#

i dont care if you say commas as long as you dont make actual spelling mistakes

lone gust
autumn sigil
#

this guy next

lone gust
#

??

valid jetty
royal nymph
lone gust
#

i wanna make a node/ts backend for something (anything really not nessecarily a website)
any ideas what it should be? :3

lone gust
#

explode

brave gyro
#

what happens if you try to patch code that another plugin already patched, does it just not work?

fleet cedar
#

As long as it matches the patched code it's fine

#

If the other plugin changes it so it doesn't match you're gonna have a good time

brave gyro
fleet cedar
#

I'm never sarcastic at all, no sir

dusty moth
#

what level of difficulty we talkin

#

is it like obscure fabric mixin error level

#

or undertale sans battle blindfolded with input lag level

brave gyro
#

no i just want to edit a message before it's displayed

#

but not the current user's message

fleet cedar
#

If your regexes don't match, your patches can't patch

brave gyro
#

oh ok

fleet cedar
#

Doesn't matter if the mismatch is because discord changes something upstream or if it's another plugin that changes it

serene elk
brave gyro
serene elk
#

no

dusty moth
serene elk
#

but what do you need

brave gyro
#

like locally

dusty moth
serene elk
#

just edit a message or edit and make it re-render with the edited version

brave gyro
#

ah ok

serene elk
#

as in, just edit messages or edit messages that are currently displayed?

#

which one

brave gyro
#

edit messages that are currently displayed

#

ok so for now i will experiment with patches

#

hopefully i will find a non intrusive one

serene elk
#

okay then use updateMessage, it's from one of vencord apis

brave gyro
#

oh wow

#

tysm

serene elk
#

if you need bulk then just do a for loop lol

brave gyro
#

yup

serene elk
#

but yeah it will update the message in the cache and also make it update visually when it's displayed

#

however keep in mind future edits to it will undo the changes

fleet cedar
#

Unless you have actual reason to do otherwise I'd recommend patching the rendering, not changing the data

brave gyro
#

i'm trying to add an image only block feature

royal nymph
brave gyro
# royal nymph can you elaborate

the idea is that: since some people spam attachments too much, you can add someone into a list and that user will have their attachments removed whenever they send a message. i'm also going to include a keyword blocker that will completely block a message from appearing if it contains keywords (or maybe a regex expression too).

royal nymph
#

hideattachments plugin already does something kinda similar although it's manual and awful shitcode

brave gyro
#

yeah and i don't think it hides future attachments from a user

fleet cedar
#

I'd probably go with making attachments from some users much smaller, rather than hiding them entirely

brave gyro
#

hm... i guess i could add that as an option

royal nymph
#

you can actually do this with css btw

#

enable ThemeAttributes plugin which will add author id to every message

#

then you can do like ```css
message[data-author-id="1234567890"] .someSelector {
display: none;
}

brave gyro
#

does updateMessage work with updating reply previews?

umbral mirage
#

do i need to restart vesktop every time i make a change to my plugin?
i am using pnpm build --watch

fleet cedar
#

Just reload the page, f5

#

Much faster than a full restart

jade stone
#

is there a reason why an empty array is truthy

fleet cedar
#

The truthiness rules are fairly arbitrary

#

The real fun stuff is that document.all is falsy

umbral mirage
#

are any of these api things documented anywwhere?

lone gust
#

no

#

vencord doesnt have any docs at all act

#

jk

#

search there

umbral mirage
#

there's barely anything there about plugins

#

i just don't understand how the people writing the plugin knew about these things

fleet cedar
#

Vencord is open source

#

It's all right there

#

The discord parts is the tricky one

umbral mirage
#

could a pwugin like this be in vencord :3

#

probbably too simiwar too texxtreplace nya~

#

i forgot i have it enabled 💀

lone gust
#

to release it

umbral mirage
lone gust
#

u should!

umbral mirage
#

im just wondering if this kind of thing fits into vencord

lone gust
#

it doesnt but u should publish it

deep mulch
#

as a third party plugin

umbral mirage
#

this uses code from silent typing and text replace

#

and one function that i made

#

im not really sure how optimized this is

elder scaffold
#

whats the diffewence to uwuifiew (✿oωo)

umbral mirage
#

what's that?

#

oh i found it

#

thought it was a vencord plugin at first

elder scaffold
umbral mirage
#

oh damn :3

obsidian roost
jade stone
#

am i stupid or is this valid syntax

#

wait, nevermind, im stupid

royal nymph
#

it isn't xd

#

either remote the const stuff or you need to first do the variable declaration and then export default in a separate statement

dusty moth
pearl stagBOT
# ornate quiver https://github.com/Auties00/Reboot-Launcher/blob/232bf8fbfc924927a4a99a8d5574949...

hosting_controller.dart: Lines 37-70

_storage = appWithNoStorage ? null : GetStorage(storageName);
uuid = _storage?.read("uuid") ?? const Uuid().v4();
_storage?.write("uuid", uuid);
name = TextEditingController(text: _storage?.read("name"));
name.addListener(() => _storage?.write("name", name.text));
description = TextEditingController(text: _storage?.read("description"));
description.addListener(() => _storage?.write("description", description.text));
password = TextEditingController(text: _storage?.read("password") ?? "");
password.addListener(() => _storage?.write("password", password.text));
nameFocusNode = FocusNode();
descriptionFocusNode = FocusNode();
passwordFocusNode = FocusNode();
discoverable = RxBool(_storage?.read("discoverable") ?? false);
discoverable.listen((value) => _storage?.write("discoverable", value));
type = Rx(GameServerType.values.elementAt(_storage?.read("type") ?? GameServerType.headless.index));
type.listen((value) => _storage?.write("type", value.index));
autoRestart = RxBool(_storage?.read("auto_restart") ?? true);
autoRestart.listen((value) => _storage?.write("auto_restart", value));
started = RxBool(false);
published = RxBool(false);
showPassword = RxBool(false);
instance = Rxn();
final supabase = Supabase.instance.client;
servers = Rxn();
supabase.from("hosting_v2")
    .stream(primaryKey: ['id'])
    .map((event) => event.map((element) => FortniteServer.fromJson(element)).where((element) => element.ip.isNotEmpty).toSet())
    .listen((event) {
      servers.value = event;
      published.value = event.any((element) => element.id == uuid);
    });
customLaunchArgs = TextEditingController(text: _storage?.read("custom_launch_args") ?? "");
customLaunchArgs.addListener(() => _storage?.write("custom_launch_args", customLaunchArgs.text));
_semaphore = Semaphore();
ornate quiver
#

i hate dart

fleet cedar
#

I have very little opinion about dart, just like other dead languages like perl abd ruby

void leaf
#

There is really no good place to ask this but does anyone know of some good guides on how to make TextReplaces stuff
Ima fuckin moron

fleet cedar
#

Isn't that just regex?

void leaf
#

it is kinda is… damn i’m going to bed I’m on like 27 hours of no sleep

void leaf
brave gyro
#

what does the regex \i do?

fleet cedar
#

Matches a javascript identifier

umbral mirage
#

why doesn't intellisense show up

#

nvm im dumb

#

i finally managed to do something on my own without copying code from somewhere else
(i just imported the badge component and stuffed it in here as a test)

lavish frigate
#

i love using js

#

/ts

ionic lake
#

The more i look at this image, the more I get triggered by <script lang="ts" setup>

#

it should be <script setup lang="ts"> SunglassesFluent

lavish frigate
#

i dont touch that one

#

in vscode i just do new component and thats what is generated

ionic lake
#

husk

#

actually I don't know if that's in the vue style-guide for both options and composition API or idk

lavish frigate
#

idk either

#

i couldnt care less either 😭

#

i just make my stupid websites thats kinda it

ionic lake
#

my website is in vitepress with a entirely custom theme

#

it gives me markdown, vue and vite and that is exactly pretty much what I need

lavish frigate
#

nice!

jade stone
lavish frigate
#

nuxt also has some md thing

#

not sure what its called rn

ionic lake
#

docus you mean?

lavish frigate
#

docus?

lavish frigate
#

@royal nymph this is basically astro but with vue components

#

lmao

ionic lake
#

that is MDC

#

well now I see it, I misread what you said but docus is also a ssg like vitepress but in nuxt

royal nymph
lavish frigate
royal nymph
#

u can use mdx in astro with vue components blobcatcozy

spark tiger
#

hii im not sure it's the best place to ask this type of question but i got really curious the way these discord scripts work that you're supposed to enter in devconsole (specifically the quests one). the part that confuses is this. does anybody know what exactly it does and like how'd i do the same thing but with a different store (ig that's what these are called properly, basically wanna access a specific function)? also why do you need to Math.random() at the beginning wth does it do slugjudgement

#

i don't have much experience with js/ts/webdev and like discord-related development so apologizes if it's a nooby question!

royal nymph
#

webpack is a web bundler, you can just Google to learn more

#

webpackChunk.push is how you register a chunk

spark tiger
royal nymph
#

the first argument is the module id, math.random() makes it random id (but using Math.random for this is very bad style, one should use Symbol() instead)

#

the third argument is immediately invoked when the chunk is registered and gets the webpack require instance (like nodejs require but provided by webpack)

#

pushing a module is the easiest way to get hold of the require instance

#

that's why it's used here

spark tiger
#

appreciate it

royal nymph
#

webpackRequire.c is the module cache, aka an object that contains the exports of all modules that have already been loaded (via require call). equivalent to require.cache in nodejs

#

so Object.values(require.c).find(m => m.exports?.fooBar) will search all exports and find the one that exports fooBar

#

Z, ZP, tn are minified names auto generated by the bundler

hardcoding them is bad practice but it's easier

spark tiger
#

these one- or two-symbol names is basically what confused me the most I believe

royal nymph
#

just auto generated names

spark tiger
#

yea it makes sense now ig

royal nymph
#

whenever discord does like

export const fooExport = 42;

the bundler changes that to a random name

#

Z & ZP are default export

any other names are randomised and might change in the future. so I would never hardcode them, instead you can use nested loop

spark tiger
#

thanks for the explanation, though I think my lack of JS knowledge is too bad to fully understand what you said

#

appreciate it anyways!

#

perhaps there're some articles or other resources for that kinda js-development

royal nymph
#

if you're new to the language you're better off learning it via a normal project first

#

because there is no documentation for things like these, you just need to reverse engineer and figure it out yourself and read a lot of minified code

#

it's much easier to learn via more common means which are well documented

spark tiger
#

well thank you so much once again I guess I'll just uhhh do a better research on the stuff you mentioned earlier to just have a better understanding it at a basic level

royal nymph
#

I'm never fixing that title typo

spark tiger
#

lmao

spark tiger
#

like what mentioned there would work anyways regardless of like the issues the guide has if any

#

nevermind

spark tiger
royal nymph
serene elk
#

but doesn't matter

royal nymph
#

yes

#

idk why i said module I meant to say chunk

lavish frigate
#

is this enough to stop scraping or

royal nymph
#

just xor it in js or smth

#

or use cloudflare email protect thing

lavish frigate
supple whale
#

for my email shit

#

so the email is rendered on the client

lavish frigate
#

scrapers can also run js

supple whale
#

yes

#

rarely but yes

lavish frigate
#

especially because like half of all websites run SPA

#

so having it displayed inside the dom in plaintext at all is dangerous

ionic lake
#

me at my domain

lavish frigate
#

that looks ugly as fuck

#

also scrapers also detect that iirc

ionic lake
#

they detect phrases? news to me

lavish frigate
#

"something at something dot com" is one of the absolute easiest things to detect why wouldnt they 😭

ionic lake
#

it's such a flakey thing to try to detect to me personally but w/e

royal nymph
#

if you really care then you should just use cloudflare email protection and forget about it

#

if u use cloudflare then it's already enabled by default

royal nymph
royal nymph
#

😭

#

I feel like that's easier for bots to parse than [at]

lavish frigate
#

maybe

#

but that would also require bots to also parse source code

#

which is rarer than just the dom

fleet cedar
#

The world would be a better place if those email scraper bots would go to hell

magic shale
#

Shrimply b64 encode it

surreal condor
#

flashback to late night debugging someone else's website

#

true vencorders will know what event i mean

frosty obsidian
#

don't write out the full fedi handle then smh

surreal condor
#

or do the svg thing

#

for the fedi handle

frosty obsidian
#

i just use an icon button

#

no text to censor

surreal condor
#

or pre rasterize the text

azure egret
#

question, how/can i send a file (like .txt or somthing), from a cmd on a plugin

lone gust
#

a plugin?

lavish frigate
azure egret
lavish frigate
#

for what tho

azure egret
#

?

#

im making a fortnite tools thingy for my friends

#

im making a command to search every asset in the files (like 85000) for a string and i cant send that as a msg cuz most of the time its 2 long, so i want to make it a txt file

quick crow
#

Would probably be better as a bot

lavish frigate
#

yep

#

a plugin for that is a very very weird choice

quick crow
#

^

azure egret
#

im do for fun

#

but can i upload a file? or na

quick crow
#

Look at how petpet does it

#

SUPER inefficient for something like that tho

supple vault
#

oh

#

that only works against one of however many cdn domains they have

#

if someone has a list of domains discord uses for serving images, pls let me know with a ping

dusky remnant
#

how do i disable vencord

elder yarrowBOT
pearl stagBOT
# royal nymph https://github.com/Vendicated/Vencord/blob/main/src/plugins/webContextMenus.web/...

index.ts: Lines 49-69

const MEDIA_PROXY_URL = "https://media.discordapp.net";
const CDN_URL = "cdn.discordapp.com";

function fixImageUrl(urlString: string) {
    const url = new URL(urlString);
    if (url.host === CDN_URL) return urlString;

    url.searchParams.delete("width");
    url.searchParams.delete("height");

    if (url.origin === MEDIA_PROXY_URL) {
        url.host = CDN_URL;
        url.searchParams.delete("size");
        url.searchParams.delete("quality");
        url.searchParams.delete("format");
    } else {
        url.searchParams.set("quality", "lossless");
    }

    return url.toString();
}
royal nymph
#

you can just use that plugin on armcord

#

I can make it enabled by default on armcord

#

so anyone who uses vencord will get discord context menu

supple vault
#

so like

royal nymph
#

horror

cerulean plover
#

you'd have to go back to an older version to look at the code for that

royal nymph
#

it... didn't?

deep mulch
#

/run

rugged berryBOT
#

Update: Discord changed their client to prevent sending messages
that are preceeded by a slash (/)
To run code you can use "./run" or " /run" until further notice

Here are my supported languages:
awk, bash, basic, basic.net, befunge93, bqn, brachylog, brainfuck, c, c++, cjam, clojure, cobol, coffeescript, cow, crystal, csharp, csharp.net, d, dart, dash, dragon, elixir, emacs, emojicode, erlang, file, forte, forth, fortran, freebasic, fsharp.net, fsi, go, golfscript, groovy, haskell, husk, iverilog, japt, java, javascript, jelly, julia, kotlin, lisp, llvm_ir, lolcode, lua, matl, nasm, nasm64, nim, ocaml, octave, osabie, paradoc, pascal, perl, php, ponylang, powershell, prolog, pure, pyth, python, python2, racket, raku, retina, rockstar, rscript, ruby, rust, samarium, scala, smalltalk, sqlite3, swift, typescript, vlang, vyxal, yeethon, zig

You can run code like this:
./run <language>
command line parameters (optional) - 1 per line
```
your code
```
standard input (optional)

Provided by the Engineer Man Discord Server - visit:
https://emkc.org/run to get it in your own server
https://discord.gg/engineerman for more info

deep mulch
#

/run ```js
function negate() => "h"

rugged berryBOT
#

@deep mulch I only received js(18.15.0) error output

/piston/jobs/3cfe42d9-6d0d-49e0-8a74-00e0ba06f1e2/file0.code:1
function negate() => "h"
                  ^^

SyntaxError: Unexpected token '=>'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
deep mulch
#

ok so thats not valid

royal nymph
deep mulch
#

/run ```js
const negate = (func) => (() => !func.apply(this, args));

rugged berryBOT
#

Your js(18.15.0) code ran without output @deep mulch

deep mulch
#

@royal nymph blobcatcozy

royal nymph
#

not correct

deep mulch
#

die

#

/run ```js
const negate = (func) => (() => !func.apply(this, args));

negate(() => false)

rugged berryBOT
#

Your js(18.15.0) code ran without output @deep mulch

deep mulch
#

/run ```js
const negate = (func) => (() => !func.apply(this, args));

console.log(negate(() => false))

rugged berryBOT
#

Here is your js(18.15.0) output @deep mulch

[Function (anonymous)]
deep mulch
#

Anonymous...

#

/run ```js
const negate = (func) => (() => !func.apply(this, args));

console.log(negate(() => false)())

rugged berryBOT
#

@deep mulch I only received js(18.15.0) error output

/piston/jobs/c799e58b-05b9-4a27-9d51-3122157c0f8a/file0.code:1
const negate = (func) => (() => !func.apply(this, args));
                                                  ^

ReferenceError: args is not defined
    at /piston/jobs/c799e58b-05b9-4a27-9d51-3122157c0f8a/file0.code:1:51
    at Object.<anonymous> (/piston/jobs/c799e58b-05b9-4a27-9d51-3122157c0f8a/file0.code:3:32)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
royal nymph
#

you need to use function not arrow function

#

and don't define arts

#

args

deep mulch
#

whyyy

ornate quiver
#

args isn't a thing

#

arguments is

#

/run

const negate = (func) => (() => !func.apply(this, arguments));
console.log(negate(() => false)())
rugged berryBOT
#

Here is your js(18.15.0) output @ornate quiver

true
ornate quiver
#

@deep mulch

deep mulch
ornate quiver
#

no

deep mulch
#

😭

#

there's literally so many params and headers

#

and the thing doesn't even return an error status code

#

it's always 204

frosty obsidian
#

zeet just ask ashley for source

deep mulch
#

ashley won't give

#

help me steal

frosty obsidian
#

just void her nda

deep mulch
#

okay

#

I found some C# thing that uses that URL

#

seems neat

frosty obsidian
#

protos

#

you already have

deep mulch
#

yes

deep mulch
#

rusher

ornate quiver
deep mulch
#

scary

proud echo
valid jetty
#

wait this is

dusty moth
ornate quiver
royal nymph
#

it does not

#

arguments and this only work inside normal functions..

ornate quiver
#

pain

#

right the args would be missing

royal nymph
lone gust
#

/run

const now = new Date();
const start = new Date(now.getFullYear(), 0, 0);
const diff = (now - start) + ((start.getTimezoneOffset() - now.getTimezoneOffset()) * 60000);
console.log(Math.floor(diff / 86400000));
rugged berryBOT
#

Here is your js(18.15.0) output @lone gust

236
lone gust
#

wild

hybrid crypt
#

how can i make a tab like the nitro one with a plugin?

cerulean plover
lone gust
#

w

deep mulch
final night
supple vault
#

@royal nymph can I ask you about the async here?

#

it appears its not supposed to return a promise - why does this work in vesktop?

royal nymph
#

stop using goofy ass eslint rules

supple vault
royal nymph
#

it does not accept any return value..

#

it's a void function

stoic helm
#

anything can accept promises

royal nymph
#

it doesn't matter what u return

supple vault
#

oh hm

royal nymph
supple vault
#

yeah i know that one

lone gust
supple vault
#

it looks like its supposed to return a function

#

or somethin idk

#

im probably misunderstandiung

fleet cedar
#

Sounds more like handle takes two arguments

#

But it's unclear

#

Are there no actual types?

royal nymph
#

it's saying that handler is a Function which gets passed the arguments request and callback

supple vault
#

oh I see

#

but wouldn't electron want to specify in types that it can accept an async function?

fleet cedar
#

It already states that it ignores the return value entirely

#

Which means it can be a promise if you want, it doesn't care

supple vault
#

oh hm

#

alright

royal nymph
#

wanna return a number? go for it
a promise? sure

#

generally it's very common practice to use async callbacks if a void is expected

#

which makes that rule overly pedantic / bogus

supple vault
#

I've had situations where it sometimes doesn't work for things

royal nymph
#

the intent is not bad "floating promise = bad" but if you just write good code it's not a problem

supple vault
#

which is why I try to stick to the rule

royal nymph
#

but typescript will already type error for that

royal nymph
fleet cedar
#

However I've run into issues passing an async to useEffect, because if that one returns non-undefined (including a promise) it's used as the unmount callback

supple vault
#

hm

supple vault
royal nymph
royal nymph
#
{
  "@typescript-eslint/no-misused-promises": [
    "error",
    {
      "checksVoidReturn": false
    }
  ]
}
supple vault
#

oh lmao

#

tysm

#

this rule drives me fucking crazy sometimes

royal nymph
#

just disable it 😭

#

u don't need all this deranged linting

frosty obsidian
#

vee disables every lint

supple vault
#

I know

#

i saw his eslint file

#

he only has a few specific enabled

lone gust
supple vault
#

this is what I've been using for the most part

// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettier from "eslint-plugin-prettier/recommended";
import n from "eslint-plugin-n";

export default tseslint.config(
    eslint.configs.recommended,
    {ignores: ["ts-out", "src/discord/content/js", "*.config.js", "src/shelter/", "scripts/"]},
    ...tseslint.configs.recommendedTypeChecked,
    ...tseslint.configs.stylisticTypeChecked,
    n.configs["flat/recommended"],
    prettier,
    {
        settings: {
            n: {
                allowModules: ["electron"],
                tryExtensions: [".tsx", ".ts", ".jsx", ".js", ".json", ".node", ".d.ts"]
            }
        },
        plugins: {
            n
        },
        languageOptions: {
            parserOptions: {
                project: true,
                tsconfigRootDir: import.meta.dirname
            }
        },
        rules: {
            "no-constant-binary-expression": 0,
            "n/no-unpublished-import": 0,
            "n/no-unsupported-features/node-builtins": 1,
            "@typescript-eslint/no-unused-vars": [
                2,
                {
                    argsIgnorePattern: "^_",
                    varsIgnorePattern: "^_",
                    caughtErrorsIgnorePattern: "^_"
                }
            ]
        }
    }
);
#

or well, on personal projects I used strict type checked

#
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
  eslint.configs.recommended,
  { ignores: ["dist/"] },
  ...tseslint.configs.strictTypeChecked,
  ...tseslint.configs.stylisticTypeChecked,
  {
    languageOptions: {
      parserOptions: {
        project: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
    rules: {
      "@typescript-eslint/no-non-null-assertion": "off",
    },
  },
);
``` this is my personal eslint config
royal nymph
#

ai rename Stare

#

kinda cool tbf

pearl stagBOT
# deep mulch <@298295889720770563> https://github.com/zt64/Minkinator/blob/main/bot/src/main/...

RestrictedExtension.kt: Lines 344-400 - :warning: Zero width spaces present

command("eval", "Evaluate code") { input ->
    val code = input.removeSurrounding(prefix = "`​``kt", suffix = "`​``").trim()

    val res: ResultWithDiagnostics<EvaluationResult>
    val duration = measureTime {
        res = scriptingHost.eval(
            script = code.toScriptSource(),
            compilationConfiguration = ScriptCompilationConfiguration {
                defaultImports(
                    "dev.kord.core.behavior.*",
                    "dev.kord.core.entity.*",
                    "dev.kord.core.event.*",
                    "kotlinx.coroutines.*",
                    "zt.minkinator.util.*"
                )
                implicitReceivers(ChatCommandContext::class)
                providedProperties(
                    "kord" to Kord::class
                )

                jvm {
                    dependenciesFromCurrentContext(wholeClasspath = true)
                }
            },
            evaluationConfiguration =
                ScriptEvaluationConfiguration {
                    implicitReceivers(this@command)
                    providedProperties("kord" to kord)
                }
        )
    }

    val returnValue = res.valueOrNull()?.returnValue

    message.reply {
        embed {
            description = if (returnValue != null) {
                buildString {
                    appendLine("`​``")
                    appendLine(returnValue.toString())

                    if (length > 4093) {
                        removeRange(4093, length)
                        footer("Output truncated")
                    }

                    appendLine("`​``")
                }
            } else {
                res
                    .reports
                    .filter { it.severity > ScriptDiagnostic.Severity.WARNING }
                    .joinToString("\n", transform = ScriptDiagnostic::render)
            }
        }
    }
}
deep mulch
#

i messed up the selection

frosty obsidian
#

neat

#

caddy will have soon

deep mulch
#

im gonna make it upload the output as a file when its too big

royal nymph
frosty obsidian
#

ermm caddy is my bot

#

I've never heard of such a program in go

#

must have stolen the name..

deep mulch
#

@royal nymph@royal nymph

royal nymph
#
command("eval", "Evaluate Code", (message, input) => {
  const result = eval(input)
  input.reply({ embeds: [...} })
})
#

u love

deep mulch
#

nop

royal nymph
#

ve Commands.eval.execute.toString()

elder yarrowBOT
# royal nymph ve Commands.eval.execute.toString()

async execute(msg, code) {
        if (msg.author.id !== OwnerId) {
          if (!/^ve\b/.test(msg.content)) {
            silently(sendVoiceMessage(msg));
          }
          return;
        }
        const console = {
          _lines: [],
          _log(...things) {
            this._lines.push(
              ...things.map((x) => inspect(x, { getters: true })).join(" ").split("\n")
            );
          }
        };
        console.log = console.error = console.warn = console.info = console._log.bind(console);
        const { client, channel, author, content, guild, member } = msg;
        let script = code.replace(/(^`​{3}(js|javascript)?|`​{3}$)/g, "");
        if (script.includes("await"))
          script = `​(async () => { ${script} })()`​;
        try {
          var result = await eval(script);
        } catch (e) {
          var result = e;
        }
        let res = inspect(result, { getters: true });
        res = res.slice(0, 2e3 - 10 - countOccurrences(res, "`​"));
        let output = codeblock(res, "js");
        const consoleOutput = console._lines.join("\n").slice(0, Math.max(0, 1990 - output.length));
        if (consoleOutput)
          output += `​
${codeblock(consoleOutput)}`​;
        return reply(msg, {
          content: output
        });
      }```
deep mulch
#

DELETEETE

#

why is it so ulgy

royal nymph
#

it's trnaspiled code guh

#

so it has shit formatting

deep mulch
#

fix

lavish frigate
#

at least with the copilot extension

#

(or its because i use preview release)

deep mulch
#

@calm ruin what is this server my bot isi n

calm ruin
#

turkish armed forces

ornate quiver
#

ve balls

lone gust
#

@dusty moth yo so

#

how can I check if an element doesnt have a specific style on discord

dusty moth
#

you can't read other css

lone gust
#

oh

dusty moth
#

check for attributes or recreate selector

lone gust
#

i want it to flag
<span></span>
but not
<span style="a: b"></span>

lone gust
dusty moth
#

(plus !important for specificity)

lone gust
#

do u have an example

dusty moth
lone gust
#

pretend you are talking to an idiot (but remember you dont need to pretend)

dusty moth
#

what do you want to select

visual shellBOT
lone gust
#

@dusty moth

lone gust
#

😭

#

my dreams ruined

solid gazelle
lone gust
#

yes

solid gazelle
# lone gust yes

idk how well this works

[class*="desaturateUserColors"]:not([style^="color"]) {
  /* ur css here */
}
lone gust
#

it doesnt since i needa match the entire message :(

solid gazelle
#

u wanna hide messages by whitenames

#

insane

solid gazelle
#

think theres a faster selector than *= for prepended str but idk which

lone gust
#

lmao

#

ty

#

@solid gazelle

solid gazelle
#

bad

lone gust
#

nah @thorny ingot would want it

formal belfry
#

wtf @lone gust its you

lone gust
#

thats crazy

#

i exist on discord

#

suprising take

formal belfry
#

shocking twist of events

dusty moth
lone gust
#

hi

still rune
#

made a 88x31 for rust

lone gust
#

@lavish frigate

lavish frigate
#

why would you make it only talk about memory safety

runic sundial
#

funni

fleet cedar
#

Why would you ever talk about something that is not memory safe

royal nymph
#

do rust users ever talk about anything else

runic sundial
#

uhh

#

fearless concurrency!

#

🔥 blazing fast! 🚀

#

uhhh

#

web assembly!!

royal nymph
runic sundial
#

lemme check

#

bevy bevy bevy bevy!!!

#

cargo package manager!

#

multi platform!

#

free father figure!!!

#

rust users when they are told that memory issues are only a small subset of software dev woes

fleet cedar
#

A significant portion of exploitable security issues, and often very hard to debug, though

runic sundial
#

true

royal nymph
#

nah memory safety is good

fleet cedar
runic sundial
#

no code to debug when your development velocity is 0

royal nymph
#

rust just does it excessively

#

you can have healthier memory safety without paranoid schizophrenia

#

like go or java do

#

both have their ups and downs

but memory safety as a concept is gooood

#

screw C!

runic sundial
#

Memory safety in native langs is nice

fleet cedar
#

Rust isn't for everything, true

runic sundial
#

but also; it's only a fraction of what leads to 'correct' code

fleet cedar
#

But I would never dream to start a new project in c or c++ in this decade

runic sundial
#

FUCK NO

#

altho

#

Zig > C > Rust > C++

#

You don't fucking NEED half the shit Rust has

royal nymph
fleet cedar
#

Traits and enums are really fuckin nice

royal nymph
#

bug that doesn't involve memory usually ends at annoyances like crashes

#

bug involving memory almost always results in something terrible like code execution or privilege escalation

#

the majority of security relevant bugs are caused by memory issues

fleet cedar
#

Bugs that crash the program or logic errors are easier to detect and diagnose than bugs that give russian spies full control over your hardware

runic sundial
#

Ok. But 99.99999999999% of software

#

is like that

fleet cedar
#

For software that runs entirely locally and on trusted data, security isn't such a huge deal

lavish frigate
royal nymph
#

im not talking about its actual benefits

#

just that rust shills will never shut up about memory safety

runic sundial
#

^

#

In particular, that it fixes everything wrong with software.

#

I can write shitcode in ANY lang.

lavish frigate
#

like if you really think c is still a good language in this day and age not sure what to tell you

#

we are 40 years into the future

runic sundial
#

Brother in christ.

#

Governments.

royal nymph
#

when the government does anything i like: wow these guys really know their stuff

when the govermnet does anything else: crush the elites!!!! question all authority

runic sundial
#

You act like you have ANY trust in them.

royal nymph
lavish frigate
#

i never said i have any trust in the government

#

not sure why you are twisting my words

#

i said that the government is notorious for sticking with old shit (which is true) and that even they are switching

royal nymph
#

i was just joking dont take it too serious

lavish frigate
#

maybe but this other person is FUMING that i said anything against c

runic sundial
#

I'm half joking but at the end of the day I don't care

#

My only fuming here is the bringing up govs doing anything as an endorsement

autumn sigil
runic sundial
#

Also true

royal nymph
#

meh using C for new programs is foolish

runic sundial
#

But at the end of the day, use whatever language doesn't get in your way.

#

No issue with it if you're good at it.

#

Like the end result will be the same.

royal nymph
#

but i think it's also beneficial to not give into delusions like "switch to rust for immediate safety" cause at the end of the day all the system libraries and so on are still in C

runic sundial
#

Yeah

#

And better yet, they want to use LLMs for it

royal nymph
#

on the long term it's a good idea to migrate as much as possible to safer languages tho

runic sundial
#

Incl. decompiling existing C projects with lost source code

#

to then RECOMPILE them with Rust

lavish frigate
runic sundial
#

No.

#

C++ is a clusterfuck compared to C

#

RAII be damned

lavish frigate
#

though OS's and other systems are slowly starting to get in on rust

runic sundial
#

Yeah, for sensitive internal systems where it's worthwhile to spend 10x the time doing it in Rust

#

Or it's small enough to where it just needs to be correct

lavish frigate
surreal condor
#

because they aren't people they're llms

formal belfry
final night
formal belfry
final night
#

For some reason people pay me to be as silly as possible

#

(I haven't worked in a week)

formal belfry
formal belfry
deep mulch
#

C is good

formal belfry
#

I don't have the ability to talk in any of the development channels, so just gonna slap this here
why do we need virtual merge?
The point of the library is to have object merges reflected back onto the merged objects, but the only context it's being used in is an immediate return ;-;
I'm like 90% sure this could just be return { ...user, premiumType: 2, themeColors: colors } instead of needing virtual merge

#

I could be being silly here, but I don't see why this into needs to be reflected back onto the user object

#

It would in theory shave ~1.1kb off the bundle (before min+gzip), which is minor but it's something

#

also for the userscript distribution, you should probably be using GM.xmlHttpRequest and blobbing the response

#

or you could encode the image as a base64 blob in the bundle, but eeeeh

formal belfry
ornate quiver
#

v+ dev 1101215020798443732

#

wait wrong one

#

v- dev 1101215020798443732

#

v+ programming 1101215020798443732

#

i hate this

dusty moth
ornate quiver
#

vee removes everyones perms

#

@formal belfry you can cross post that into dev now

dusty moth
fallen nebula
#

actually why not use /commands ?

fleet cedar
#

Boring

fallen nebula
#

XD

trail night
fallen nebula
#

Is it ?

#

Being able to tab complete option is very nice

trail night
#

you cant use /commands in replies

#

which is what we mainly do

#

e.g.

fallen nebula
#

Mmmmmhh

#

ig

trail night
trail night
#

its way quicker to do that

#
  • /commands can overcomplicate simple tasks like that, + no aliases
fallen nebula
#

I mean yeah
Autocomplete names work as an alternative, but your workflow is reply, so make sense

trail night
#

vh +

elder yarrowBOT
# trail night vh +

Role-add (+, ra)

Add a role to one or more users

Usage

vrole-add <role> <user> [user...]
trail night
#
  • that
#

xd

#

you cant have multiple users like that

fallen nebula
#

No way to make a list with /commands ?

#

Weird

#

Ig you could parse a text field, but yeah would worsen it

lone gust
#

it just takes the person who owns the message

alpine marten
#

\🍂

dusty moth
trail night
#

context menu slow and awkward

#

and then you have to prompt a modal to complete the action

#

and still doesnt work with multiple users

lavish frigate
#
  • there is a limit of 5 menu items
royal nymph
#

interactions are clunky and slow

frosty obsidian
#

annoying to set up

cunning moon
#

anyone has an idea why this userplugin I am trying to make ain't showing up?
it's located in the correct directory and isn't detected by both vesktop and desktop applications
I did attempt to install a different userplugin, which loads just fine. guess I messed up somewhere, as I am new to both typescript and vencord plugin dev

lavish frigate
#

your code seems fine though

#

you sure its in src/userplugins and have you rebuilt AND reinjected it?

cunning moon
#

yes

cunning moon
lavish frigate
#

i dont think so

royal nymph
#

you can use native on vesktop

lavish frigate
#

i was told you cant

#

and since i dont use vesktop i havent looked into it at all

cunning moon
#

I use vesktop as it has the best linux support compared to the normal desktop app

stoic helm
#

vesktop is an electron wrapper

#

and loads native modules just fine

ornate quiver
#

it's the same thing

royal nymph
#

I think she got the message after I told her

#

we don't need 3 people telling her 😭

ornate quiver
woven mesa
#

fr

cunning moon
#

got that plugin to finally load

now I am wondering, is there a way to run code in the index.tsx from within native code?

lavish frigate
#

What are you trying to do

#

Treat native basically like an api

cunning moon
#

trying to control things like user settings

#

or, for example, join a voice, send a message, etc
stuff like that

and apparently stuff like UserSettings fail to call Vencord when in native

royal nymph
#

they're two separate processes

#

you need to use ipc to communicate

dusty moth
#

is passing functions to a native function legal

cunning moon
#

no
would be too easy ngl

Error: An object could not be cloned.

I have been trying around with IPC for a while, can't find a way to do it properly tho, as I can't use native modules like "http" or "net" in the non-native code
also I can't open a WebSocketServer on the non-native side

royal nymph
#

you send events

#

or use eval

#
// index.ts
export default definePlugin({
  name: "MyPlugin",
  handleEvent(event) {
    console.log(event);
    return "hi";
  },
  start() {
    Native.doStuff();
  }
})

// native.ts
export async function doStuff() {
  const event = getSomehow();
  const result = await webframe.executeJavascript(
    `Vencord.Plugins.plugins.MyPlugin.handleEvent(${JSON.stringify(event)});`
  );
  console.log(result); // "hi"
}
cunning moon
#

ah thanks

lone gust
#

i made a plugin abt eval

fleet cedar
#

Just make sure to only use indirect eval (0, eval)(...); direct eval eval(...) kills all optimizations

dusty moth
#

why the fuck are lists callable

#

fuck off php

lavish frigate
#

strings are callable too

dusty moth
#

php devs have passed 0 drug tests

royal nymph
lavish frigate
royal nymph
#

so bad..

dusty moth
#

and taken from C so not JS's fault

royal nymph
lavish frigate
#

oh wtf

dusty moth
lavish frigate
#

you are right

#

shouldnt be

royal nymph
#

PHP constructs, function names, class names are case-insensitive, whereas variables are case-sensitive.

#

noooooo

lavish frigate
#

:3

#

its amazing right

dusty moth
#

php should add perl typeglobs

lavish frigate
#

all languages should just become rust

dusty moth
#

perl has no length operator

#

using an array in a non-array context returns its length

lavish frigate
#

?

dusty moth
umbral mirage
#

how do i find the place where stuff is rendered in discord (when making a vencord plugin)

#

at my first plugin attempt i tried finding where channels were rendered in order to change the name of the channel but i could not find that in dev tools

#

now im trying to find where usernames are rendered (in chat)

lone gust
#

devtools then click the >> symbol then click Components

umbral mirage
#

that's what i did

lone gust
umbral mirage
#

i selected the thing and clicked on source, but that just brought me to some confusing function that had a 1 letter name

lone gust
#

yeah idrk either past that point 😭

elder scaffold
#

so most of it will be a,b,c,d and so on

umbral mirage
#

i've read in multiple places that when writing a patch, you shouldn't rely on the one letter functions

elder scaffold
#

Yes

#

Use \i

lone gust
#

what

#

whats \i

fleet cedar
#

Extension to regex syntax that matches a variable name

elder scaffold
#

^

lone gust
#

ah

umbral mirage
#

also, when selecting that element

#

i could either select the channel or a parent element of that

#

their props were pretty much the same

#

so i found this thing i want to edit

#

so i went to the source, and i want to test this by replacing B with the string "test" (which im hoping should change every username to be test)

#
{
    find: "(E.Z.USERNAME),{nick:B",
    replacement: [
        {
            match: "B",
            replace: "\"test\""
        }
    ]
}```
so i wrote this
fleet cedar
#

Now replace the variable names with \i for a proper patch

umbral mirage
#

and the patch fails because i have "invalid destructuring assignment target"

umbral mirage
umbral mirage
fleet cedar
#

It works today, sure (assuming it does), but it won't work next week when the variables are rerolled

umbral mirage
#

when I set replace to "test", the vscode companion says the patch is ok but when i set it to "\"test\"" (with only one backslash), i have invalid destructuring

fleet cedar
#

/run ```js
let { nick: "test" } = { nick: "hello" };

rugged berryBOT
#

@fleet cedar I only received js(18.15.0) error output

/piston/jobs/fa378df4-dcef-4767-a846-eb9b65b950f6/file0.code:1
let { nick: "test" } = { nick: "hello" };
            ^^^^^^

SyntaxError: Invalid destructuring assignment target
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
fleet cedar
#

You mean that error?

umbral mirage
#

yes

#

exactly

fleet cedar
#

Well don't produce invalid code then

umbral mirage
#

i just tried to replace the variable B with a string

fleet cedar
#

Make a more precise patch that applies in the place you need it and not in the place where you don't

cunning moon
#

I feel dumb
Electron.webFrame === undefined
same with just webFrame
thus I cannot access the executeJavaScript method.

and running the same in (0, eval)(...) tells me that Vencord is missing

royal nymph
#

code where

cunning moon
#

omw

umbral mirage
lone gust
cunning moon
#

code

lone gust
#

what is that

#

and what is that for

cunning moon
#

it's the bad code of my plugin I am trying to make

lone gust
#

wanna know another way to remote control discord?

#

its very secrect so dont leak

#

but you can go to the website discord.com and log in and itll allow you to remotely control discord

cunning moon
#

nah

#

not like that

lavish frigate
#

why not just... use the api?

cunning moon
#

do things like switch voice, toggle game activity status on the client

lavish frigate
#

right

cunning moon
#

kinda replacement to hotkeys on linux with vesktop. trying to attach it with my streamdeck as well, so that's one use case

#

might be useful to some others as well

lavish frigate
#

doubt its gonna be accepted as an official plugin, way too niche, requires a lot of extra effort to make it work

cunning moon
#

wasn't my plan anyways. user plugin is enough

lavish frigate
#

alright

lone gust
#

how would I be able to find the function for a specific button (for example the mute button) and run it

#

like where in the components window would it be / how would i activate it

umbral mirage
#

can \i only work in regex or can i also use that in a replace

lavish frigate
#

how do you expect it to work in a replace

fleet cedar
#

What would it replace with? "An identifier" is kinda vague

dusty moth
#

if you want to replace with a matched identifier use a capture group

#

if you want to introduce a new identifier just introduce it

deep mulch
#

stupid fucking windows I can't get git to work with ssh

#

I have literally done everything

umbral mirage
#

ok i fixed this.
i was doing stuff that i did not need

#

i just wanted to add a badge (kind of like the bot tag) next to the username

#

so I tried writing a patch that adds an html element after the username

#

but after looking at platform-indicators, which does a similar thing, i found you can use message decorations instead

dusty moth
#

@royal nymph if I finish this PR will it be merged

lone gust
#

LOL BRO IS THE VENBOT DEV 2.0

#

pollovernathan vs vee whos the better venbot dev

dusty moth
jade stone
#

is !> an operator or a typescript non-null assertion followed by an operator

frosty obsidian
#

/run

let x = 10
let y = 11
console.log(y > x)
rugged berryBOT
#

Here is your ts(5.0.3) output @frosty obsidian

true
frosty obsidian
#

/run

let x = 10
let y = 11
console.log(y !> x)
rugged berryBOT
#

Here is your ts(5.0.3) output @frosty obsidian

true
frosty obsidian
#

yeah it's non null assertion

#

/run

let x = 10
console.log(y !> x)
rugged berryBOT
#

Here is your ts(5.0.3) output @frosty obsidian

file0.code.ts(2,13): error TS2304: Cannot find name 'y'.
frosty obsidian
#

/run

let x = 10
let y = undefined
console.log(y !> x)
rugged berryBOT
#

Here is your ts(5.0.3) output @frosty obsidian

false
frosty obsidian
#

/run

let x = 10
let y = undefined
console.log(y > x)
rugged berryBOT
#

Here is your ts(5.0.3) output @frosty obsidian

false
deep mulch
#

@frosty obsidian go sleep

#

I sleep

#

goodnight

frosty obsidian
#

gn

lone gust
#

/run

"wi.ng" == "cool"
rugged berryBOT
#

Your js(18.15.0) code ran without output @lone gust

lone gust
#

/run

console.log("wi.ng" == "cool")
rugged berryBOT
#

Here is your js(18.15.0) output @lone gust

false
lone gust
#

@frosty obsidian gg

jade stone
#

also if you remove it, it works fine

proud echo
#

/run

let isTrue
function a() {
return true
}
function b() {
return false
}
if (a() == b()) {
isTrue = true
} else if (a() !== b()) {
isTrue = false
}
console.log(isTrue)
rugged berryBOT
#

Here is your js(18.15.0) output @proud echo

false
dusty moth
#
let x = 5, y = 7
console.log(x !!== y)```
#

@visual shell eval ts let x = 5, y = 7 console.log(x !!== y)

visual shellBOT
fleet cedar
#

/run ```ts
let x = 5, y = 7
console.log(x !!== y)

rugged berryBOT
#

Here is your ts(5.0.3) output @fleet cedar

true
dusty moth
#

not not strictly equal to

fleet cedar
#

/run ```ts
let x = 5, y = 7
console.log(x !=== y)

rugged berryBOT
#

Here is your ts(5.0.3) output @fleet cedar

file0.code.ts(2,18): error TS1109: Expression expected.
fleet cedar
#

Huh, so that one's illegal

dusty moth
#

tokenization can't change during parse

umbral mirage
#

why javascript

royal nymph
#

what's wrong

#

you're the one doing cursed stuff not js

#

js is just coping

umbral mirage
#

why would that be the result of multiplying strings

royal nymph
#

what else would it result in

lone gust
#

string.prototype.concat

#

:3

Number.prototype.toBottlesOfBeer = function() {
     let result = "";
    for (let i = this; i > 0; i--) {
        result += i + " bottles of beer on the wall. " + i + " bottles of beer. Take one down, pass it around, ";
    } 
    return result;
}
fleet cedar
#

Mathematically speaking, string concatenation is more akin to multiplication than addition

fleet cedar
#

Yes

deep mulch
#

/run

console.log("wi.ng" == "cool")
rugged berryBOT
#

Here is your js(18.15.0) output @deep mulch

false
deep mulch
dusty moth
#

ooh we have I Run Code here?

lone gust
#

/run

#include <iostream>

int main() {
  std::cout << "can you run this";
  return 0;
}
rugged berryBOT
#

Here is your c++(10.2.0) output @lone gust

can you run this```
lone gust
#

woah thats cool

umbral mirage
#

/run bf ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

rugged berryBOT
#

Here is your bf(2.7.3) output @umbral mirage

Hello World!
umbral mirage
#

holy shit

#

/run bf +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.

rugged berryBOT
#

Here is your bf(2.7.3) output @umbral mirage

i love vencord```
umbral mirage
#

nice

lone gust
#

/run

System.out.println("A");
rugged berryBOT
#

Here is your java(15.0.2) output @lone gust

A
lone gust
#

/run

System.out.println("A".repeat(2000));
rugged berryBOT
#

Your java(15.0.2) code ran without output @lone gust

lone gust
#

oh wait what

#

/run

console.log("A".repeat(2000));
rugged berryBOT
#

Your js(18.15.0) code ran without output @lone gust

lone gust
#

/run

console.log("A".repeat(200));
rugged berryBOT
#

Here is your js(18.15.0) output @lone gust

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
lone gust
#

u scammer

#

wtf

umbral mirage
#

/run js "balls";

rugged berryBOT
#

Your js(18.15.0) code ran without output @umbral mirage

umbral mirage
#

/run js console.log(Array.from(100).fill("I EAT VENCORD USERS"));

rugged berryBOT
#

Here is your js(18.15.0) output @umbral mirage

[]
umbral mirage
#

i might be dumb

#

yes i am dumb

#

lmao

#

/run ```js
console.log(Array(100).fill("I EAT VENCORD USERS").join(" MUAHAHAH "));``

rugged berryBOT
#

Your js(18.15.0) code ran without output @umbral mirage

umbral mirage
#

/run ```js
console.log(Array(100).fill("I EAT VENCORD USERS").join(" MUAHAHAH "));

rugged berryBOT
#

Your js(18.15.0) code ran without output @umbral mirage

umbral mirage
#

uh what

lone gust
#

i already tested this

#

no need to test it more

#

the bot doesnt print out >2k characters bc it cant

#

smh

umbral mirage
#

did you get image sending permissions beacuse you boosted

lone gust
#

no

umbral mirage
#

how did you get that in 5 days

#

of being in this server

lone gust
#

i didnt

#

i got it within 2

umbral mirage
#

exactly

#

how

lone gust
#

hacking

#

on roblox

umbral mirage
#

omg

lone gust
#

ikr

deep mulch
#

/run ```c++
#include <iostream>
#include <vector>

int main() {
std::vector<int> bigVector;

try {
    while (true) {
        bigVector.push_back(1); // Keep adding elements until memory runs out
    }
} catch (const std::bad_alloc& e) {
    std::cerr << "Memory allocation failed: " << e.what() << std::endl;
}

return 0;

}

rugged berryBOT
#

Your c++(10.2.0) code ran without output @deep mulch

deep mulch
#

guh

lone gust
#

i asked chatgpt to help

#

gen code to see how to do that

#
function checkArguments(func) {
    const requiredArgs = func.length;
    const funcStr = func.toString();
    const allArgs = funcStr.match(/\(([^)]*)\)/)[1].split(',').map(arg => arg.trim());
    
    const optionalArgs = allArgs.slice(requiredArgs);

    return {
        requiredArgs,
        optionalArgs
    };
}

// Example function to test
function exampleFunction(arg1, arg2, arg3 = "default") {
    // Some logic
}

console.log(checkArguments(exampleFunction));
#

this is what it gave me

#

when ran it gives this output

cerulean plover
#

chatgpt blobhuskcozy

#

im sure using a regex will cause a huge explosion

lone gust
#

wtf

#

its not evaling

cerulean plover
#

dont delete

lone gust
#

{
"requiredArgs": 2,
"optionalArgs": [
"arg3 = "default""
]
}

#

thats what it returns

cerulean plover
#

the default value is useless garbage

#

and

lone gust
#

yeah true

cerulean plover
#

i still need the argument names anyway

lone gust
#

they dont need names

cerulean plover
#

we do need names

lone gust
#

just the option ones do

#

which it gives us the names of

dusty moth
cerulean plover
#

you can do ```jsx
<div children="hello world" />

lone gust
#

thats gay

cerulean plover
#

home of phobic much'

lone gust
cerulean plover
#

is making a joke JSX compiler really worth my time

#

(yes)

lone gust
#

exampleFunction.toString().match(/(([^)]*))/)[1].split(',').map(arg => arg.trim());

#

this give names and defaults

#

but we can cut out the default

#

@cerulean plover

#

it may be possible

dusty moth
#

parentheses in defaults

lone gust
#

and to get the function by string name you can run
eval("exampleFunction.toString()");

cerulean plover
#

yes

#

but we dont need to recompile the function at runtime

lone gust
#

this dream

#

it may be possible

umbral mirage
#

are you guys trying to make this weird jsx code work

lone gust
#

dont mind us

#

we're just 2 idiots doing idiot things

cerulean plover
#

We want to make a fucked up JSX compiler where everything can be a component

umbral mirage
#

i like this idea

#

i like it a lot

cerulean plover
#

stupid question

#

how will Fragments be handled

#

just turn it into an array?

lone gust
#

wdym fragments

#

yeah probs

umbral mirage
#

basically functions are components and arguments are attributes (props)?

#

i meant

dusty moth
#

how objects

cerulean plover
lone gust
#

<example optionalArg=true><Number>3</Number><String>aa</String></example> -> "example": {1: 3, 2: 6, optionalArg: true
@cerulean plover}

#

what abt this

#

and then we change example via the eval thing

#

and run eval(example(3, 6, optionalArg=true))

#

to run the function

cerulean plover
#

you do know you can do {3} inline in jsx

lone gust
#

oh

cerulean plover
#

for a number like that

lone gust
#

well yeah that then

lone gust
fathom haven
#

/run

console.log("@everyone");
rugged berryBOT
#

Here is your js(18.15.0) output @fathom haven

@​everyone
dusty moth
#
<let name="x">{3}</let>
<console.log>{x}</console.log```
cerulean plover
#

Any JS value

fathom haven
#

Oh

lone gust
cerulean plover
#

nop

fathom haven
#

Its true

dusty moth
#

v$ msg.reply("hi", { mentionEveryone: true })

cerulean plover
lone gust
#

its amazing

#

but not the {x} it should just be x

dusty moth
lone gust
#

p sure {x} = "x"

#

like 40% sure

#

i dont really use jsx

#

that mcuh

dusty moth
#

how did this not get automodded

cerulean plover
#

I'm thinking about how the JSX compiler will actually make this all work

dusty moth
#

@jannie* cleanup in aisle 4

cerulean plover
fathom haven
cerulean plover
fathom haven
dusty moth