#🧩-plugin-development

1 messages · Page 48 of 1

balmy sky
#

It works fine

polar cave
#

A ok

polar cave
shadow ruin
#

pong

jagged matrix
shadow ruin
#

i was busy doing something

jagged matrix
#

dont worry you're not missing out on anything important

polar cave
#

True

#

So what do i change it to?

#

How do i make my own custome dev thing

balmy sky
#

Did you read the plugin guide at all

jagged matrix
#

go to where all the authors are stored and create your own spot

polar cave
jagged matrix
#

not that hard

balmy sky
#

It obviously won't get accepted as a pr anyway

#

So

#

Just use your i'd

jagged matrix
shadow ruin
polar cave
jagged matrix
#

so im just providing an answer

jagged matrix
balmy sky
balmy sky
jagged matrix
polar cave
#

/mewing

#

It doesnt work

#

lol

#

Bru what did i do wrong?

versed osprey
#

@balmy skylook in dms

balmy sky
#

Do you actually understand how the plugin you made works at all lmao

#

I reccomend you actually go read the plugin guide, read the source code, and make some other plugins

balmy sky
#

Instead of just making api request commands with the wrong properties

polar cave
#

Alr ill do that

#

Ill be back

jagged matrix
polar cave
#

/mewing

#

Bru

#

Wut

#

Ill be back

#

"True friendship is a plant of slow growth, and must undergo and withstand the shocks of adversity, before it is entitled to the appellation." -George Washington

glass oracle
#

who?

fathom carbon
#

its a good thing this doesnt work

balmy sky
#

It very much is

#

