#🧩-plugin-development

1 messages · Page 35 of 1

rocky jackal
#

ohhhhhh

rocky jackal
#

I'm making a feature for the "Copy Current Colors" feature in the creator that will allow you to copy colors from different known themes, and select what colors you want

green vessel
#

How hard is it actually making a discord client mod?

pure temple
#

depends how much you know.

green vessel
#

and a few other languages but i'm not mentioning it here

#

never used webpack

rocky jackal
rocky jackal
proud cargo
#

c people
is it STDlib
or standardlib

#

ok who am i kidding no one uses c here

austere mauve
#

stdlib

dull magnet
#

stdlib

#

sexually transmitted disease lib

austere mauve
#

shoutout to rust where you use std

wooden dragon
#

I love std

lone panther
smoky basin
#

good lord copilot

rocky jackal
#

so, there is a feature I wanted to add to my plugin, but didn't know how stable it would be, and that is on-demand theme generation, basically ignoring the imports/css of colorways and instead using the provided colors to immediately generate a colorway, using the latest template

slow charm
rocky jackal
#

the name is a wip

floral furnace
#

So did the original creators decompile discord?

dull magnet
#

it's not compiled

potent fox
#

js is not compiled language you can look at their minified code from dev tools

dull magnet
#

it's just Javascript you can read everything

pure temple
#

did Discord use TypeScript?

potent fox
#

probably

#

but does typescript count as compiling

floral furnace
#

Its an electron app though right?

potent fox
#

maybe more like transpiling?

dull magnet
dull magnet
#

yes

#

why does it matter

pure temple
floral furnace
#

Alright

proud cargo
pure temple
#

ah

pure temple
floral furnace
#

Where would I find the 'src/userplugins/' directory on my machine (Windows 10)

viral roost
#

you make the userplugins folder

#

if there's no src folder read the guide properly

floral furnace
#

Should I make it in 'Roaming/Vencord'

viral roost
#

no

#

read the guide properly or install using the normal method

floral furnace
#

This directory?

#

Better question, where are the plugins stored?

dull magnet
#

see the docs folder on github

#

it tells u everything

floral furnace
#

I dont understand

fallow rune
#

same

#

The guide doesn't help

dull magnet
viral roost
#

why are you trying to create the userplugins folder

dull magnet
#

if you can't follow those instructions then how will u be able to make plugins

dull magnet
floral furnace
#

So is it saying to clone the repo?

dull magnet
#

dont ask

#

just follow

#

you can figure it out

fallow rune
floral furnace
#

That seems to make sense

fallow rune
#

I might move to bettercord because there is a plugin that I want that I was going to put in vencord, but...

dull magnet
#

then do it

floral furnace
#

Why is it called vencord?

dull magnet
#

named after me. it was a very old running gag that eventually got turned into reality

fallow rune
floral furnace
#

bruh

fallow rune
#

?

fallow rune
#

No, for the actual application, every time you go to view discord it prompts...

lone panther
#

why though

dull magnet
#

thats useless

#

just lock ur user

floral furnace
#

I dont think you would need vencord to do that

dull magnet
#

anything inside discord will always be bypassable

#

literally just lock ur pc

fallow rune
#

Because I share a computer with someone sometimes, and though this may not be very secure, it would stop the average person

dull magnet
#

just lock ur pc bro 😭

dull magnet
#

or close discord

fallow rune
#

nvm

lone panther
#

log out of discord even

fallow rune
#

exactly

dull magnet
#

if you make an empty alt and add it with account switcher

fallow rune
#

and I dont want to log out

dull magnet
#

you can just have it here

#

and switch to ur alt to "lock" discord

lone panther
#

and use css to get rid of the acct switcher

viral roost
#

true basically no one knows the account switcher exists lmao

lone panther
#

🔥

fallow rune
#

maybe

dull magnet
sullen wedge
#

anyone here have experience getting a reference to the MediaStream object for vc connections on desktop? I was looking at the RNNoise plugin but it appears to only be for vencord web

#

I set breakpoints on the constructors on the web version of vanilla discord and that worked but on desktop discord, the breakpoints don't trigger. Perhaps I'm missing something

dull magnet
#

they have their own shit

#

discord_voice

sullen wedge
#

ah, when you say they have their own shit, is it native code?

dull magnet
#

yes

#

node native addon

#

i dont have any experience trying to mod it

#

it might not be possible

sullen wedge
#

ah damn that's what I feared. Well, ty for the help

dull magnet
#

it might be possible so i wouldnt give up just yet

sullen wedge
#

I'm too lazy to learn to use ghidra 😭

dull magnet
#

from web

sullen wedge
#

? wdym

hard sage
#

hey is there a plugin that was made so i can mass change server profiles. if this doesnt exist i can see if its possible lol - basically i just want to change my nickname in every server im in without having to change my actual username

floral furnace
#

@dull magnet If I already installed vencord should I uninstall when rebuilding it to develop a plugin?

hard sage
#

this blud fr ong ☠️

pure temple
#

it should do that at 4950, shouldn't it

trim cedar
# dull magnet node native addon

I could try disassembling it, in case you'd want to mod it we could have a proxy so/dll that loads the original, modifies it, and then does whatever

floral furnace
#

How do plugins find where they belong on the screen?

#

For example this game icon comes from the gameActivityPlugin

austere mauve
#

code

verbal rivet
#

how do you find a setting in your status to modify, for example i want to do something like the game activity plugin but have it toggle if spotify is showing in your status

cedar olive
floral furnace
#

Yeah I dont understand the source code is my problem

cedar olive
floral furnace
#

Ah thanks

verbal rivet
#

the renderNameZone part

cedar olive
#

that patch basically produces this

#

ours is the first, the rest is default discord stuff

floral furnace
#

I see

#
find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
cedar olive
#

