#🧩-plugin-development

1 messages · Page 28 of 1

viral roost
#

there

broken mesa
#

does ithave to be in hex or rbg or smth

calm lake
#

you can do it with image link i think so

viral roost
#

in whatever

calm lake
#

hmm

grand haven
#

god this pisses me off so much

#

that actually makes me fume

stark dagger
#

why that not work?

trail ginkgo
#

The fact that it's experimental or smth

grand haven
# trail ginkgo Huh

we spent like 4 years trying to get video PiP to work universally with the same APIs and functions across all browsers

trail ginkgo
#

Lol

grand haven
#

now chrome goes "actually fuck this, here, completly new API, that's completly not backwards compatible, that you cant drop-in replace with the old one at all as EVERYTHING is now different"

viral roost
#

are you expecting google to not do that?

trail ginkgo
#

Every chrome API

grand haven
#

worst part? you can polyfill 80% of that API using video PiP, except for the interactive parts

viral roost
#

seriously?

trail ginkgo
#

I think the interactive part is why it's useful

grand haven
#

nope

#

its #1 use case is displaying subtitles in video elements

#

🙂

#

not even joking

trail ginkgo
#

Why not use normal pip for that

grand haven
#

because PiP doesnt support subtitles by default, you instead need to render a video on a canvas, render the subtitles on the canvas, and then PiP that canvas

#

like so:

trail ginkgo
#

Yes

#

What I imagine people would be doing

#

I guess it's easier to do in dom

grand haven
#

actually afaik i'm the only person in the world doing this

#

at least in opensource code

#

i know spotify used to do this for album covers but no longer does

#

but it was just a static image

dull magnet
#

Bittorrent streaming software for cats. Stream anime torrents, real-time with no waiting for downloads.

#

im a cat

grand haven
dull magnet
#

oh its electron

#

cursed

grand haven
#

the landing page on github is a bit outdated

grand haven
#

and only electron provides that

#

also need a custom chromium build for mode codecs [yes i wrote my own dist of chromium with more codecs], so that's gluon out of the picture too

#

nw.js is a segfault simulator as its all synchronous

#

and tauri is tauri lmfao

trail ginkgo
#

RAAAA

dull magnet
#

oh i wasnt saying u should use something else

#

i was just kinda surprised

grand haven
#

but its the only viable solution for this

#

the plan is that once BT over WebRTC is adopted this will go full web

#

EXCEPT WE DONT HAVE IN PLACE FILE WRITES ON WEB BECAUSE CHROME FUGU TEAM IS TOO BUSSY MAKING SHIT API'S LIKE DOCUMENT PIP AND NOT SHIT FIXING SHIT THAT ACTUALLY RAPES YOUR DRIVES

#

REEEEEEEEEEEEEEEEEEEE

dull magnet
#

calm

grand haven
#

reeeeeeeeeeeeeeee

grand haven
#

miru is poggies

#

as hell

#

its what plex promised it would be

#

straight up torrent streaming, but no servers required, no config required

#

you launch, click play, it streams the torrent as you watch and you're set

#

0 wait time

dull magnet
#

nah im just kidding it does seem cool yeah haha

dull magnet
#

not something i'll ever use tho

grand haven
#

i've sank so many hours into it its crazy

dull magnet
#

catstare i dont torrent much

#

law here is messed up and i cant be bothered to sit on vpn24/7

grand haven
grand haven
#

this is legit meant for people that dont really torrent and dont know how to

#

as it automates the entire process

steel cipher
cunning imp
slow charm
#

simply leech

rocky jackal
#

at this point I just hate myself

silk sorrel
#

this is so design

rocky jackal
#

and unfinished, yay

#

I had to scrape through discord's code to create a theme file with all the essentials I needed (variables, button css, and others)

#

to keep compatibility with ACTUAL colorways working

#

sort of

#

1.5k lines of pure discord css madness

olive plume
#

hi so how do i mixin to the send message event

#

i want to do my own logic

#

then call the original send msg function

rocky jackal
potent fox
#

wth they added new giant search button to vscode

slow charm
#

that's not new

#

it's a setting that's off by default

#

maybe it's on by default now if u didn't change it without knowing

rocky jackal
#

it's on by default I believe

potent fox
#

because I didnt touch any settings and it came randomly

cedar marsh
meager snow
#

false on safari for me

steel cipher
#

false on ff for me

vestal yew
#

false on librewolf for me

#

also false on brave

indigo meadow
#

@cedar marsh thumbsup

dull magnet
#

it says it

#

konqueror

rocky jackal
#

im finally getting somewhere

#

the UI is basically ready

dire fern
rocky jackal
#

for betterdiscord

dire fern
#

yeah but no one cares about worsediscord

#

vencord #1

rocky jackal
#

I'm just copying the code into a website form

#

for vencord users

calm lake
rocky jackal
#

with a very special feature for both the bd and vencord (if it gets accepted) plugins

rocky jackal
#

custom colorway indexes

#

With the planned feature, you will be able to create such files with your own colorways

#

and share them

#

and the website will be able to locally store all the colorways you create, as well as generate such index files for you

#

that will also give me time to develop an actual colorway creator for vencord, since people will be able to use this until then

dire fern
#

one kebab please

#

<3

#

i dont know what either of you said, i cant understand your index and colourways and i cant understandd that language

#

well, nevermind

rocky jackal
#