(also, i'm considering making a pr with an option to pin plugins to the top of the list for quick config access. Would anyone be interested/actually use this?)

vast karma
#

I added a tag to all my plugins so I can find them with the searchbar

fathom carbon
#

if you want it go make it

balmy sky
#

:3

#

Alr

balmy sky
#

Are there any extra steps for installing a package for use with a plugin other than just installing it? as far as i can tell, once i build it just isn't seeing the dependency and says that all of the functions being called "arent a function"

dull magnet
#

more context

#

what package, how are you using it

balmy sky
#

Mb

#

I'm trying to use jimp to make a quoter plugin that adds a context menu option to create a quote image

#
#

I get this error when i try to call jimp.read

dull magnet
#

don't add that

#

you can easily do it with canvas

balmy sky
#

Oh word

strange quail
#

<print>"hello world!"</print>

#

🔥🔥🔥

oblique lark
shadow ruin
#

here's my username

jagged matrix
#

for two i literally cant change it

stuck herald
#

have you tried useradd and moving your configs

oblique lark
#

god my old cursed.js fork is so bad

new Function(Array.from(block.children).map(compileTag).join`\n`)()
jagged matrix
stuck herald
#

lol

jagged matrix
#

i cant be bothered as much as it pains me

jagged matrix
#

but windowsss so convenieenttt

shadow ruin
jagged matrix
#

erm no because you shave with razors

balmy sky
#

Am i trippin or is there no user property for display name

austere mauve
#

trippin

oblique lark
#
/**
 * @param {Element} node
 */
const compileTag = node =>
  ({
    if: `if(${node.getAttribute`cond`}){${compileBlock(node.children)}}`,
    return: `return ${node.getAttribute`value`}`,
    print: `console.log(${node.getAttribute`value`})`,
  }[node.tagName.toLowerCase()])

rate my code sillycat

austere mauve
#

not in the member obj it seems

balmy sky
austere mauve
#

globalName

#

these types are outdated

balmy sky
#

Ah

#

Quote plugin swagsunglasses

austere mauve
#

real

green vessel
#

how would i force my vencord client to join a vc?

vague echo
#

sorry, I have most channels muted so didn't follow-up on you that day;
i basically wanted to show mutuals between friends servers

vague echo
green vessel
# vague echo why would you do this

im in a server where i got bullied a lot :( i cant leave because i have really good friends in there and its a good place to hangout but there are some mod abusers the owner doesnt do anything. so my end goal is to prevent them from spam disconnecting me or spam moving me.

#

im not new to programming or vencord plugins but i never messed with voice before

kindred sentinel
#

I would have wanted the same sort of plugin some time ago

vague echo
#

you could spam join vc but it's going to be super flaky especially with rtt connections

#

then again, they can just block your access from the channel so no point in doing this

green vessel
kindred sentinel
#

also used to be in a server like that lol

#

get the message across that something needs to change

#

I would start by confronting them

#

And then start making your own private space if it doesnt work out

#

they might get the message with the decreased server usage

#

but then you either helped the original server, or started a new one anyway

#

yes, you could make a plugin to rejoin, but its not solving the root problem

#

sorry for the infodump, this has happened more times than I liked to me

#

actually popped in to ask someone how difficult it would be to modify the Discord Events section to look more like a traditional calendar style view

#

I have some node.js knowledge, but this would be my first try at a plugin

#

Was wondering what the best way to implement a 'Calender Channel' sort of thing that Gilded has

#

but Discord already has the Events backend, which would save lots of hassle

#

Honestly just want it to look more like the month view thats typical with Calendars

#

I also say Plugin because I doubt theres enough info in the html to make it just a theme, although that would be very cool

balmy sky
#

Quoter plugin progress

balmy sky
jagged briar
balmy sky
#

:3

#

Way 34209723484 of laughing at annoying people

#

Is there a way i can pass parameters to a modal when using openModal? i assume there is and i'm just being an idiot

jagged briar
#

openModal takes in a function that returns a modal component

#

You can do whatever with the modal component

polar cave
balmy sky
#

Thanks :P

#

Also, is there a way i can await a promise funtion from within a react component? whenever i try to, i just get this error

#

The relevant code:

<img src={await createQuoteImage(recentmessage.author.getAvatarURL(), recentmessage.author.username, recentmessage.content)} style={{borderRadius: "20px", width: "100%"}}></img>
async function createQuoteImage(avatarUrl: string, name: string, quoteOld: string): Promise<string>
      action={async ()=> {
        openModal(props => <ModalTest {...props}/>);
      }}
balmy sky
#

Rip

jagged briar
#

Ig you could make a state and use an asynchronous useEffect to set the state when you await whatever you need

#

But you can’t make a react component itself async

polar cave
balmy sky
#

Congratulations sherlock

#

That's it's biggest inspiration lmfao

polar cave
#

O

#

Well

#

Dam

#

Your sarcasm is wild blobcatcozy

balmy sky
#

Phat oof

#

I'm gonna have to rethink like everything then

#

ok right, next dumbass question, is there a function to attach a file?

polar cave
#

This chanel made me realize how dumb I actually amb

balmy sky
#

Don't worry

#

Asking dumbass questions in here is a universal experience for the first, like, year of being in the server

polar cave
#

Thanks

balmy sky
polar cave
#

😭

balmy sky
#

Lil demo if anyone cares trolley

polar cave
#

Very nice plugin

balmy sky
balmy sky
#

I'll also be able to do the send message feature once i actually figure out how to attatch a blob

#

(or just send the file)

polar cave
#

Cool

#

That sounds epic

kindred sentinel
#

Looking at the index, it rejoins if you get moved aswell

balmy sky
#

Very much selfbotting

trim cedar
#

That would also be pretty useful

kindred sentinel
#

or something that allows you to get a better gauge on the week/month

#

more visual

versed osprey
#

You can prob make a plugin for that with your own menu idk if u can do that with css

kindred sentinel
#

Yea I don't think "Tomorrow at xx:xx" would be very usable in a theme

#

I was just wondering how difficult or big that kinda project would be expected to be

versed osprey
#

It wouldn’t be a 1 day project I can tell you that

#

You will have to make your own menu make a patch for placing the button to open it where u want it logging all the events then display them in there how u want to

kindred sentinel
#

wait a second, moxxie, we havent spoken in ages 😭

#

I just realised who you were lmao

versed osprey
#

Ya I recognized you wanted to see if u recognize me lol

versed osprey
kindred sentinel
#

thats crazy

versed osprey
#

Fr

versed osprey
kindred sentinel
#

true

#

and it will probably end up on the pile of unfinished or jank projects 😭

#

also, do I have to make my open menu? cant I just sabotage the already existing ones

#

or is that not how it works

versed osprey
#

But I finished it with friends at some point

kindred sentinel
#

OH THAT WAS YOU

#

OFC

versed osprey
#

lol

kindred sentinel
#

literally just git cloned that lmao

versed osprey
#

Ty that means a lot

kindred sentinel
#

I am a sucker for niche things

#

which is also why I am worried that nobody else would find a use if I ended up making it

versed osprey
#

There would probably be be a few ppl that would use it

kindred sentinel
#

hmm, yea probably

#

do you think discord would implement something like it themselves within a recent timespan?

#

they have acknoledged that its a more general chat app now, so organising events would be a very useful feature

versed osprey
#

Na discord only adds shit that they can make money on

kindred sentinel
#

did they somehow make money off of the mobile update?

#

everyone hated that for a good while

#

but I like the ui now

#

idk

#

ill think about it again when I'm not juggling other projects

versed osprey
kindred sentinel
#

the ultimate setup would be to have a discord bot alongside it all to sync the events to a public Ical which could be added to whatever calendar app you used

#

but also give announcements when new events are created and edited

#

oh, and a new forum post for every event, to discuss it

#

havent found anything that does it all yet

versed osprey
kindred sentinel
#

but then I would have to have my client on all the time?

#

it was more of a server enhancement

#

so the bot adds on to the functional side of the events

versed osprey
#

But I would need a bot on 24/7 if not

kindred sentinel
#

and the plugin adds on to the ui

kindred sentinel
#

just host it on oracle

versed osprey
#

Ya but it would make it more complicated for ppl to use

kindred sentinel
#

oh, the bot and plugin are seperate things

versed osprey
#

Oh ok

kindred sentinel
#

but they come together to make a great experience

#

sry, that wasnt v clear

versed osprey
#

All good my brain is just liquid at this point

kindred sentinel
#

you better have just been waking up

#

and not be like me and havent slept yet

versed osprey
kindred sentinel
#

damn

versed osprey
#

It’s almost 11 am and I started school today at 8:30 so I woke up at like 7 something

kindred sentinel
versed osprey
#

Today I have a bit of a short day I finish at 3:20 pm

balmy sky
#

Banger quote

kindred sentinel
#

😭

versed osprey
#

@balmy sky did u get the plugin to send the pic now or did u not find how to yet?

balmy sky
#

Nope, still haven't figured it out

#

I can't find any examples

versed osprey
#

I can try to look through some plugins in chem class I’m failing it anyways

balmy sky
#

🗣️

versed osprey
#

;3

balmy sky
#

Yes king fail your chem class for the greater good

versed osprey
balmy sky
versed osprey
#

I’m shit at chem

balmy sky
#

Dude even if you didn't know the answers you'd get a 50/50

#

How the fuck did you manage that

versed osprey
#

It was all open questions that I had to explain husk

balmy sky
#

Makes sense

versed osprey
#

Chem is hard lol

#

But I’m forced to learn it

trim cedar
#

Chem also wasn't my cup of tea

#

It was interesting but damn I was so bad at it lmao

#

I could luckily drop it later on

versed osprey
#

And it would be a lot more work trying to get up to speed on a different subject

trim cedar
#

True

green vessel
balmy sky
stable ridge
#

hell yeah

polar cave
#

🤝

balmy sky
green vessel
#

is there any way to send/receive data from an already active voice connection?

amber basin
#

what kind of data

green vessel
#

voice?

dull magnet
#

in what context

#

provide more info

#

in a plugin? in a discord bot?

green vessel
#

in a plugin

versed osprey
potent fox
#

I just got a idea

#

running a game server through discord voice chat

#

low latency udp

thick delta
#

i just turnd on all the plugins

#

dang

thick delta
polar cave
polar cave
potent fox
#

everything is technically just binary

#

instead of audio data if we can send our own data it would work

thick delta
potent fox
#

tho discord probably does some processing and some checks

polar cave
potent fox
#

@clear parcel is it possible

thick delta
#

dang

#

dat sexy

#

i wan it

#

too poor

frigid bay
polar cave
polar cave
versed osprey
potent fox
#

problem is discord processing/validating

versed osprey
polar cave
versed osprey
green vessel
#

to record voice calls

versed osprey
#

just use obs for that

green vessel
#

doesnt work for recording one person only

versed osprey
#

i dont think there is a way to only record 1 person

#

all the audio comes in at once

green vessel
#

i know there is, i've done it with @discordjs/voice lib, but that doesnt work when you have an existing connection

versed osprey
#

with discord bot?

green vessel
#

yes

versed osprey
#

idk then

potent fox
# polar cave How would converting it work

just regular serilization, most games just sync several elements like positions, moves etc. you convert all these into binary (like position is vector3 aka 24 byte int) then send, and parse it the same way in other end

frigid bay
#

24 bytes

#

Waste of space

fathom carbon
#

25 bit int when

sage geyser
#

I WAS GOING TO ASK SOMETHING and forgot I did a \w replace in text replace im dying it was just a wall of woofs on my end 💔

frigid bay
#

wall of what

sage geyser
#

woof

#

the word woof

#

huge text wall that was flagged as spam

frigid bay
#

lol

versed osprey
untold roost
#

no i just eated it all

sage geyser
#

anyways I don't know the proper chat to ask this, but I wanted to know if it was possible using the current version of text replace to have a list of possible replacements, rather than very simplistic text replace.

Like, for example you could randomly choose between 4 words the randomly appear in between other words

i'm not good at regex so idk if its a lack of knowledge or a lack of functionality

versed osprey
frigid bay
#

ive heard of work being done on a better textreplace i think

sage geyser
#

blurgh :(

I just want my homestuck typing quirk functionality 💔

frigid bay
#

my condolences

sage geyser
#

yeah its truly a shame

sage geyser
#

I was thinking of working on a custom version of the plugin so I can like, have "loadouts"

#

and easy toggle on/off of specific ones rather than deleting them

#

but if someone else is doing it idk if I'll bother

versed osprey
#

it shouldn't be to hard to make if u want to make it

#

ahhh i cant spell lol

sage geyser
#

hm

#

maybe

polar cave
potent fox
frigid bay
#

anything can be data

#

bytes are data

polar cave
frigid bay
#

theyre all made of bytes

polar cave
#

A

#

ok

#

All electronic data are considered bytes?

dull magnet
#

not considered

steady knot
#

or bits, not everything necessarily is stored/transferred as whole bytes but usually they are

dull magnet
#

they are bytes

#

everything is bytes

frigid bay
#

everything on ur pc is bytes

#

which are made of bits

#

code data

polar cave
frigid bay
#

its like how words are made of letters

#

every sentence is made of letters

#

or characters or whatever

polar cave
frigid bay
#

bit

polar cave
#

ok

#

And biggest?

dull magnet
#

/run ```sh
echo byte jumpscare | hexdump

worldly oxideBOT
#

@dull magnet I only received sh(5.2.0) error output

file0.code: line 1: hexdump: command not found
dull magnet
#

HOW

#

HOW DO YOU NOT HAVE HEXDUMP

frigid bay
oblique lark
#

husk

frigid bay
#

its all made of bytes which are made of bits

oblique lark
frigid bay
#

^

oblique lark
#

since things like kilobyte and gigabyte are just different amounts of bytes

dull magnet
#

the base unit is technically a bit

but usually you store things as bytes, aka 8 bits

polar cave
#

So wahts 64 bit for an app, as an example

frigid bay
#

if an app is 64bit that means its meant to run on a 64bit cpu

#

if thats what u mean

oblique lark
#

the entire internet is measured in zetabytes

frigid bay
#

not any 64bit cpu

polar cave
frigid bay
#

yeah

dull magnet
#

64/32 bit refers to the size of the addresses

polar cave
polar cave
frigid bay
polar cave
frigid bay
#

but yea its mainly address size

dull magnet
#

you're asking too many questions

frigid bay
#

lol

polar cave
dull magnet
#

yes

frigid bay
#

true

dull magnet
#

you should read an introduction to bits, bytes & binary numbers

frigid bay
#

In computing, a memory address is a reference to a specific memory location used at various levels by software and hardware. Memory addresses are fixed-length sequences of digits conventionally displayed and manipulated as unsigned integers. Such numerical semantic bases itself upon features of CPU (such as the instruction pointer and incrementa...

polar cave
#

Thanks for the explaintions

frigid bay
#

np

dull magnet
polar cave
frigid bay
#

just memory location

oblique lark
#

did you know that ronna- and quettabytes were invented only two years ago

frigid bay
#

everything in memory is at a location

dull magnet
# polar cave What is addresses?

basically you have computer memory / ram

you can imagine it as a a long band of boxes. each box can store one piece of information

to later retrieve data you stored, you need to remember which box you put the info in. each bit is one box

let's say you put it into box 100. your address is now 100 and you can efficiently access the data at that location

that's how memory works. you put something at some location and remember the address

32 bit numbers have a fairly low limit of 4 million, which means you cannot have addresses for memory areas beyond 4 million bytes (4gb) . 32 bit systems are limited to 4gb ram

64 bit solves that by making addresses twice as long which means you can store much much larger numbers and use terabytes of ram

frigid bay
#

old systems like video game consoles had a cool thing where u could use more ram than the cpu allowed u to

#

bank switching

#

its more complicated ofc and u shouldnt know about that bc its irrelevant today but

#

thought it was cool to add

thorn drift
frigid bay
#

oh cool didnt know

#

i only rly know about it bc of old game consoles

#

NES etc

polar cave
frigid bay
#

it doesnt make anything faster

#

only gives u more space

thorn drift
# frigid bay oh cool didnt know

if you have a super cheap mcu and it only supports like insert whatever small value depending on how you define cheap we can use it to have a reasonable amount for whatever the task is

frigid bay
thorn drift
frigid bay
#

^

polar cave
dull magnet
frigid bay
#

^

thorn drift
#

16 exabytes is absolutely insane

polar cave
frigid bay
#

32bit is only like 4gb

thorn drift
dull magnet
#

32 bit limit = 4gb ram
64 bit limit = 16 million tb ram

frigid bay
#

yeah i was about to say

dull magnet
polar cave
#

lol

dull magnet
#

go on youtube and search for introduction to bits & bytes or smth like that

#

you'll probably find many good videos

polar cave
polar cave
thorn drift
thorn drift
frigid bay
#

but how does the cpu write to those locations

#

actually

#

nvm

#

virtual memory

#

i forgot

polar cave
frigid bay
thorn drift
# frigid bay virtual memory

"With PAE, the page table entry of the x86 architecture is enlarged from 32 to 64 bits. This allows more room for the physical page address, or "page frame number" field, in the page table entry. In the initial implementations of PAE the page frame number field was expanded from 20 to 24 bits"

thorn drift
#

but the concept of computers having memory is older than computers

polar cave
frigid bay
#

ye makes sense

frigid bay
#

no searching going on

polar cave
frigid bay
#

would be slow

#

addresses are stored

thorn drift
#

and apparently Robert Dennard invented NAND so that's super cool

frigid bay
#

then accessed

vast karma
#

The computer knows exactly where everything is in memory

frigid bay
#

yeah or more so the software

thorn drift
polar cave
frigid bay
#

there is no searching

vast karma
#

It does not need to search, because it knows where things are

polar cave
#

So it just picks out the data the computer needs?

thorn drift
frigid bay
#

memory leaks are from not deallocating things from the heap

#

not from "not knowing where everything is"

frigid bay
#

each box has different types of clothing

#

u want underwear

thorn drift
#

so your telling me, deallocation would not be included in "knowing where everything is"

frigid bay
#

u dont search in every box for underwear

#

u know which box has underwear

#

bc u remember or have it saved

polar cave
frigid bay
#

not really

thorn drift
#

we can externally write to memory and the system won't be aware of it, that's how some hardware exploits work.

thorn drift
#

so the system is aware of memory that it wrote and stored the address of in the page table

polar cave
#

Holy ;(, ill be back after reading and researching a bit

thorn drift
austere mauve
#

everything in memory has an address

#

and can be accessed instanteneously thru that

frigid bay
#

^

#

the addresses are stored kinda directly in code

#

if that makes sense

thorn drift
austere mauve
#

shut the fuck up no one cares

frigid bay
#

^

vast karma
#

If you want to visit your friend, you don't search through all houses on the street, because you already know they live at number 98

frigid bay
austere mauve
#

UHM AXHUALLY

thorn drift
frigid bay
austere mauve
#

no i hate you

#

already

thorn drift
#

unpopular takes only

#

don't expect popular takes

frigid bay
#

someone curioous about something is asking how memory works then u talk about hardware exploits and memory leaks

thorn drift
#

yea because its important

frigid bay
#

yeah and they know Nothing about thos things and werent asking about htem

thorn drift
#

that's why we explain it

frigid bay
#

They dont even know how memory is accessed

austere mauve
#

this is the guy who thinks uis should be written in pascal instead of electron

thorn drift
#

if you don't initialize the memory first it will have random garbage data in it

thorn drift
#

it would be about 10x faster lmao

austere mauve
#

and 100x uglier and less accessible

frigid bay
#

me when i only think about performance and ignore everything else

thorn drift
#

and pascal isn't even that fast of a language

thorn drift
austere mauve
#

lamo

thorn drift
frigid bay
vast karma
#

Be honest here — do you honestly believe that if Discord Inc. wrote Discord in pascal instead of js, it would be less of a shitshow than the current js version?

thorn drift
#

libgcc7 has been trying to compile on my ppc g4 for 9 hours now btw laughemoji

thorn drift
vast karma
#

The compiler is right over there

#

Get on with it

thorn drift
#

we already have a 3rd party reimplementation that doesn't use web frameworks and its comically faster

thorn drift
vast karma
#

But it's not pascal

thorn drift
thorn drift
#

so basically electron < pascal < c++ but writing in c++ is harder

austere mauve
#

the only compiler I care about is the Glorious Glasscow Haskell Compiler

thorn drift
#

oh no don't bring up haskell

#

scary

#

its cool for research tho

austere mauve
#

u can say Glasscow instead of Glasgow and no one will notice

thorn drift
thorn drift
#

emotionally difficult but conceptually trivial describes so many things lol

#

like me fighting cmake

balmy sky
#

Wtf why can't a create a fork 💀

#

Am i stupid

#

Nevermind, i was indeed stupid

thorn drift
#

you didn't set a valid name, probably

jagged matrix
balmy sky
#

Just gotta whip out a plate

clear parcel
#

they technically still function

#

this is already a feature

oblique lark
#

oh hell yeah

#

js doesnt know what indexing is

jagged briar
#

prob means that n is indexing out of bounds

oblique lark
#

yeah it is i just thought that the error message was funny

sage geyser
#

How do select dropdowns work? I thought it'd just take an array but clearly that isn't the case.

vast karma
#
interface SelectOption {
    disabled?: boolean;
    value: any;
    label: string;
    key?: React.Key;
    default?: boolean;
}
sage geyser
#

oh thank you!

dull magnet
#

unfortunately only work with one option
there are multi choice selects

sage geyser
#

i didn't know that, that's cool

sage geyser
vast karma
#

{ label: "Four", value: 4 }

#

That's all there is to it

sage geyser
#

but then it says this

#

unless

#

no that didn't do anything either

jagged briar
#

options is an array

#

not an object

#

you are defining it with {} not []

vast karma
#

The outer {} denotes the jsx attribute value

jagged briar
#

oh yeah you need {[...]}

#

forgor this is react

sage geyser
#
<Select // This adds in a function dropdown! Unfortunately only works with one function at a time :(
  placeholder="Choose a function for your replace field (Note, these are advanced)"
  options={
    [label: "4", value: "4"]
  }
  select={opt => functionSelected(opt, index)}
/>

this spits out a parse error on label, and makes opt not work properly anymore? I assume because it not an any type anymore

#

specifically the entire {} after select

jagged briar
#

nop

#

do you know how arrays/objects work

sage geyser
#

For the most part, yeah

#

in TS? no

jagged briar
#
options={[
  { label: "4", value: "4" }
]}
sage geyser
#

I thought I tried that wtf gimme a second

#

omg i feel like an idiot

#

apologies i woke up like an hour ago 💔

jagged briar
#

you good

sage geyser
#

though now I get this error on the Select class type

vast karma
#

Seems to say it's missing isSelected and serialize properties

sage geyser
#

hm alright i'll add those

#

oh yeah I thought they had ? on the ends yeah

dull magnet
sage geyser
#

idk why the drop down is twice the size of the normal fields creature

#

actually wait i might be stupid

#

ok that was not it

dull magnet
#

are you trying to improve text replace

#

someone did that alr

sage geyser
#

i was

dull magnet
#

still need to review it

sage geyser
#

and I didn't know that was finished

#

not was, am*

obsidian flame
#

is there a way to quickly load a custom plugin in vesktop?

oblique lark
#

it's that simple :3

document.addEventListener('DOMContentLoaded',()=>document.querySelectorAll`deadfish`.forEach(block=>{let n=0;Array.from(block.children).map(node=>node.tagName.toLowerCase()).forEach(instr=>{n={inc:n=>n+1,dec:n=>n-1,sqr:n=>n*n,out:n=>{console.log(n);return n}}[instr](n);if(n==256||n==-1){n=0}})}))
potent fox
#

Lobby managers are dead since may 2023 I think

polar cave
oblique lark
#

no that was completely unrelated to that guy's question

polar cave
#

O

#

lol

#

Mb

oblique lark
#

that was my attempt at a deadfish interpreter for html

polar cave
#

Whats deadfish?

#

Ill brb

oblique lark
polar cave
polar cave
sage geyser
#

does anyone have proper docs on the webpack common stuff?

#

currently wracking my brain trying to figure out why this code:

                                    <Select // This adds in a function dropdown! Unfortunately only works with one function at a time :(
                                        placeholder="Choose a function..."
                                        options={[
                                            {label: "No Function", value:""},
                                            {label: "Uppercase Function", value: "upper"},
                                            {label: "Random Function (input a list like: a, b, c)", value: "rand"},
                                            {label: "Lowercase Function", value: "lower"}
                                        ]}
                                        select={opt => functionSelected(opt, index)}
                                        isSelected={val => isSelect(val, index)}
                                        serialize={val => val}
                                    />

makes it so each dropdown option is enabled at once, and are un disableable

#

isSelected confuses me :(

nova wraith
#

noice

polar cave
#

He codes good fr

#

Anyone knows why this wont work lol after i put the command it comes back with /mewing

balmy sky
#

Dawg how in the everloving fuck do you leak your api key every time you ask for help with this plugin

polar cave
#

I deleted it💀

#

Just now

balmy sky
#

Message loggers:

polar cave
#

Lol💀

#

Ik

#

Bur

#

But

#

😭

clear parcel
#

the discord api portion is still there

potent fox
clear parcel
#

yes

#

try a POST /lobbies

potent fox
polar cave
#

What does that do?

#

Is that just a manifest.json

potent fox
#

this has nothing to do with manifest

#

its just a regular json response

polar cave
#

O ok

#

Lol

balmy sky
#

Is there a way i can get the react component of the emoji picker to use as an input for something?

glass oracle
#

it's going to be painfully harder than just writing your own

balmy sky
#

Oofff

glass oracle
#

if you're trying to add the emoji picker to a slate component then it'll be a little less harder

balmy sky
#

I probably won't bother then since it's not that big a deal

#

Was gonna use it as a shortcut for adding emoji names in a plugin config instead of just typing it but eh

trail talon
balmy sky
#

I'm kinda confused on how prs work, once a pr gets approved does that mean it gets merged? or does something else need to happen

jagged briar
#

An approval just means “all good, I approve of this pr” but that doesn’t mean it’ll get merged

balmy sky
#

Ah ok, i get it :3

jagged briar
#

A maintainer has to review and merge it

versed osprey
balmy sky
#

💀

versed osprey
#

sadge

#

it should get accepted fr fr

jagged briar
#

waiting until someone actually wants to merge them to update them

#

maintainers can make it not out-of-date when they merge

versed osprey
#

oh idk on my pr i just update when it says out of date 🫠

#

so you are telling me i dont have to update it every time? just wait for it to get accepted?

gusty maple
#

As long as there isn't a merge conflict and you have allowed edits by maintainers yis

#

They can just click the button for you

#

Not sure how it is when you disable that setting

versed osprey
#

oh well thats new

#

ive been updating it since november last year when i did the pr

gusty maple
#

It's been like thst for a while I think

versed osprey
#

y did no1 tell me this

gusty maple
#

Idk it's been a few years since I had full access to a report that ppl did prs on lmao

versed osprey
#

i just spent way to much time making sure that the pr was up to date husk

gusty maple
#

As long as there's no conflicts it should be fine

versed osprey
#

also sam got lucky it took them like an hour for the quots pr to get accepted :3

gusty maple
#

(Also depends on the devs of the project I guess but also usually ppl just enable auto merge and if they don't make the pr up to date then you can just do it)

frigid bay
#

remember that person that wanted to pay vee to review their pr

balmy sky
#

Twas just approved

#

Hasn't been merged yet

versed osprey
#

oh

balmy sky
versed osprey
#

same thing

balmy sky
#

Ittl probably be merged soon tho

#

hopefully

gusty maple
# versed osprey

Both my prs got merged pretty fast too (to be fair it was ±1 line each time and I just fixed matches but hey)

frigid bay
#

a contribution is a contribution B)

versed osprey
#

me fres and echo worked on it

#

it was fun

gusty maple
#

One time it was clips the other time it was the app tag

gusty maple
versed osprey
gusty maple
#

Oh

#

Didn't i even talk with you about that back then lmao

versed osprey
#

idk

gusty maple
#

November so long ago

#

But it sounds familiar

balmy sky
gusty maple
#

Guh

cedar olive
gusty maple
#

Whar

cedar olive
#

nop´.

gusty maple
#

Rude

versed osprey
gusty maple
cedar olive
#

🤨

gusty maple
cedar olive
#

deal

gusty maple
#

Menace

#

There's nothing better than flipping your pillow and it being cold

balmy sky
#

How could i make a context menu patch for right clicking emojis in messages? i can't really tell how based on any other patches that do the same thing

#

Ah i see,

#

FavouriteableId

jagged briar
#

i love steelseries gamesense api

#

and you do ONE thing wrong and it just sends back "Something bad happened"

#

no explanation

rapid totem
#

Is the funny client on mobile

jagged briar
#

vns

shrewd tundraBOT
balmy sky
#

Added a context menu option to nodefaultemojis

#

Now you can right click an emoji to remove or add it to the autofill whitelist

#

:P

#

Gonna PR it when i can be bothered to put up with githubs bullshit once again (the site is fine i'm just stupid and refuse to admit it swagsunglasses )

gusty maple
#

Not hard

pure cradle
#

can someone help me make a thing for vrc that sends webhook when someone leaves a server using vrcx

jagged briar
#

yet the server returns 500

#

steelseries does not know how http codes work

fathom carbon
#

what do you mean "help me"

#

what do you need help woth

pure cradle
#

nvm i got it chat gpt saving my life rn

#

ok nvm

#

im using vrcx im trying to get a webhook to send to a server when someone join or leaves

sage geyser
#

i actually managed to get awrf what I wanted working im woof so happy

pure cradle
fathom carbon
#

right.

#

what do you need help with

dull magnet
#

wtf is vrcx

fathom carbon
wide sandal
polar cave
lean acorn
#

hi guys how can i make a plugin for vencord 🔥 🗣️

lean acorn
#

Thanks 👍🤓🤓

polar cave
#

I don't know anything

warped shell
#

hey y'all wanna see something cursed?

polar cave
stable ridge
warped shell
stable ridge
#

what the fuck is this

#

absolute insanity

polar cave
warped shell
stable ridge
#

yes but what the fuck

#

who would do this

warped shell
#

me

polar cave
#

@warped shell she ^

stable ridge
#

I'd go insane before writing allat

warped shell
stable ridge
#

(not that I'm already insane)

warped shell
#

i did replace the last 2 with a proper lexer tho

#

but this is an abandoned project anyways

#

i just wanted to see people's reactions to my masterpieces

polar cave
warped shell
polar cave
#

Bro tf 💀, can you explain in more simpler terms please

warped shell
#

no

#

sorry

#

i legit suck at explaining in simpler terms

polar cave
#

No worries lol. I was just bored

pure temple
teal relic
#

any way to get rid of the way discord handles shift clicks? shift clicking on a DM opens a browser

austere mauve
#

dont hold shift i hope that helps

polar cave
#

Lollll

vast karma
#

If avoiding holding shift is difficult, you can try using a flat object such as a screwdriver to remove the key from your keyboard

polar cave
pure cradle
jagged briar
#

Easy

  1. Receive the event from vrcx
  2. Send message to webhook
  3. ???
  4. Profit
polar cave
#

Great outline

#

Easy to follow

#

Very logical

#

🔥

fathom carbon
#

made anything so far

pure cradle
#

nah tbh

fathom carbon
#

or are you asking "make this program for me"?

pure cradle
#

yes LOL

#

im to sped

jagged briar
frigid bay
#

lol

grand haven
#

since this is the place for de-factor cursed JS, does any1 know if i can override the scope of a function? TLDR I want to import a module from some remote endpoint like:

const mod = await import('http://github.com/file.js')

but I don't want it to have access to shit like localstorage, window etc, is that even possible?

vast karma
#

I don't think js supports sandboxing

austere mauve
#

its not possible to do this safely

viral roost
#

yeah, not possible

austere mauve
#

why do you need that though

#

why is the code untrusted

viral roost
#

if you're just importing a script from github and are scared of malicious updates pin the link to a specific commit

grand haven
#

say tachiyomi's extension system

#

but for a JS app

#

that's the simplest way I can describe it

#

but I don't want the extension to have access to everything the app is running

#

I'm considering loading the extension code inside a web worker

#

that would pretty much accomplish my goal i think?

fathom carbon
grand haven
# fathom carbon weeb

again, it's just a comparison so you can quickly understand what I'm doing and what's my end goal

grand haven
#

so if a 2iq user imports some malicious 3rd party extension

#

its GG?

austere mauve
#

yeah thats pretty much every extension system ever

grand haven
#

yeah

#

or i could simply sandbox it

austere mauve
#

theres no good way to hide stuff like this

grand haven
#

I think web workers would do this best tbh?

austere mauve
#

one can do prototype pollution and completely bypass everything

fathom carbon
#

if some dumbass user installs an extension like that why care

#

its not your job to be 100% stupid-idiot proof

austere mauve
#

just dont

grand haven
#

aka the one extension that's running for that worker

austere mauve
#

the worker has access to the window

grand haven
#

what?

grand haven
austere mauve
#

not DOM i guess but its really not a sandbox

grand haven
#

it has indexedDB, but fortunately i dont use it

#

so I think that's the best solution

#

welp sorry for the chaos then, I solved my own issue

#

just use web workers

#

i thought there'd be some fancy proxy or new Function().bind() hacks

#

but i guess not

dull magnet
#

yes web workers work

#

or iframe with different origin

#

@grand haven (ping to make sure u see)

#

that blog post is very good

grand haven
#

but than you for the ping

dull magnet
#

how?

#

iframes are entirely safe

#

anyway read the blog post

#

:p

#

they use a combo of realms and iframe

grand haven
#

I'm sticking to web workers as they are really easily implemented in my build pipeline, and i can use comlink to initiate good IPC between them

grand haven
#

unless i host a new origin online

#

[electron app]

#

since its same origin, it has access to localstorage

#

:/

dull magnet
#

no

#

null origin

#
<iframe srcdoc="<html>" sandbox="allow-scripts"></iframe>
#

this is safe

grand haven
#

when u use srcdoc it autoinherits tho?

#

iirc?

#

i remember testing this when using the HTTP header for threaded iframes

austere mauve
dull magnet
#

if you don't add sandbox it will run it in the same origin

grand haven
#

TLDR the idea was to make a polyfill for worker

#

with iframes

#

that's actually async

dull magnet
#

you dont add sandbox at all

grand haven
#

hm

#

more testing then

#

cba tho

balmy sky
#

Where do the ping sounds actually originate from? gonna try to make a custom sound plugin

dull magnet
# grand haven hm
<iframe sandbox="allow-scripts" srcdoc="<script>console.log('hi')</script>"></iframe>

<script>
document.querySelector("iframe").contentWindow.document;
</script>
#

actually thats file:// url but it should be similar when you host it on http

grand haven
#

yeah iframe would work

#

workers feel way less hacky

dull magnet
#

but also have to serialise everything

#

if you're passing large data worker will perform much worse because of the serialisation overhead

#

like video data or smth

#

is this for ur webtorrent thing

dull magnet
#

there is already a plugin for that

dull magnet
grand haven
grand haven
dull magnet
#

im saying it serialises everything under the hood which can lead to horrible quality

dull magnet
grand haven
#

not a real problem

dull magnet
#

is it though?

#

it was fairly slow for me with not too large strings

#

try sending a 1mb string to a worker

#

maybe i was doing something wrong dunno

grand haven
#

yeah you defo were

#

I have a 3D rendering library which renders in worker

#

transfers to main thread

#

and that has a throughput of like 3GB/s

dull magnet
#

actually i was sending a very large json object

#

with thousands of nested keys

#

maybe that's why

grand haven
#

maybe yeah

#

mine were giga flat

#

just an array of data

dull magnet
#

well transferring arrays is probably the most efficient thing ever

#

especially if you use typedarrays

#

typedarrays are incredibly fast it's insane

grand haven
#

but yeah

#

this returns

dull magnet
#

btw why did you want to polyfill workers

#

don't tell me you want to support ancient browsers

grand haven
#

nop

#

i wanted webrtc in an async thread

balmy sky
#

I couldn't find it

dull magnet
#

pr

grand haven
#

essentially: query worker with anime id, episode number an id, and expect infohashes in return

#

because i'm publishing to play store

#

and not having an extension system for piracy is suicide

#

TLDR i got nodejs to work on android

#

so i did webview + nodejs thread [something like a worker]

#

so you almost got electron on android

dull magnet
#

agony

#

why would u use nodejs

#

and not java

#

😭

grand haven
#

WHY WOULD U USE JAVA

dull magnet
#

vendroid is java + webview

grand haven
#

WHAT THE FUCK

dull magnet
#

cause its native

#

nodejs on android is insane

grand haven
#

you want me

#

to re-write 8MB of JS libraries

#

into java?

#

are you batshit insane?

dull magnet
#

well you didn't mention those libraries

grand haven
#

touche

dull magnet
grand haven
#

but yeah

#

TLDR this allows me to re-use

#

my electron code

#

almost 1:1

#

in android

#

without much changes

#

maybe like 20 LOC

dull magnet
#

people with old phones will cry

grand haven
#

nope

#

its so fast its crazy

#

i ran it on my smart tv that has like 2gb of ram

#

you dont realise just how insanely fast my libs are

#

but if ya wanna know how

#

then 1 sec

grand haven
#

thats pretty much 1 click for capacitor

#

it uses nodejs android