that's to select the right file to patch

#

only the file that renders those buttons has that exact code in it

floral furnace
#

Where would the messages file be in the repo?

cedar olive
#

nono, that's discord stuff

floral furnace
#

Oh ok

cedar olive
floral furnace
#

Also do you build your own version of vencord when developing your own plugins?

verbal rivet
#

does anyone know how to find the name of a setting

floral furnace
#

Thanks

#

One more question, Do you have to uninstall your current version of vencord when building for it to work

trim cedar
#

No

verbal rivet
floral furnace
#

Did you look at line 19 ```ts
import { getSettingStoreLazy } from "@api/SettingsStore";

verbal rivet
#

yeah

#

ive been looking at settingsstore for a while

#

cant seem to find anything that could help me find the name of it directly

#

im trying to make a plugin that toggles spotify showing up as your status

floral furnace
#

Could you explain a bit more

verbal rivet
#

okay, so line 28 uses getSettingStoreLazy to find the module that controls whether the game you are playing is shown in your status

#

but they use showCurrentGame as the name of the setting

#

i dont know the name of the setting i want

#

how do i find that?

floral furnace
#

So from my findings there seems to be global settings and plugin settings

verbal rivet
#

hm okay

#

well yeah i know that

floral furnace
#

I would assume their stored as cookies or something but I dont know where

verbal rivet
#

i dont think so

#

but idk

floral furnace
#

Do you understand patching?

verbal rivet
#

yeah

floral furnace
#

Im rather confused because are you looking at the html name or the name in the react component view

verbal rivet
#

I dont know, im trying to find the right name

floral furnace
#

Why are you concerned with the settingStore then?

verbal rivet
#

im not really

floral furnace
#

Oh okay

#

Are you setting breakpoints inside the typescript?

verbal rivet
#

or is there a way i could just look at a list of all the settings inside the status group

floral furnace
#

Does it look like this for you?

#

@verbal rivet

verbal rivet
#

no

floral furnace
#

For setting breakpoints?

verbal rivet
#

oh with the breakpoints yeah

#

the code looks different

cedar olive
#

click the {} on the bottom left please

floral furnace
#

Will that deminify it?

cedar olive
#

yes

#

it's way better

#

and everything still works fine

floral furnace
#

So Im working on the patching right now

#

How should I start searching for the name of thing I want to find

#

Should I use its html stuff or its react stuff

cedar olive
#

what is it that you want

floral furnace
#

I'm looking to find the code associated with this menu

cedar olive
#

what with it

#

enable react devtools and inspect it

#

but either way, search for message-context and you should find it prob

floral furnace
#

I got the message- part but not the context

cedar olive
#

hm wait not that

#

navId:"message"

#

try this

floral furnace
#

How did you find that

cedar olive
#

also because I happen to have already worked with context menus how I know what to look for

verbal rivet
#

@cedar olive can I dm you about smth

floral furnace
#

THANK YOU SO MUCH! It paused on the breakpoint so it seems Im moving in the right direction

verbal rivet
#

i thought you wouldknow since you made the game activity plugin right

cedar olive
cedar olive
verbal rivet
#

tysm

floral furnace
#

The typescript is imposssible to read though

cedar olive
verbal rivet
#

thank youuuu

cedar olive
#

that's the function to toggle

verbal rivet
#

nice

cedar olive
#

you need to call it with the spotify type

#

an id, and whether it's enabled I think

#

let me check

verbal rivet
#

ah

cedar olive
#

Vencord.Webpack.findByProps("setShowActivity").setShowActivity("spotify", accountId, false or true)

verbal rivet
#

nice thank you!

floral furnace
#

Am I supposed to read the typescript in this form

dull magnet
#

can you show what you're talking about

verbal rivet
#

sorry im pretty new to all of this

cedar olive
#

uhh

#

yeah, I have to search for it though

verbal rivet
#

oh

floral furnace
dull magnet
#

yes

#

that's javascript, not typescript. but yes you have to read and understand it in this form

floral furnace
#

Are the single character names a result of minification?

smoky basin
#

Yes

#

You get used to it after a while

dull magnet
#

we still have it pretty good cause discords code is very readable

#

it could be way way worse

smoky basin
#

100%

cedar olive
dull magnet
#

their old android java code was even more readable

cedar olive
#

this one

dull magnet
#

basically no minification

#

and everything statically typed

#

aliucord was peak modding, it doesn't get better

smoky basin
#

Even the RN mobile app's code is reasonably reasonable after decompiling the bytecode

#

More readable than desktop in places

dull magnet
#

aliucord was basically source code

#

imagine desktop codebase but all variables have static types and function names are all not minified, and everything is exported without webpack search

#

also full typings for their entire codebase

smoky basin
#

a lot more function/export names are left unminified by metro which is why I think hermes decompilation can win in some aspects

floral furnace
#

Is there a way to edit these js files to see their changes in real time

dull magnet
#

no

#

write a patch and test it

timid hinge
floral furnace
#

I dont know how do that to be honest

#

I read the patching guide but couldnt take action

cedar olive
#

to be fair

#

what do you want to do with the context menu

floral furnace
#

I want to add keybinds to it

#

E for edit, R for reply

cedar olive
#

oh

#

I have no idea how to do that

#

never worked with bindings before

verbal rivet
floral furnace
cedar olive
verbal rivet
#

oh

#

btw how have you been searching this stuff?

cedar olive
cedar olive
verbal rivet
#

ohh okay

cedar olive
#

with react dev tools

#

found the onChange listener because it's a switch

#

and inside it that function was called lol

verbal rivet
#

ah

#

got i

dull magnet
#

if you make someone else search for u u won't learn much

#

try to search for urself

floral furnace
#

Thanks for all the help today spooky

#

And everyone else who answers questions

verbal rivet
#

now i do tho

smoky basin
#

What I find reliable is using react dev tools to find the component that is related to/does what i'm looking for, find the component in the js via the components (minified) name and a lil bit of guesswork (ex looking for avatar decoration stuff you might see a prop like avatarDecoration)

#

then see what the component does

dull magnet
#

yes that's one of the better ways

verbal rivet
#

ill try that

dull magnet
#

another decent way is just searching for keywords

#

ctrl shift f in sources tab and search for keywords

smoky basin
#

that too

hushed loom
#

am i stupid or is there a better way to do this

smoky basin
#

but for commonly mentioned stuff it can be annoying

dull magnet
#

another good way is having another plugin do something similar and just looking at that plugin :)

verbal rivet
#

i just couldnt find the name of what i was looking for

timid hinge
hushed loom
floral furnace
#

Yeah lol

#

How long has it been since you last slept?

hushed loom
floral furnace
#

Damn hope you get better soon

floral furnace
#

whats the point of this command ```
Vencord.Webpack.wreq.m[447887].toString()