this, but more of this

dire fern
rocky jackal
#

these circles are the colorways, at least on the plugin

calm lake
rocky jackal
#
@import url(//dablulite.github.io/DiscordColorways/Wildberry/import.css);
#

you have to put all imports at the top

rocky jackal
calm lake
rocky jackal
calm lake
#

im using vencord web

rocky jackal
#

omg

#

scroll down

calm lake
rocky jackal
#

you should see this list

rocky jackal
calm lake
rocky jackal
#

these are the colorways

#

you should see something like this

calm lake
rocky jackal
#

click on this button

#

on whatever colorway you like

#

in the "importing" section

calm lake
rocky jackal
#

then go to quickcss

calm lake
rocky jackal
#

yes

#

good

#

that was it

#

if you want another colorway, you just replace that import you pasted with the other one

calm lake
#

thx

#

also try my theme

#

i made this in bd editor

rocky jackal
#

I think we went a bit out of this channel's theme

bold gulch
#

what the amoled looks like for me rn, @serene cape
sorry if ooc this is literally the only channel i could send it in

#

it really reminds me of nord

#

thats odd, selecting someone to ping now appends #0000 onto the new usernames

#

i know they’re internally #0000 to avoid breaking changes, specifically with bots, but it used to auto-complete without the tag if the user had a pomelo nick

#

now it has the tag though

#

bug?

chrome elbow
bold gulch
#

but anyway, interesting that they made amoled into nrod

#

nord

#

kinda like it tbh

acoustic yew
#

real

bold gulch
#

real

bold gulch
#

ehhh, the accents are pretty bluish

#

especially if you look at the message bar

#

it resembles nord but it’s not as cold

serene cape
#

discord in general is quite blue

bold gulch
#

yeah but not nearly as “blue” as this

bold gulch
# bold gulch

idk if im tripping lol the first thing i think of when i see this is nord

trail ginkgo
#

The tripper

bold gulch
#

me

cunning imp
#

you're tripping

bold gulch
#

😭

rocky jackal
#

I've made a working version of the multi index system in bd colorways, time to port it to vencord

tall turret
#

how to make vaginacord plugin

#

*vencock

viral roost
meager snow
#

🤨

steep vapor
tacit sonnet
dull magnet
#

seems more like you're 12

lone panther
thorny scaffold
#

oh no vee is hereblobcatcozy

#

nth

thorny scaffold
#

blobcatcozy nth

lone panther
cerulean orchid
#

What

rocky jackal
#

why did I get ghost pinged

chrome elbow
rocky jackal
#

ah

thorny scaffold
rocky jackal
#

I have to rewrite a big chunk of the colorway creator

#

fml

rocky jackal
#

I'm having a seizure from the orange colorm, hlpe

#

This is seriously giving me a headache

meager snow
#

my eyes

#

mfw literally nothing in the app apart from a few 6 years old popups or submenus use those variables anyway

dull magnet
flint oxide
#

also a jumpscare

rocky jackal
#

primary-560

#

primary 600

flint oxide
#

My primary color is 600

#

and I only go up from that

rocky jackal
#

basically the "magic" behind 4 colors to (almost) 50 colors

flint oxide
#

Now I have to figure out how to work Colorways into my current configuration

dull magnet
rocky jackal
#

yea

#

I have reasons that I have it like that

silk sorrel
#

😭

#

what reasons

#

lmfao

rocky jackal
#

a) I have a filtering system that uses the fully generated version of that template string to get values for presets
b) Code output
c) it looks cool

flint oxide
#

--white-500: black

#

😭

steep vapor
#

it looks cool

#

please stop suffering

flint oxide
rocky jackal
flint oxide
#

are these numbers over here Discord's?

rocky jackal
#

-5% trolley

flint oxide
#

I define my values slightly differently

#

I never use anything from 730-900

silk sorrel
dull magnet
#

ye

rocky jackal
#

not gonna change my entire code

#

it's there, so I won't touch it

silk sorrel
#

😭
lmfao good luck changing it in the future

rocky jackal
#

I already have to modify it now to change some very bad previous desicions

dire fern
#

readable clearvision code

#

if anyone wants to copy it, here, just write it yourself, no need to copy

steep vapor
#

horror

meager snow
#

brain damage speedrun

silk sorrel
#

no bots to do ocr
life hasn't been the same since notsobot has fallen in popularity 🙏

dull magnet
#

bro

#

@hushed bloom

#

ocr slash command

#

@woven lion ocr context menu command when

#

how many context menu commands can bots register

viral roost
#

5 user 5 message i believe

woven lion
#

i could technically

#

ill add it later

olive plume
#

hi

#

how do i overwrite the behavior of sending a message

trail ginkgo
#

there is no way ocr can read that image

flint oxide
#

My eyes somehow can make out a few words

dull magnet
#

lets see

#

it got some of it right

trim igloo
#

@hushed bloom W

hushed bloomBOT
lone panther
#

common tessie L

hushed bloomBOT
pure temple
#

tessie L

hushed bloomBOT
dire fern
#

Tessie good girl

eternal lion
#

Tessie ll

#

Tessie l

hushed bloomBOT
ionic breach
#

Tessie I

pulsar harbor
#

People making chatbots with regex when they realize english isn't a regular language 😲 /j

untold briar
#

tessie w

hushed bloomBOT
rocky jackal
#

can someone help me here?

#

I'm running the command, but getting 0 output

#

no console errors, no preset bot responses

#

nothing

steep vapor
#

try putting a console.log after the execute() function at the top

#

to atleast check if the plugin is executing

rocky jackal
#

the plugin in general is running a-ok

#

only this command is the issue

#

omfg im stupid

#

I forgot to add the .length

acoustic yew
trail ginkgo
rocky jackal
#

took me almost half an hour to do this

#

all of that just for this

dreamy forge
#

regex is pain

lone panther
dreamy forge
#

but probably very useful if u learn it

#

pain tho

trail ginkgo
rocky jackal
trail ginkgo
#

regex is fire

#

replaceAll regex g flag

#

real

rocky jackal
#

are you fucking kidding me

trail ginkgo
#

i got a one liner for u i posted here before

rocky jackal
#

any format is fine, I have a method of checking if it's hex,hsl or rgb

#

my issues are calcs and when instead of commas there are spaces

rocky jackal
#

It 100% helps

trail ginkgo
#

but it converts all opaque colors to hex, and all translucent colors to rgba

rocky jackal
#

thank you

#

for my usecase I don't think it will deal with translucent colors

trail ginkgo
#

based and real pilled

rocky jackal
#

Color stealer for themes that use variables like brand-experiment, background-primary, these values

#

that's how this colorway came to be

#

From an abandoned theme called Wildberry

cunning imp
rocky jackal
#

colorsteal before

trail ginkgo
#

holy shit the code is readable now

#

fire

steep vapor
#

much better than 100 of the same lines

orchid cairn
primal narwhal
#

appreciate it

orchid cairn
#

yup

primal narwhal
#

resourcehacker time

trail ginkgo
#

this is so weird

orchid cairn
#

wut

#

just change the shortcut's ico

#

😕

orchid cairn
trail ginkgo
#

the message link embed plugin renders the ico file

orchid cairn
#

not for me

#

oh

#

well

#

im dumb

#

of course it doesnt

#

i dont have the plugin

trail ginkgo
#

oh yea lol that would do it

orchid cairn
#

odd

#

i wonder

#

does it render svgs?

#

if so...

#

xss time smide

trail ginkgo
#

it tries??

orchid cairn
#

show

primal narwhal
#

in app folder

orchid cairn
trail ginkgo
orchid cairn
#

hMMMM

#

lets see something

dull magnet
austere mauve
#

xss soon

timber bluff
austere mauve
#

vencord vuln

timber bluff
#

this is on vesktop

#

llmao

trail ginkgo
#

vesktop rce when

austere mauve
#

u can put script tags inside svgs

#

try @trail ginkgo

primal narwhal
#

works

#

epic

dull magnet
#

this is actually bad @trail ginkgo

#

why is it doing that

#

made this channel private for now

dull magnet
#

why tf is it rendering them

#

idgi

trail ginkgo
#

let me check

#

it might just be

#

an img tag

dull magnet
#

is that inside an img tag

#

if yes it's okay

trail ginkgo
#

wait i have to add my alt to check

timber bluff
#

a

dull magnet
#

it doesnt render for me

#

is it automod embed?

#

it is

timber bluff
#

oo ok

#

just an img

dull magnet
#

okay this is fine then

#

it doesnt render properly for me

trail ginkgo
#

same on discord desktop

#

but it does on vesktop

#

prob old chrome skill issue

dull magnet
#

no script

trail ginkgo
#

nop

dull magnet
#

i think we should still remove automod embeds

#

i dont like this behaviour

trail ginkgo
#

mm i think it might be ok its a default discord behaviour

dull magnet
#

hmm true

austere mauve
#

discord rce soon

trail ginkgo
#

was a scare tho

dull magnet
#

like normally this would embed peoples messages too

#

so its fine

#

okay i will make this channel public again

trail ginkgo
#

ok real

#

still gonna research this a bit more

orchid cairn
#

lol

#

wtf is vesktop

#

i wanna test sad

trail ginkgo
amber mantle
#

oh pisscord

next garnet
#

hi! i'm trying to make a nix package for vesktop (mainly just to get it to work for myself :))

  • do i need pnpm or would regular npm work?
  • what's the difference between the packaging modes? the readme lists package, package --linux pacman and package:dir, but is there like a full list somewhere (seems to be something of an electron-builder?)
dull magnet
#

package:dir is the fastest and just writes files to a directory

#

package --linux pacman creates a package installable via pacman

#

you likely just want package:dir

#

npm might work but only pnpm is guaranteed t owork

next garnet
#

aww pnpm isnt doesn't work like with regular npm

trail ginkgo
#

i cant believe thats a real alias

dull magnet
#

whar

#

is that actually a thing

next garnet
#

oh fun it doesn't like the lockfile :)

next garnet
#

ah fun, i think electron-builder requires internet access

dull magnet
#

yes

median flare
#

is there a way to restart\ a plugin after a setting in it has changed

#

i dont know how i would manage to access start() and stop() from the settings

median flare
trail ginkgo
#

whats the effect thats supposed to happen

median flare
#

nvm i got the answer

trail ginkgo
#

ahh

#

that might be okay then if not vee will suggest smth else

rocky jackal
#

can someone help me, how would I go about using Vencord.Api.ServerList.addServerListElement?

#

first of all it wants a function, not an element

#

what does this function have to return