dull magnet
#

what

#

where'd u get that

floral furnace
#

@dull magnet

obtuse dagger
#

anyone know how i could get the active now bar to always appear in css

#

i wanna shrink my discord and it disappears when it gets small :/

chrome elbow
#
.nowPlayingColumn-1eCBCN {
    display: block;
}
obtuse dagger
#

👍

green vessel
#

what has that got to do with coding

quick atlas
green vessel
#

you give me your credit card information

  • 16 numbers on front
  • expiry date + year
  • 3 cute numbers on back
proud cargo
#

that 100 seconds guy has a tutorial

#

remotion

stray imp
#
fun MutableState<Boolean>.inverse(): MutableState<Boolean> {
    val primary = this

    return object : MutableState<Boolean> {
        override var value: Boolean
            get() = component1()
            set(value) {
                component2().invoke(value)
            }

        override fun component1(): Boolean {
            return !primary.value
        }

        override fun component2(): (Boolean) -> Unit {
            return { value ->
                primary.component2()(!value)
            }
        }

    }
}
#

i am not sure if this will work

#

actaulyl wait why did i do component2 like that

#

one moment

plucky dove
#

can aria-pressed only be changed with JS?

dull magnet
#

yes, why?

plucky dove
#

shit

dull magnet
#

aria-pressed does nothing

#

what are you trying to do

plucky dove
#

prevent this piece of shit menu from reappearing every time

#

it keeps toggling back to true after a restart/shutdown

dull magnet
#

well aria pressed does nothing

plucky dove
#

ig the other way is try to hide it with CSS

dull magnet
#

hide with css or make a userscript

plucky dove
#

oh wow it actually does nothing

#

CSS it is

dull magnet
plucky dove
#

that

actually makes sense
now i understand why aria-label exists

pseudo zephyr
#

hilo guys

#

china wants to know ur opinion

plucky dove
#

managed to find a JS userscript for automatically removing it if detected opened

pseudo zephyr
#

its for their social credit system

trail ginkgo
timid hinge
#

i wish you good luck

#

they've fucking frankensteined their own browser at this point

plucky dove
plucky dove
#

shit looks clunky as hell with a small res monitor

rocky jackal
#

but it does look interesting nonetheless

#

actually, that does look like dynamic theming

#

but the iconography is, questionable

#

as well as how cluttered they make the navbar look

#

7 items holy

#

m3 docs

pseudo zephyr
#

has some m3 parts but not fully m3

pseudo zephyr
rocky jackal
#

imo, 3 tabs are the perfect amount of tabs

#

(for m3, on a phone)

pseudo zephyr
#

personally i prefer usability/ux over guidelines

lone cedar
#

I actually like it so far. There's a lot of settings, though

amber mantle
#

feels situational lol

#

if discord was m3 i wouldnt like it probably, but the things that are already m3 are fine

#

just like tabs v2 too used to this

#

but tabs v2 is genuinely just horrid

lofty crypt
keen yoke
wooden dragon
#

how can I make dependabot merge PRs automatically when all checks passed oki?

dull magnet
#

magic

stable ridge
amber basin
#

you love 400 line sql query file

austere mauve
#

sql is evil

lone panther
#

sql so slowwwwwwwwwwwwwwww

dull magnet
#

nop sql fast

lone panther
#

@dull magnet @dull magnet then fix my sqlite3 database that is 12 gigabytes and make it not take 2 seconds every query

dull magnet
#

12gb husk

#

anyway uhh

#

proper indexing should fix

lone panther
#

have tried

#

doesnt help

#

each row stores like 512kib blob + metadata

#

and i added like 25k rows for testing

#

inserts are faster than queries and thats when you know youre fucked

lone panther
#

cdn backing storage

#

🔥

#

"cdn" debatable

#

mor like file storage

#

which im overengineering

austere mauve
#