chrome elbow
#

return element

rocky jackal
#

of what type

#

react? dom?

viral roost
#

react

rocky jackal
#
Vencord.Api.ServerList.addServerListElement('Above',() => {return Vencord.Webpack.Common.React.createElement("div",{id:'test'},"hi")})
```I'm trying to test in the console and have no idea what the right syntax for the position is
#
Vencord.Api.ServerList.addServerListElement(Vencord.Api.ServerList.ServerListRenderPosition[1],() => {return Vencord.Webpack.Common.React.createElement("div",{},"hi")})
chrome elbow
#

.Above not [1]

rocky jackal
#

nowhere to be seen

#

it just, doesn't

#

this does return a react element so what is it?

chrome elbow
#

it is there

rocky jackal
#

wait

#

renderAll

#

no

#

what

#
Vencord.Api.ServerList.addServerListElement(Vencord.Api.ServerList.ServerListRenderPosition.Above,()=>{return Vencord.Webpack.Common.React.createElement("div",{style:{height:48,width:72}},"hi")})
Vencord.Api.ServerList.renderAll()
```this isn't working
#

what did you run?

#

does this like, not work on vesktop?

rocky jackal
#

why is it not rendering 😭

gray wolf
#

Hi people, I need a kind soul to help me with a problem I’ve been having for a few days. I’m really not experienced in “code” but I’m trying to learn… So there’s this theme that I really like a lot https://betterdiscord.app/theme/Discord Dark the problem is that as you can see with the “Member Count” plugin it cuts off the counter.

#

So I searched with the “CTRL + SHIFT + i” command and with the element inspector I managed to find out how to modify it. So if I modify "<div id=“vc-membercount” style=“margin-top: 10px;margin-bottom: 10px” by putting 10 px at the top and bottom everything is perfect as you can see here: But the problem is that I can’t make it permanent. Any help is welcome!