✅ is cd (it delivers content)
✅ is dn (is ballware

lone panther
#

TRUE

proud cargo
#

deez nuts?

lofty crypt
#

deliver dn

minor jolt
#

can someone tldr me on venmic ?

#

what does it do

dull magnet
#

Read the description

minor jolt
#

is it only for audio or video too ?

dire fern
#

read the description

proud cargo
#

least complicated ts error

pliant pasture
proud cargo
#

it doesnt wanna merge because im using non published discriminating union type which should:tm know its an object type but it doesnt accept

lofty crypt
#

pings in case you two might wanna link up to work on audio stuff @visual berry #🧊-off-topic-iceman-only message

(@rustic aspen you can’t talk here rn as the server is on temp semi lockdown b/c dc borked client mods again)

visual berry
#

Well currently the whole project is just a open source voice engine reimplementation in C for linux

#

it uses Jack Audio as the audio engine

#

but this may change

hushed loom
#

how the fuck do you put a grave in a markdown inline code

amber basin
#

\

hushed loom
#

\asd`

#

this is what shows up

#

i want `asd

#

but in a code thing

#

``asd`

#

ok

#

im just stupid

proud cargo
#

asd

flint oxide
#

that's called a grave ??

#

I didn't even know what to name it for so long rather than a backtick

rocky jackal
#

yay, discord broke the entirety of my plugin, all of my themes, all colorways, and all of my snippets

flint oxide
#

Noooooo

rocky jackal
#

discord seemed normal for a second until I remembered I had abt 4-5 snippets on

hushed loom
wide perch
#

Uh

#

i think?

#

well im trying to see if it works in vesktop

#

in vesktop folder yeah

#

i see dist

#

the vesktop

#

ok

#

ill let you know when i get there

#

alr I got it to work. thanks for the help

pure temple
#

const makes your code slower

#

😭

amber basin
amber basin
#

aenri test the rest client changes challenge

dry patio
#

wowzies

amber basin
#

??????????????

dry patio
#

java 💀

amber basin
#

kotlin :3

#

undocumented opcodes :3

#

???????????

gusty maple
#

Discord api docs my beloved

amber basin
#

im copying the packet exactly, WHY IS DISCORD KILLING ME

#

oh my god i was sending identify wrong

crisp glacier
#

L

amber basin
#

IT WORKS

#

IT FUCKING WORKS

lone panther
#

yooooooooo

amber basin
lone panther
#

DUKE

potent fox
#

duke blobcatcozy

#

javas everywhere

amber basin
#

:3

#

default kotlin compose icon

potent fox
#

kotlin is actually java

#

but worse

steep vapor
#

kotlin so bad

#

introduced confusing viewmodel,,,,

proud cargo
amber basin
#

:3

dry patio
#

kotlin is better than java but literally everhthing is better than java

#

id rather write a program in c

feral inlet
#

How do I add pronouns to my bots profile ;-;

#

I've searched how but it's just pronoun commands.

amber basin
hushed loom
#

does someone know a good discord embed generator

trail ginkgo
#

@dull magnet how could i monkeypatch discord webpack things halp

#

im making a userscript and i need to like

#

proxy a function

#

but its a direct export so its not configurable 😭

green vessel
#

Mods, I know a bit of python and JavaScript, if you have a proplem with ven I might be able to help. Thx for updates

trail ginkgo
#

WAIT IM GOATED

austere mauve
#

no..

trail ginkgo
#

is that not goated

austere mauve
#

everything just to not use the debugger

trail ginkgo
#

nono i needed to add a prop for a userscript

#

a callback to the oauth2 auth button

#

so it wouldnt redirect and would run my code instead

simple folio
austere mauve
#

swing fans when i swing my sword and chop their heads off

steep vapor
#

im the swing fan

green vessel
#

but here’s the swinger

lofty crypt
wooden dragon
#

I'm almost done with my chip8 assembler yippee

olive crown
trail ginkgo
#

gruvbox material

dull magnet
wooden dragon
#

why not

#

I mean

#

I wanna learn on how to write proper interpreters and emulators

#

and the chip8 is a good starting point

#

now it feels pointless

dull magnet
#

nah if you're learning then it's not pointless!!

#

when are u writing a vencord user assembler tho

proud cargo
#

hes in solid server if you wanna talk to him AiriTeehee

dull magnet
#

why would i

proud cargo
#

idk

dull magnet
#

might hop on next now

proud cargo
wooden dragon
#

im not normal

lone panther
wooden dragon
wooden dragon
#

I'm don't know how to make it more modular and reuse mnemonics

hexed cargo
#

this is fine comma actually

#

if you really really care then write a macro

latent sluice
#

Hey all, sent here via:
#🏥-vencord-support-🏥 message

Basically looking to make a plugin that lets you easily create Masked Links. Similar how they handle it in Obsidian/VSCode via md Plugins.
Basically the thought being if you highly text, and have a hyperlink in your clipboard, when you paste it auto highlightedText kinda thing.

So I wrote something vaguely how I'd think it'd work...? But can't really debug it as when I open dev tools to see why the plugin failed to load on desktop, it crashes (The whole 2GB electron BS, I know)
But how would I test this in the browser or otherwise?

I saw the response there that noted to try with the new 64bit client; however, this also just crashes too 😐

Context: Write lots of guides for my discord servers, and use masked links alot. Kinda PITA to do manually.

Admittedly, I'm not much of a FE engineer, more backend, so not super great with the ts jazz.

I basically have something like:

    hyperlink() {
        const selection = document.getSelection();
        if (!selection) return;

        const clip = (navigator.clipboard.read())[0];

        const data = new DataTransfer();
        if (selection) {
            for (const type of clip.types) {
                if (type === "image/png") {
                    return;
                } else if (type === "text/plain") {
                    const blob = clip.getType(type);
                    data.setData(type, blob.text(`[${selection}](${clip.text})`));
                }
            }
        }

        document.dispatchEvent(
            new ClipboardEvent("paste", {
                clipboardData: data
            })
        );
    },

    start() {
        this.document.addEventListener('paste', this.hyperlink);
    },

Semi-based on how the webContextMenu plugin does it. But not sure if that's entirely right.
(Same account, forgot password to throwaway 👀 )

#

Alternatively something like:

    handlePaste(event) {
    const clipboardData = event.clipboardData || window.clipboardData;
    if (!clipboardData) return;

    const text = clipboardData.getData('text');
    const selectedText = window.getSelection()!.toString();

    if (selectedText) {
        const hyperlink = `[${selectedText}](${text})`;
        document.execCommand('insertText', false, hyperlink);
        event.preventDefault();
    }
    },
amber basin
#

textreplace

latent sluice
#

How would textReplace get the content* of your clipboard though?
If it's just doing regex, the most you could do is something like a snippet like !link to expand into ?

Unless I'm not thinking of it properly?
Basically need to store the highlighted text + clipboard.
TextReplace can't really view either?

#

Also I think when I was looking, the way textReplace plugin handles it, is on send it was performing a transform vs in the messagebox, right?

viral roost
#

yeah textreplace cant help with that

latent sluice
#

From looking at how most md editors handle it, it's basically like the above. Pretty short and sweet. Get both clipboard + highlighted text context, and on paste reformat it.
Hell, even having a button added to the md popup would be convenient so you could just paste a link in (like github bydefault does it)

viral roost
#

looking at the code for the chatbox, there's an insertText method (module 663190) which is called every time text is added or pasted in, to modify the text in the chatbox. perhaps you could patch that? bad

#

i'll see what i can do

#

nevermind, insertTextData in 541926 is likely what you care about
it's what's called when you paste in text and handles the replacing

viral roost
latent sluice
latent sluice
# viral roost this seems to work

Works like a charm! You absolute legend!
Not sure if you want to, but you should submit it as a public plugin; I know quite a few people were asking for it outside of this server which is partly why i decided to try tackling it.

If not, I can open a PR and credit you as you did most of the troubleshooting!

#

This account is obv a tossaway as you can tell anyway :fingerguns:

plush parcel
#

asking for a friend: are you allowed to use fs in a public plugin

viral roost
#

no and if you need to use fs you're doing something wrong

plush parcel
#

yea i expected it to be no considering how dangerous it can be, thanks !!

viral roost
#

you shouldn't have to use fs at all. for plugin settings there's definePluginSettings, for storing other data there's DataStore, and for uploading files from the user's pc discord has methods for it

dull magnet
#

you can use it if you have a really good reason to and make it secure

plush parcel
#

hm

dull magnet
#

what for

plush parcel
#

right now i'm trying to make settings work with a patch

#

friend suggested fs

dull magnet
#

huh

#

wdym settings work with a patch

plush parcel
#

use a settings value in a patch

dull magnet
#

why in the world would you need fs for that

plush parcel
#

IDK i'm not the one who suggested it

dull magnet
#

$self.settings.store.banana

viral roost
#

$self.settings :clueless:

plush parcel
#

oh.

dull magnet
#

or make a getter on your plugin instance for it

plush parcel
dull magnet
#

you can access your own plugin object via $self

#

so if you need anything in a patch, just put it on your plugin object and you can use it

wooden dragon
#

hehe rust self

dull magnet
#

nop

wooden dragon
#

also you are using all the emojis I used once

#

thats based

dull magnet
#

huhhh...

#

me?

wooden dragon
#

yeah you

#

silly

dull magnet
#

i just use whatever emojis i find fitting

#

i discover new emotes like weekly and use them way too much for a bit then never use them again

wooden dragon
#

except for menhera hopefully

dull magnet
#

yep

#

menhera is eternal

plush parcel
#

i am a master at work

tender trellis
#

does someone have a quick css file to remove discord's stupid avatar frames?

indigo meadow
# tender trellis does someone have a quick css file to remove discord's stupid avatar frames?
.avatarDecoration__14b3c,
.avatarDecoration_ae35e3 {
    display: none;
}

.avatarDecorationHint__03e0b {
    left: 0px;
    top: 0px;
}

.avatarDecorationHint__03e0b > foreignObject {
    width: 80px;
    height: 80px;
}

[mask="url(#svg-mask-avatar-decoration-profile-status-square-80)"] {
    mask: url(#svg-mask-avatar-status-round-80);
}

[mask="url(#svg-mask-avatar-decoration-profile-status-mobile-square-80)"] {
    mask: url(#svg-mask-avatar-status-mobile-80);
}
wooden dragon
#

I wonder if I could use the new view transition api to make clean discord state transitions

proud cargo
proud cargo
#

i mean

#

feel free to switch out electron?

dull magnet
#

vesktop

proud cargo
dull magnet
wooden dragon
#

I have made my own client for funsies and its garbage and broken

dull magnet
#

u loe chromiume 118

wooden dragon
#

so rn I have normal discord

proud cargo
dull magnet
#

uh?

#

why would it not

proud cargo
#

i forgor

#

was a while ago

#

ah! nvm it was an electron-vite issue, they stop at 26

green vessel
#

How can I test out custom plugins?

dull magnet
#

see docs folder on github

vale siren
#

Does someone know where the direct upload module is now?
Can't figure out how to get it so I send an image on click

brave cape
#

anyone know how to remove the discord watermark in the top left?

#

i mostly just need the name of it

dull magnet
#

wrong channel

brave cape
#

which channel

cedar marsh
shrewd tundraBOT
trail ginkgo
#

lmao watermark

fair spear
#

DON'T ASK WHY I'M BUILDING VENCORD INSTALLER JUST HELP ME TURN OFF THE "warnings being treated as errors" THING

dull magnet
#

try using different toolchain

#

or build the cli, it doesn't use cgo

fair spear
#

i already built the cli but i'm just doing gui

#

been struggling with that

#

but

#

dang it's working

woven lion
#

does Alerts.show() not have an event for when the alert is dismissed (cc @dull magnet)?

#

i have onCancel, onConfirm, and onConfirmSecondary handlers

#

but it doesnt fire any of them if you click out of the alert window

#

ah well thats unfortunate

#

this should do tho

verbal grotto
timid hinge
spice locust
#

Any good universal code formatter for VS Code?

cedar marsh
#

Prettier, but it fails the constraint of good imo

spice locust
#

Tried Unibeautifier, kinda confused whether I need to manually install dependencies or whatever.

worthy frost
#

I have made a plugin which adds a few badges to users, but whenever its enabled, certain user's profiles will crash discord.
disabling it fixes this issue, any ideas?

dull magnet
#

if you want help, you need to share code, errors, etc

worthy frost
#

this is one of the few badges i'm adding to users part of a specific guild.

Where would i see errors?
Is there a log file i can open?

worthy frost
#

@dull magnet where would logs be located?

viral roost
#

have you perhaps tried checking in devtools

#

(also please don't ping for support #rules)

blissful reef
#

This is not working anymore with the latest patch update, not sure what to change to make it kick in again 😕

wise ingot
#

quickcss editor is saying this is an error when it is valid css (it applies correctly)

#

i guess the editor css linter is outdated?

hexed cargo
#

hi i'm stupid, how do i use react devtools with vencord

dull magnet
#

settings

hexed cargo
#

i do have it enabled, and have devtools opened via pnpx react-devtools

worthy frost
hexed cargo
#

mhm

#

i found it!

#

thank you

tepid granite
#

Is anyone else instant crashing via react devtools?

#

It happens even on full client refresh

#

so it's not the memory thing

wise ingot
#

devtools is fine on vesktop

tepid granite
#

...Huh, opening devtools while it's loading does prevent it from crashing

#

bizarre

#

danke

hexed cargo
#

having an issue where useState is not a function
however i'm importing the useState from discord's react here:

import { useState } from "@webpack/common";
// ...
const [cps, setCps] = useState<number>(0);

why is brokie?

dull magnet
#

uh

#

dunno

hexed cargo
#

well shit

dull magnet
#

log it and see what it is

hexed cargo
#

it's undefined

#

i checked!

dull magnet
#

uh oh!!

hexed cargo
#

yeah i figured

#

i re-injected and everything

dull magnet
#

that find scares me

hexed cargo
#

it works.

#

can you tell i've never done this before mmLol

oblique lark
#

if you aren't nesting at least three macros deep is it really rust coding

#

please god help me

wooden dragon
#

so true

oblique lark
#

least confusing if match statement

wooden dragon
austere mauve
#

that's normal

#

but no idea why ur mnemonic is an enum

wooden dragon
#

cuz its a token

austere mauve
#

kid named &str

steep vapor
#

fun

wooden dragon
#

omg forgor to rename the Token::Instruction

austere mauve
#

you can match over the &str

#

sane

wooden dragon
#

hmm?

green vessel
#

Is anyone down to teach me coding?

dry patio
#

no

green vessel
#

anyone else?

#

i know a bit of python

#

but its very baasic

visual berry
#

So I made a build of vesktop that allows for transparency on linux, the issue is the fact linux really only has two options: on or off

#

yet the UI expects you to be on windows 11 so it shows more options

#

but they all do the same exact thing

green vessel
worldly pivot
#

catppuccin i think(?)

rocky jackal
#

Looks hella confusing

rocky jackal
hexed cargo
amber basin
blissful reef
dull magnet
#

pins

weary saffron
#

hey guys, i was trying to make a plugin for vencord but I am having some trouble. Should I ask for help here or #🏥-vencord-support-🏥 ?

steep vapor
weary saffron
#

alrighty

#

I just wanna know how to send a modal, I was able to add some slash commands but I don't know how to create and send a modal

dull magnet
#

do you mean show the user a modal? or execute a bot's modal?

weary saffron
#

show the user a modal

wooden dragon
steep vapor
#

thank you

green vessel
#

Sorry thank you *

magic dagger
#

do any of you guys know where i can buy a cheap hosted domain link with .dev ?

dull magnet
#

porkbun

blissful reef
cyan jay
#

how do i iterate over threads in a given text channel

hexed cargo
#

i managed to fix it

bronze otter
#

how can I debug a patch that doesn't apply to an id-assigned module?

weary saffron
#

I looked at the sendTimestamp plugin and found out how to make a plugin. Although does anyone know if it's possible to remove the space between the "Title" and input field ```tsx
<Forms.FormText>
Title
</Forms.FormText>
<input
type="text"
value={title}
onChange={e => setTitle(e.currentTarget.value)}
placeholder="The embed title..."
/>

rocky jackal
#

style={{ marginBottom: 0; }}

magic dagger
#

hallo

cyan jay
#

haii

weary saffron
stuck falcon
minor jolt
#

any idea why my gateway keeps DYING

wooden dragon
#

I eated it

minor jolt
#

fat!

#

i never expected to need to do this but time to polyfill object.hasown i guess ?

silk sorrel
#

just ```js
Object.hasOwn = (obj, prop) => obj.hasOwnProperty(prop);

minor jolt
#

yea

#

just what i did lol

#

but gateway still gets KILLED

#

murdered

#

oh what de hell

#

it is ALIVE

#

phew i legit thought this was teh end of the line lmao

weary saffron
#

anyone know what that weird line is? and how to remove it

bronze otter
# dull magnet what?

in 2637a020d5aec5c71021.js,

match: `(\w+)\.\w+\s*=\s*function\(\w+\,\w+\){for\(var\s+\w\s+in\s\w+\)\w\.o\(\w,\w\)&&!\w\.o\(\w,\w\)&&Object.defineProperty\(\w,\w,{enumerable:!0,get:\w\[\w\]}\)}`,
replace: `$1.d = function (target, exports) { console.log("hello there"); for (const key in exports) { Object.defineProperty( target, key, {get: () => exports[key](),set: e => { exports[key] = () => e }, enumerable: !0, configurable: !1}); } }`

doesn't do anything but gives errors

silk sorrel
#

why would you need to patch that

bronze otter
#

I need

silk sorrel
bronze otter
#

so?

#

what am i doing wrong

dull magnet
minor jolt
dull magnet
bronze otter
jagged briar
#

cause that's not how patching works

bronze otter
#

it is

jagged briar
#

patches are for discord's code, not webpack's

dull magnet
#

our patcher works by monkey patching webpack's module loader. thus its not possible to patch webpacks own code

bronze otter
#

also, if I set wreq.d, wouldn't it be too late?

dull magnet
#

read the comments in Vencord's patchWebpack file

#

figure out the rest

warm comet
#

how would you embed an image (blob) in a sendbotmessage?

weary saffron
#

I don't think you can send anything other than content using SendBotMessage

warm comet
#

the pain is real :(

weary saffron
#

Yea

#

I was trying to send an embed

green vessel
#

wtf is a webpack

weary saffron
# weary saffron I was trying to send an embed

My solution was by dispatching a MESSAGE_CREATE event ```ts
FluxDispatcher.dispatch({
type: "MESSAGE_CREATE",
channelId: ...
message: {...}
})

The message is only available to the client but it does not look ephemeral
proud parrotBOT
cedar olive
#

you can send embeds with that

#

and the message is ephemeral

weary saffron
#

I tried making it send an embed, could you show me how

weary saffron
cedar olive
#

yeah

weary saffron
#

I am not sure why I did not think of this earlier lol

weary saffron
cedar olive
#

that's just a modal title border

#

just add a margin or padding

weary saffron
#

I want it removed if possible

#

when a bot sends a modal it is not there so I assume there is a way

cedar olive
#

idk how to do it

weary saffron
#

unfortunate, thanks for help anyway!

versed osprey
#

hey i have a code that is a / command that sends a link to a pic of a goose and i was wondering if there is a way to send both the link and say above the link "HONK"? without the link shoing

silk sorrel
#

Upload the goose as an attachment once, then use the same attachment id in every message to reuse the pic

versed osprey
#

its not the same pic

#

its getting it from an api

silk sorrel
#

Oh

versed osprey
#

should have prob posted the code lol

#

do you have an idea on how to do it here?

#

@silk sorrel

silk sorrel
#

You'd have to send two messages or hide the link somehow (like the spoiler trick)

versed osprey
#

ok tnx for the help ill try that

wispy maple
#

Hello guys. Is it possible to have different fonts for different languages? I've came to this peace of code that almost make some sense but it doesn't work...

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@550&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@550&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@550&display=swap");

:root {
  [lang="en"] {
    --font: "Playpen Sans";
  }
  [lang="el"] {
    --font: "Comfortaa";
  }
  --code-font: "Roboto Mono";
}

body {
  font-family: var(--font), sans-serif;
}

code {
  font-family: var(--code-font), monospace;
}```
pliant pasture
wispy maple
pliant pasture
#
<body lang="en">
  <h1>Englis </h1>
  <p>Meow meow emow.</p>

  <h1 lang="el">Ελληνικό</h1>
  <p lang="el">Αυτό είναι ένα παράδειγμα κειμένου στα ελληνικά.</p>

  <code>console.log("Hello, World!");</code>
</body>`
wispy maple
#

hm... it seems that it's not working.... i also made sure to include the google fonts in above lines..

wispy maple
pliant pasture
wispy maple
#

Yeah.. trying to make my own file css for "custom" settings in discord.. since i'm using themes, developers are using their own fonts, in my eyes don't seem very nice in greek and such, so i made this little file and add this type of code there...

#

oh shit... i think i figured it out... take a look @pliant pasture

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@550&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@550&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@550&display=swap");

:root {
  --font-en: "Playpen Sans", sans-serif;
  --font-el: "Comfortaa", sans-serif;
  --code-font: "Roboto Mono", monospace;
}

body:not([lang^="el"]) {
  font-family: var(--font-en);
}

body[lang^="el"] {
  font-family: var(--font-el);
}

code {
  font-family: var(--code-font);
}```
pliant pasture
versed osprey
#

is there a way to change what this button dose? (what link it opens) in the listening rpc?

#

im already changing the activity type from playing to listening but i was wondering if i can change this

wispy maple
pliant pasture
#

ok

pliant pasture
#

Oh

#

I mean, you can technically change anything on your client

#

You can make that button send a message named "cat" as well

versed osprey
#

can I to change it for other ppl tho?

wispy maple
# versed osprey can I to change it for other ppl tho?

any changes made in your client affect only your client. If you want to make ppl being transferred in other links, you can use an addon/plugin called "CustomRPC" where you can make your own RPC like myself. You can use your own links, texts, titles.

versed osprey
#

i want it to give the link of the song

quaint hedge
#

obsidian is so useful for writing notes for myself

brisk dust
#

I need help making the UserPFP plugin for vencord. I know this code only loads the css but that is all that I have managed to make and I am also trying to make the plugin less laggy. Might be able to only load Profile Picture on user profile and not in members list or anything unless Always Animate is toggled on in the plugins directory.

#

I have anonymise file names on btw

amber basin
#

just use css

#

this wont and will never be accepted as a plugin if it just loads css

brisk dust
#

No because it is laggy

dull magnet
#

if it's laggy then your css is likely at fault

amber basin
#

a plugin to load it wont fix that

brisk dust
#

Thats why Im saying that I want to add more features

brisk dust
dull magnet
#

it won't

#

only if it actually applies to something

brisk dust
#

yeah

#

it does

amber basin
#

nuh uh

#

css only loads the pfp if its applied somewhere

brisk dust
#

It applies the pfp to the user profile and replaces it

#

You can check all of the code out

amber basin
#

i know how it works

brisk dust
#

Css also includes bbadges and has to be a plugin to show names of badges

amber basin
#

if you really want a plugin then modify usrbg

brisk dust
#

I have

#

I need help

dull magnet
#

why in the world do you have those :is() selectors

#

they do nothing

#

anyway your selectors seem very inefficient so that's probably why it's laggy

brisk dust
#

Because ive never made a vencord plugin before

#

and why im asking for help with making the plugin

dull magnet
#

stop with the :is(), just omit it
stop targeting img and div, use the proper classes of those elements instead

brisk dust
#

But then the CSS file will be longer, also we have a bot that adds to the CSS each time someone requests and it gets approved

#

And it is integrated into Aliucord and Vendetta

amber basin
#

@dire fern please rewite the userpfp builder and remove the junk

#

just store a json file??????

brisk dust
#

The json file is where the links are stored

amber basin
#

how would that break plugins then

brisk dust
amber basin
#

ohhh yeah im gonna husk that instead of explaining

brisk dust
#

I don't have any brain cells left

amber basin
#

"changing the css file would break the plugins that load from json"

#

thats what youre saying

brisk dust
#

Might be able to automatically create a new CSS file specifically for Vencord that has specific selectors

#

The CSS is made using GitHub workflows

dull magnet
#

what? why would you not make the general css file everyone uses better?

#

don't tell me you parse the css file on mobile

brisk dust
#

?

brisk dust
#

Nexpid

dull magnet
proud parrotBOT
# dull magnet https://github.com/UserPFP/UserPFP/blob/main/source/template.css you can improv...

**template.css: **

/* AVATAR-TEMPLATE-BEGIN */
/* Custom avatar for {id} */
div:is([style*="{id}"]),
img:is([src^="https://cdn.discordapp.com/avatars/{id}"]) {
  content: url({img});
  object-fit: scale-down;
  aspect-ratio: 1;
  background-image: none !important;
}
/* AVATAR-TEMPLATE-END */

/* BADGE-TEMPLATE-BEGIN */
/* Custom badge for {id} */
:is([class^=userPopoutInner], [class^=header_], [class^=userInfo_], [class^=none_]):has(img[src^="https://cdn.discordapp.com/avatars/{id}"]) div:is([class^=profileBadges_], [class^=badgeList_]):before {
  content: "";
  width: 22px;
  height: 22px;
  background: url({img}) center / 100% 100%;
}
/* BADGE-TEMPLATE-END */
dull magnet
#

it will not break anything

brisk dust
#

Idk how to do that

amber basin
#

then get nex to do it???

brisk dust
#

Also the aria labels for badges only work with scripts, not css

dull magnet
#
  • all of these :is() are useless
  • targeting elements like div and img is very inefficient
#

badges??

#

why are there badges

#

this is about pfps, no?

brisk dust
green vessel
#

userpfp has badges too

#

dont ask why

#

and how i know this

brisk dust
#

Only a few

green vessel
#

just know they have badges

rocky jackal
brisk dust
rocky jackal
#

It will redirect the app

#

did you test it?

amber basin
#

that will break

#

click it

#

see what happens

#

add target="_blank" to fix that

#

iirc

rocky jackal
#

yeh that

amber basin
#

havent had a chance to review the plugin code

#

im on mobile

rocky jackal
#

you need to redirect it to "a different tab", in this case, opening the browser

rocky jackal
amber basin
#

i can in like 10m

brisk dust
#

Can I send the new link and see if it is ok

amber basin
#

go for it

#

no

#

do what i said

rocky jackal
#

Half of the imports go unused

amber basin
rocky jackal
#

also, don't

amber basin
#

you can do that

#

its just importing a type

rocky jackal
#

so not all react imports break, got it

amber basin
#

gets removed at buildtime

#

only imports you use break

#

not types

dull magnet
#

type imports are only for typescript

rocky jackal
rocky jackal
#

lmfao

#

that caught me off-guard

amber basin
#

it does that when i send one from vendetta

amber basin
#

bc it doesnt give the ?name param in the link

#

vencord cant know what the emoji name is

rocky jackal
#

I wonder, how easy would it be to patch the pfp components to add these usrpfps

brisk dust
amber basin
#

L

brisk dust
rocky jackal
#

did you, try sending the discord invite?

amber basin
#

stop

#

stip

brisk dust
#

Changed the URL and removed react

amber basin
#

read what i sent.

amber basin
brisk dust
rocky jackal
pliant pasture
#

Peak typescript

brisk dust
#

I asked and index.tsx said go for it

amber basin
#

thats not what i meant

brisk dust
amber basin
#

id prefer not

brisk dust
#

Ok

amber basin
#

i mean

#

maybe

#

if i have freetime

brisk dust
#

I don't know what u mean by add _blank

amber basin
#

sorry for ping but @vapid oar can you help please

pliant pasture
amber basin
#

LMAO

muted thunder
#

wouldn't it be easier to use some component to add the user avatars instead of css?

brisk dust
#

That was Coolesding btw

amber basin
#

i can tell

rocky jackal
amber basin
#

i tried to say look at what usrbg does patchwise

brisk dust
#

So a plugin would be better than CSS

muted thunder
#

probably decor has something

amber basin
#

yes

#

OH YEAH look at decor code

brisk dust
amber basin
#

ty wolfie

rocky jackal
muted thunder
#

???

#

is open source

rocky jackal
#

but yeah, you can get something if you look at the right place

brisk dust
amber basin
#

once im bored of working on genesis for yhe day i might do usrpfp

rocky jackal
muted thunder
#

guh

safe quiver
#

aw

#

🍌

rocky jackal
#

no

muted thunder
#

i dont know how these regex patch works but

#

it shouldn't be hard right

pliant pasture
#

I love regex i love regex

rocky jackal
amber basin
#

all the patch does is override discord's banner to get it from the plugin

rocky jackal
rocky jackal
brisk dust
#

Can someone just completely fix the code to be much better, I will give them a badge and a sparkly sticker

muted thunder
#

we shouldn't use Regex for anything

amber basin
#

nuh uh

#

monkeypatch bad

brisk dust
#

It's shiny

rocky jackal
muted thunder
brisk dust
muted thunder
#

i will see if i still have wifi at home when i get home

rocky jackal
muted thunder
#

dont patch

brisk dust
#

Patchimari