<div id="vc-membercount" style="margin-top: 10px;margin-bottom: 10px;padding-inline: 1em;place-content: center;gap: 0px;display: flex;"><div aria-label="88 Online in this Channel"><span style="background-color: var(--green-360); width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 0.5em;"></span><span style="color: var(--green-360);">88</span></div><div aria-label="693 Total Server Members"><span style="width: 6px; height: 6px; border-radius: 50%; border: 3px solid var(--primary-400); display: inline-block; margin-right: 0.5em; margin-left: 1em;"></span><span style="color: var(--primary-400);">693</span></div></div>
chrome elbow
#
.vc-membercount {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

@gray wolf paste to custom css

gray wolf
gray wolf
#

is that ok ?

#

when i'm restarting discord it's still the same

chrome elbow
gray wolf
#

Thanks a LOT ! it worked well !!!❤️

rocky jackal
chrome elbow
#

oh i wrote same as you and hover that spot

rocky jackal
#

doesn't work for me

#

this makes absolutely 0 sense

#

how does it work on you but ont on me?

chrome elbow
rocky jackal
#

am I dumb?

#

wait

#

could it, no

#

the favourites?

#

no

#

whar

narrow bone
#

anyone can tell Me how to start the vencord github folder
bc like i cloned the git and now what comand to start

rocky jackal
#

you don't start it

narrow bone
#

then how to run it

rocky jackal
#

do you have vesktop or normal discord?

narrow bone
#

vencord

rocky jackal
#

is it like this?

#

or is it this

narrow bone
#

the second

rocky jackal
#
npm run inject
#

in cmd

#

in the vencord folder

narrow bone
#

yes

#

wait now ihave the installer open

rocky jackal
#

then follow the instructions of the installer

narrow bone
#

wait so i have vencord in My normal discord installed but what i want to do is i want to change code of vencord

rocky jackal
bronze otter
#

is there an api endpoint that gives badge information, like badge icon and description?

opaque shard
#

I want to start coding, is there a way I can see the plugins that vencord offers in a file directory ?

dull magnet
#

github

#

anyway this is a terrible place to learn coding you should start with something more normal

opaque shard
# dull magnet github

I see, is there a way you can give me a link to the github ? I'm more interested in learning more about the message logger that vancord has to offer

#

and yes I will take your advice

opaque shard
#

I am really invested, and vancord has such cool features no joke, I like it alot

molten oxide
opaque shard
#

I am new to this stuff so yeah... sorry

steep vapor
#

??? vencord is not written in java?

opaque shard
#

I just wanna see the code I just said a random code language

#

sorry for misunderstanding

steep vapor
opaque shard
steep vapor
#

yes

#

are you asking about docs

opaque shard
#

and I arrive at the recent changes of the code, I want to see the "final product" if it makes sense

opaque shard
steep vapor
#

there is only basic documentation in the docs/ folder

opaque shard
#

I want to save it in my drive

steep vapor
#

out of the src folder ?

opaque shard
#

src/plugins/ {plugin name}

#

I cannot screenshot anymore ehh so annoying, lets take for example a zoom plugin, you acces it on github and it show you the files with the recent changes yes?

pure temple
#

:< will I need to duck type?

opaque shard
#

I don t want to see the recent changes, I just want to see the file to download it in my drive

#

if that makes sense

viral roost
#

so... clone the repository?

dull magnet
#

you just click a file and the code is right there

opaque shard
dull magnet
#

?????

opaque shard
#

I will look more at the options maybe I can describe my problem better

dull magnet
viral roost
#

can you send the link that you are looking at

dull magnet
#

had to look for the tutorial music first 🔥

drowsy chasm
viral roost
#

goes hard (wont play) 🗣️ 🗣️

opaque shard
dull magnet
#

that's the code

opaque shard
#

show me what you see when you open the link

opaque shard
#

I am going crazy

dull magnet
#

??

#

show a screenshot

molten oxide
steep vapor
#

are you trying to download the folder ??

opaque shard
#

this is what I see all the time I click it

molten oxide
steep vapor
#

if that is what you see

#

what do you want to see then

opaque shard
dull magnet
#

they're all part of the source code

#

ofc it matters which one

opaque shard
dull magnet
#

you're making no sense

opaque shard
#

now I don t want to see all the parts that consist of the code I want the final thing

dull magnet
#

whar

opaque shard
dull magnet
#

define final thing

viral roost
#

send a screenshot

#

of the "parts"

opaque shard
#

already sent

viral roost
#

click

#

on

#

a

#

fucking

#

file

steep vapor
dull magnet
#

the code is right there idk what you're confused about

green vessel
#

if there a way to put custom badges on my profile?

opaque shard
drowsy chasm
#

no

#

the whole code is inside the folder

dull magnet
#

all files represent the whole code

drowsy chasm
#

^

opaque shard
#

how do I get the whole file?

drowsy chasm
#

just look at each file

dull magnet
#

???

#

you have a folder with 10 images

viral roost
drowsy chasm
#

there’s no whole file

steady knot
#

the code is split into files

dull magnet
opaque shard
dull magnet
#

what are you trying to do

pure temple
opaque shard
#

to download em

dull magnet
#

for what

#

why do you need to download them

opaque shard
#

to see how the final code looks like and ask chat gpt what does each line work and what does it do

steady knot
chrome elbow
#

horror

opaque shard
#

I am getting bullied hard damn...

dull magnet
#

there is no final code, that is the final code

drowsy chasm
#

do not the chatgpt

opaque shard
#

okay....

dull magnet
viral roost
#

wait until they find out about git clone

dull magnet
#

you're wasting your time

#

stop looking at vencord code and instead learn how to code with something normal first

opaque shard
dull magnet
#

ai is stupid

opaque shard
#

thanks everyone for dealing with my shit

dull magnet
#

ai will not understand vencord code

steep vapor
#

it can, but certainly not code that it doesn't understand

opaque shard
#

and the tutorial music was fire

pure temple
steep vapor
#

plus to actually get it to write something you need to prompt it over and over

speaking from experience

dull magnet
#

just learn coding by making a website, a discord bot , a game, etc

#

pick your poison

opaque shard
#

got it

viral roost
drowsy chasm
#

vengpt

dull magnet
#

it cannot

opaque shard
drowsy chasm
#

devilbro plugins in vencord

dull magnet
#

bad

#

devilbro started using regeneratorruntime in his plugins 🔥

steep vapor
drowsy chasm
lone panther
cursive plank
#

moved from vencord-dev

I'm so sick of programmers naming a really simple concept, and then over-glorifying it as if it was rocket science

take Dependency Injection for example, I bet you used it before you even learnt what it is
(unless you directly learnt programming from books)

Dependency Injection is a really simple concept, like, stupidly simple
the problem is, if you don't know the terminology then everyone assumes you don't know what Dependency Injection is

many programming patterns have names, and articles preach about how great they are, and that they are genius inventions
when in reality, if you are an actual programmer, they aren't that hard to invent on your own

(PS: I am not talking about mathematical concepts ofc)

cunning imp
#

also moving

scientists and programmers alike are really, really, really bad at naming things. just look at "vacuum state" lmao

cursive plank
#

blazingly fast 🚀

pure temple
#

I'm still not totally sure on what dependency injection is tbh

#

people need fancy words to feel cool I suppose

cunning imp
#

the wikipedia article has a nice quote:

When you go and get things out of the refrigerator for yourself, you can cause problems. You might leave the door open, you might get something Mommy or Daddy don't want you to have. You might even be looking for something we don't even have or which has expired.

What you should be doing is stating a need, "I need something to drink with lunch," and then we will make sure you have something when you sit down to eat something.

John Munsch, 28 October 2009.

cursive plank
#

well, it is really simple

class Cat {
    talk() { console.log("meow") }
}

class DoSmth {
    _cat;
    constructor(cat) {
        this._cat = cat;
    }

    do() { this._cat.talk(); }
}

const cat = new Cat();
const doSmth = new DoSmth(cat);

doSmth.do();
#

this is DI

#

usually the constructor accepts an interface

junior fern
#

crazy

cursive plank
#

that way you can inject a mocked class

cunning imp
#

examples for various ways are also spot-on:

Interfaces
Clients should not know how their dependencies are implemented, only their names and API. A service which retrieves emails, for instance, may use the IMAP or POP3 protocols behind the scenes, but this detail is likely irrelevant to calling code that merely wants an email retrieved. By ignoring implementation details, clients do not need to change when their dependencies do.

#

as you've said, you likely used it in some form or another already but you didn't know that it was called dependency injection

cursive plank
#

is a "proper" example

#

I really don't like the terminology, cause it doesn't really inject anything

cunning imp
#

just like the vacuum state isn't a vacuum :/

cursive plank
#

in ASP.NET you don't construct the class yourself
no no no, you have it as a parameter in your constructor and it gets passed by reflection magic

#

which is really really really annoying if you want stuff to be passed that are not injectable, like a string

#

a string aint a service to inject

#

ASP.NET throws an error bc it doesn't recognise it

#

you either use ASP.NET's way of doing things or you don't use it at all

#

yeah as you can tell I hate abstraction that makes the code look like actual magic

trail ginkgo
#

@undone smelt

undone smelt
#

yo

trail ginkgo
#

image from @flat rose

undone smelt
#

the fuck

trail ginkgo
#

they said they built it on linux lolol

#

i guess wait til they respond for details

undone smelt
#

Hopefully the details are "I'm on Ubuntu and they just updated Webkit2GTK recently! :D" instead of "I built Webkit2GTK from source and wrote 400 lines of compatibility code and a blood-magic rtiual as well"

trail ginkgo
#

LMAO

dull magnet
#

HAHAHA

#

I mean

#

why not actually do that

undone smelt
#

Don't got enough blood in me to spare :(

dull magnet
#

a fork of WebKit2gtk where you add your own patches from upstream

undone smelt
#

^ I've considered that

#

Just haven't gotten around to it

dull magnet
#

ah I see

#

Well it might take ages to build WebKit idk

#

So might not be that fun

undone smelt
#

lolol it probably would

dull magnet
#

but building gtk from source is fine

#

I did it for a while cause of thumbnails in file picker

#

Was using some guys gtk fork

#

it doesn't take too long

undone smelt
#

I'll have to do it sometime regardless, just to see

flat rose
undone smelt
#

Okay cool ty

honest night
#

how the hell do i run an external script.

https://cdn.discordapp.com/attachments/1121240648289357836/1139770809485901894/experiments.js

it keeps giving me an error saying

Refused to load the script 'https://cdn.discordapp.com/attachments/1121240648289357836/1139770809485901894/experiments.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
dull magnet
#

not like that

honest night
#

well then how do i do it

dull magnet
#

experiments is a vencord plugin just enable it

honest night
#

im not talking about vencord here

dull magnet
#

don't fetch it from url

#

just copy paste the contents

honest night
#

i cant

#

the CSP disagrees

dull magnet
#

what

#

that's not true

#

if you copy paste the contents it will work fine

honest night
#
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Either the 'unsafe-inline' keyword, a hash ('sha256-bswSOtTf+fyWrfLYfzdlTgxiJJaZR6iJKMZUhMA/oOg='), or a nonce ('nonce-...') is required to enable inline execution.
#

so no, no it won't just work

dull magnet
#

don't put a script tag wtf are u doing

#

paste the raw code

#

no script tag

#

copy paste the code into the console

honest night
dull magnet
#

don't make a client mod if you have no idea what you're doing

#

but you still don't need a script tag

#

just run the code directly

#

if you absolutely need to run it as a string, use eval

honest night
#

h o w

#

the csp blocks eval

dull magnet
#

it doesn't tho

honest night
#

im running this on the web, not the desktop client

dull magnet
#

extension content scripts bypass csp + you can use network rules to remove csp

honest night
#

it is not bypassing CSP

dull magnet
#

make it do that then

honest night
#

idk how

#

im still relatively new to JS and chrome extensions

dull magnet
#

this is where you kang code from others that know better than you

honest night
#

i looked all on google, githb, chatgpt, but nothing works

#

how does vencord bypass CSP

dull magnet
#

code

honest night
#

ooo

#

quite simple actually

#

copies all code

dull magnet
honest night
#

it doesnt work for me even

#

lmao

#

there isnt a reference to background.js anywhwre

#

the longer i stare at the code the more confusing it gets

#

going to steal some code from the chrome web store

#

AAAAAAAAAAAAAAAAAAAAAAAAAAA I HATE EVERYTHING

dull magnet
honest night
#

ooh

dull magnet
#

on chromium we use declarative net request

honest night
#

yeah i tried the code, but it didnt work for me

dull magnet
honest night
#

thanks -_-

#

its just i dont know why this doesnt work

{
  "manifest_version": 3,
  "name": "Wyvern",
  "version": "1.0",
  "description": "Discord Mod.",
  "permissions": ["activeTab", "storage", "declarativeNetRequest"],
  "action": {
    "default_popup": "popup.html"
  },
  "content_scripts": [
    {
      "matches": ["https://discord.com/*"],
      "js": ["wyvern.js"]
    }
  ],
  "declarative_net_request": {
    "rule_resources": [
      {
        "id": "modifyResponseHeaders",
        "enabled": true,
        "path": "modifyResponseHeaders.json"
      }
    ]
  }
}
[
  {
    "id": 1,
    "action": {
      "type": "modifyHeaders",
      "responseHeaders": [
        {
          "header": "content-security-policy",
          "operation": "remove"
        },
        {
          "header": "content-security-policy-report-only",
          "operation": "remove"
        }
      ]
    },
    "condition": {
      "resourceTypes": ["main_frame", "sub_frame"]
    }
  },
  {
    "id": 2,
    "action": {
      "type": "modifyHeaders",
      "responseHeaders": [
        {
          "header": "content-type",
          "operation": "set",
          "value": "text/css"
        }
      ]
    },
    "condition": {
      "resourceTypes": ["stylesheet"],
      "urlFilter": "https://raw.githubusercontent.com/*"
    }
  }
]
rocky jackal
#

hmm, I'm looking to bloat add another feature or two on colorways

#

one I was thinking of was a ui that allows you to input 4 colors of any type and output an id

languid rock
#

hi idk where else to ask soo uhmm

#

what is FileCoAuth.exe

#

it keeps popping up every few mins

wide parrot
#

whar

languid rock
#

some wheird pop up saying

#

FileCoAuth.exe

#

then some random numbers and text

proud valley
#

ive noticed some of the plugin's modals wrap ModalRoot in an ErrorBoundary, what does this do exactly?

austere mauve
#

makes it so if your component errors it doesnt crash discord

proud valley
#

ohhh nice

#

should i wrap my modals in it or is that optional?

austere mauve
#

usually a good idea to

dull magnet
#

modals arent important to wrap

#

considering they are usually only opened on explicit user action and crash recovery will recover crashes

#

but it doesnt hurt

#

its more important for components that are unconditionally rendered as those can cause crashloops

#

like this little fella

acoustic yew
rocky jackal
#

megu, can your dlls be imported into .net apps?

bleak swan
#

We need someone that can host our bot 24/7 for free
dm me if you are interseted.
Massping Inc.

dull magnet
#

We need someone that can PayPal us 1000€ for free dm me if you are interseted.

wide parrot
#

trolley

bleak swan
#

To token log my bot?
No thx

wide parrot
#

how the fuck would someone host it without a token

bleak swan
lone panther
bleak swan
#

I will send bot code tomorrow for you

bleak swan
wide parrot
#

send me your token

lone panther
bleak swan
#

A proof that you really host bots

wide parrot
#

i put bot tokens in my ass

#

send me the token

bleak swan
bleak swan
wide parrot
#

don’t argue darling

dull magnet
#

idk if you realise but the people are just joking

#

do you really think anyone would be interested in hosting your bot for you without anything in return

wide parrot
dull magnet
#

rent a server and host it urself or pay someone to host it for u :p

bleak swan
proud valley
#

is there a vencord api for causing discord to reload?

dull magnet
proud valley
#

oh thanks

proud valley
#

i have this modal but the list doesnt update when i press the add button or remove a quote, how can i fix this?

#

i think i can maybe use useMemo like sendTimestamps does

proud valley
#

nope useMemo didnt work

dull magnet
#

where tf is quotes coming from

#

anyway u need to use some state

loud portal
#

how i can hide this annoying dev tools warnings who are shown every time i open the console ?

#

normaly i just right click and select hide butt i cant do it on that

dull magnet
#

disable source maps in devtools settings

#

or use the filter bar

loud portal
wooden dragon
#

I wanna know how vesktop got the native discord titlebar working 😭

#

totally not for my own small custom client

trail ginkgo
#

basically its in src/renderer/patches/windowsTitleBar.tsx

#

just a two patches, one turns it on and the other changes the buttons to use a global for minimizing n stuff thru ipc

wooden dragon
#

I see sadly I don't quite understand how this add patch works, I guess it finds the related webpack module and replaces something, but idk how to do that I mean override the modules code and re-run it?

trail ginkgo
#

yea vesktop makes use of vencord's patch system

#

since vencord runs before anything else, it can just intercept webpack modules as they're initialized and then change the source code before they're ran

wooden dragon
#

ohhh I see

#

I can do that too with webview init scripts

trail ginkgo
#

that match finds the one module that contains ".wordmarkWindows" and then runs those regex replaces u see

wooden dragon
#

yeah I understand now, hard part will be to catch these modules before they run catstare

#

I wanna include vencord into the client optionally at some point, but I want a native feel for vanilla users too

trail ginkgo
#

u could take a look at how vencord does it

#

but you'll probably have to be pretty careful if u want ur thing to work alongside vencord

wooden dragon
#

right

wooden dragon
#

anyways thank you <3

trail ginkgo
#

yaa no prob

sonic lotus
#

hey

#

can i use lualine on vim

#

not neovim

austere mauve
#

you could use on vim instead

obsidian sluice
#

does anyone know how I can make it goes based of the role color?

.members-3WRCEx .membersGroup-2eiWxl {
  height: 30px;
  margin: 0px 0px 6px 8px;
  padding: 10px 0px 0px 0px;
  text-align: center;
  border-bottom: 1px solid currentcolor;
}```
chrome elbow
hybrid dune
#

Anyone on macos and/or linux who cn tell me where your theme folder is? Trying to see if I can compile themes directly into the folder on all platforms.

dull magnet
#

should be ${XDG-CONFIG-HOME:-$HOME/.config}/Vencord/themes on Linux

hybrid dune
#

sweet, thanks

hybrid dune
#

yippee it works

#

time to combine everything so I can compile to 3 client mods at once nyaboom

dull magnet
gentle marten
#

Are there any plugins that interact with the VC connection? I'm trying to tap into the audio streams but I've hit wall after wall and I don't really know where to go from here

#

Closest thing I've found is the websocket onmessage function, but that dosn't actually seem to handle any audio streams

gentle marten
#

why

gentle marten
#

Yeah

trail ginkgo
#

Ya not possible

#

Audio streams live inside a native binary on desktop

gentle marten
#

Wow

trail ginkgo
#

They're easy to access on web tho

#

(and vesktop since it's web)

gentle marten
#

Might do that then

#

Want to record each user in a voice channel individually

trail ginkgo
#

Yea u can do that

#

I can't tell u how tho cus I'm in bed

civic stone
#

guys, i reported this earlier but i think ven forgot, 'remove attachment' button for deleting video or pic is not working

dull magnet
#

?

civic stone
gentle marten
loud portal
#

if it is this it dont make anything to this

meager snow
#

scroll above

loud portal
#

java ?

meager snow
#

yes

loud portal
#

nice it works i guess for css just deactivate css source maps disable right ?

meager snow
#

ye

proud valley
#

anyways i changed the code so its one of the props and it uses useState but it still doesnt work

cobalt prism
#

I wonder if possible to make a web/chromium overlay in discord (like steam web overlay in game) instead letting us open a browser application when clicking to the link AMthink

#

another example when clicking image opens overlay with bigger layout

#

replacing that as web page when clicking on link
(Though this wouldnt be hard cause discord itself still a web engine, maybe could replace image layout as <iframe link> when opening links via plugin AMthink )

pallid sinew
#

what's the code to get an array of females in this server? 😏

austere mauve
pallid sinew
#

ok!

#

let's see...

#

um

#

its bugged.

austere mauve
#

🏳️‍⚧️

pallid sinew
#

im not trans

#

can u fix pls

pallid sinew
#

genius

vocal nacelle
#

D:\Vencord>pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Packages: +406
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ENOENT  ENOENT: no such file or directory, stat 'D:\Vencord\node_modules.pnpm@vap+core@0.0.12\node_modules\eventemitter3'

pnpm: ENOENT: no such file or directory, stat 'D:\Vencord\node_modules.pnpm@vap+core@0.0.12\node_modules\eventemitter3'
Progress: resolved 406, reused 15, downloaded 0, added 0

#

help pls

cedar marsh
#

Vns support

shrewd tundraBOT
trail ginkgo
#

vap core virus

rocky jackal
#

I'm thinking of just yoloing the colorways button using dom in the vencord version

#

since vencord's serverlist api doesn't want to cooperate at all

austere mauve
dull magnet
#

do not the dom

lone panther
#

do the dom

#

😋

wide parrot
#

🤨 ** **

lone panther
amber mantle
#

do not the dom

#

expand server list api

#

u love

austere mauve
#

dom? i wish

rocky jackal
#

so it was a bug after all

#

though it wasn't buggy for me just from yesterday

#

it has been non-functional for a few days now

rocky jackal
cedar olive
#

pr a fix

rocky jackal
#

I'm not that good to be able to make a fix for that

molten oxide
#

for what is $& used in patches?

oblique lark
#

$& is the entire regex match

molten oxide
#

thx

dull magnet
# molten oxide for what is `$&` used in patches?

The replace() method of String values returns a new string with one, some, or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function called for each match. If pattern is a string, only the first occurrence will be replaced. The original string is left unchanged.

lone panther
#

how does the vencord injector work nowadays the code is completely incomprehensible to me

#

this is a fire function name though

cedar marsh
#

Does anyone have ruby, typescript, and vue discord emojis?

lone panther
#

oh looking in the entirely wrong place the patcher delegates that part to the codebase itself (?)

#

agony why is there so much code

#

HOW DO YOU OPTIMIZE JS FOR A SPECIFIC PLATFORM agonyagonyagony

cedar olive
#

@rocky jackal server list api fixed in dev

rocky jackal
#

ah, great, I have to reinstall vesktop

#

got too comfy with armcord

dull magnet
#

it just eliminates some code if you're building from source

lone panther
#

insane

dull magnet
#

wtf is wrong with youtube

#

every video buffering

crude iron
dull magnet
#

I mean I'm using mod

#

So that's probably why

#

I cleared cache and it fixed for 1 minute now it's broken again

drowsy chasm
#

i just downloaded the latest apk

#

if you’re using revanced extended

#

every video stopped loading after around a minute

dull magnet
#

oh i sent that in coding

#

I didnt realise

rocky jackal
drowsy chasm
dull magnet
drowsy chasm
#

yee

#

i just updated

#

fixed itself

dull magnet
#

oh i see

drowsy chasm
#

it would buffer then it would turn black

#

i even went back to old vanced for a bit lmao

dull magnet
#

yeeeep

#

same

drowsy chasm
#

just update it fixes

dull magnet
#

maybe this is a good excuse to switch to rooted

drowsy chasm
rocky jackal
#

optimizing js is like dark magic

rocky jackal
crude iron
rocky jackal
drowsy chasm
dull magnet
drowsy chasm
#

started happening to me like

#

last week ish

rocky jackal
#

had this issue for months

drowsy chasm
#

i went back to vanced for a bit then i realized i could just try updating and it fixed itself

dull magnet
#

it seems to work fine with background play

drowsy chasm
#

it broke in pip for me too i think

rocky jackal
#

I just had to resort to newpipe

rocky jackal
#

I shall now proceed to running it, thus crashing my browser

austere mauve
#

shrimply for(;;);

dull magnet
#

oh this is fire

#

I didnt even mean to click that site i just clicked first result without looking assuming it would be github

drowsy chasm
#

lmao

cedar marsh
dull magnet
#

interesting

#

they have a wildcard

#

I'll pr the fake vencord site and see if they accept

#

oh nice they are blocking all the shit sites

#

how do ublock rules work