#🧩-plugin-development

1 messages Β· Page 87 of 1

hushed loom
#

Wtf

kind aspen
#

Didn't saw your message πŸ˜…
I've updated about an hour ago

quick zephyr
#

you get a stopwatch and time yours too

hoary pilot
#

@dapper salmon so basically Goodperson intercepts message create events and message update events, scans for bad words, replaces them with good words and fires a message update event with the new content (and a suffix so you don’t end up in a loop of message updates)

dapper salmon
#

Is the message in async MESSAGE_CREATE ({ guildId, message }) the same message type thats in onBeforeMessageSend and whatnot?

#

Does it have the same fields and information

hoary pilot
#

no since the MESSAGE_CREATE is a full message and the onBefore message is a pre-send

#

just look at how i use it

dapper salmon
#

Okii then

#

Thamk you for this ^^

vital tree
dapper salmon
#

I made a plugin to replace some users messages with meowing

#

Can I post into js snippets

quick zephyr
floral briar
#

f

quick zephyr
#

why they naming a store f though fr

hushed loom
hushed loom
#

I forget exactly but I have some stores with random names from when I was just playing around

quick zephyr
#

that's a builtin store

#

one of discord's

#

that's actually used by the client on the activity tab on profiles

hushed loom
#

Oh 😭 I guess I was thinking of something else

quick zephyr
#

well it's only used for a marvel rivals special widget at the moment

#

but it seems wuvering waves support is incoming

#

based on an enum of only those 2 games

dull magnet
sudden belfry
#

alternative to Forms.FormSection?

dull magnet
sudden belfry
#

oh

#

well that's gonna be a problem, oof

#

any workarounds?

dull magnet
#

its useless

#

just dont use it

sudden belfry
#

well alright

eager egret
#

@pure temple any news regarding this? I just got through my midterms as well, I could dedicate some time to help out

pure temple
#

oh yeah i've been working on it

eager egret
#

this is my implementation on a fork

pure temple
#

ok so i figured out how discord handles time formats and it's

#

super scuffed but figured out

eager egret
#

omg z_cat_yay

pure temple
#

i fixed up the patched alittle?

#

check if that is enough

eager egret
#

oh those steps refer to my own

pure temple
#

try out the newest version of the plugin, it's rather different

eager egret
#

does it also include timestamps near usernames?

pure temple
#

on messages?

#

or like on profiles

eager egret
#

yes

#

here

#

pretty much

#

that's the biggest UX improvement imo

pure temple
#

nah, i was thinking about it but it might be out of scope for the plugin? but im kinda bored and have nothing to do this morning so might as well right

eager egret
#

mine shows the current date of the other user

eager egret
#

so you have instant feedback

#

obviously this should be an optional feature

#

imo

pure temple
#

TimezoneOnProfile was my thought so it's just on profile, but im absolutely downf or expansion

eager egret
#

but ven found it quite handy as well if I recall correctly

#

shrug personal preference ig

pure temple
#

i think alll id' have to do is make my inline render patched into the messages

#

i think this feature is great

#

do you have code that makes that happen?

#

if not then i can make it

eager egret
#

but yes mine already does it

#

that was the original goal for me anyway

#

it doesn't show it on the profile at all

pure temple
#

perfect, show me the code

eager egret
#

just sent the link 😭

#

check my fork

pure temple
#

zamn

#

sorry it's like 0750 and i've already cleaned the house for like two hours im kinda cooked

#

need breakfast

eager egret
eager egret
#

I just saw the new comments on the PR and thought I'd try and catch up on things

#

the main issue for me was always proper compatibility, since the pronouns plugin patched a single jsx return into an array and injects itself

#

thus I have to count for both the unpatched and already patched version, and there isn't really a better way positioning wise to patch afaik either

#

and I doubt two patches where one will always get ignored would be the way to go, I should probably improve the single patch itself but I haven't really had the time

pure temple
#

do you mind if i figure out a patch for it

#

i think i have an idea

eager egret
#

yeah no worries, just let me know

#

I'm hella curious

#

I unfortunately barely have enough time with school and work on top

#

but I should have more free time this month

pure temple
#

uni has JUST started for me so i still have the time before calc 2, calc physics, discrete math, and my two other engineering classes academically molest me

eager egret
#

lmao πŸ₯€

#

anyway overall I also implemented listeners back when I made it, just so it could easily update the timezone changes when the user does update them

#

oh and instead of having the select on the profile it comes up in the right click user menu

pure temple
#

i think i forgot to make the plugin re-render itself when you select a timezone so you don't have to refresh

eager egret
#

mhm, mine includes that

#

the menu also uses built in components

#

so no issues there with css either

#

since it doesn't use any really

#

directly

#

anyway, lmk if you can figure out the patch, I could write a merge with your plugin after that you could look through

#

that should be easier

pure temple
#

y eah alright

eager egret
#

but up to you really tgk_babyrun

pure temple
#

im gonna quickly make this patch then i'll decide on merge stuff

#

i will say that the method that i calculate the timezone math is like, 10x more disgusting now

#

update() went from a 3 line to like 25 line method

eager egret
#

I can have a look once I get home

#

haven't seen the changes yet

pure temple
#

@eager egret so how does this look?

#

i tried to make it be before the pronouns plugin but that was kind of a headache that i'll get to later

#

but otherwise i think it looks nice there?

#

wait i just realized something should we make it their relative time NOW? or the relative time of the message?

granite dune
eager egret
#

with a single patch?

#

oh I replied to the wrong message

#

😭

eager egret
pure temple
#

ok so like that cool

#

oh i forgot to make it not appear for myself

eager egret
pure temple
#

i love seeing my time twice

eager egret
#

why can you even set it for yourself 😭

#

(so can I in mine but that's besides the point)

pure temple
#

that's a great question

eager egret
pure temple
#

should be a quick fix

#

unfortunately the boys are really intent on inticing me with some mahjong rn

eager egret
#

just let me help dude 😭

pure temple
#

aight fine

#

can you figure out how to just not have it appear for myself, TZ on your own profile and otherwise?

eager egret
#

mhm md_ohmy

pure temple
#

thanks king

eager egret
eager egret
#

it should be pretty simple to get the user id there anyway

pure temple
#
        {
            find: "showCommunicationDisabledStyles",
            replacement: {
                match: /(?<=\i.*&&.*!.*\i\.*&&.*)(:\i,application:\i}\))/,
                replace: "$1,$self.TimezoneTriggerInline(arguments[0])"
            }
        }

here king

eager egret
#

might just be me but I genuinely don't see an option to even set the timezones after building your PR

pure temple
#

click on where it says TZ

eager egret
#

bro what the whip is this 😭

#

yeah uhm-

pure temple
#

css isbroken again?

acoustic yew
pure temple
#

strange, on mine it's fine

eager egret
#

I feel like you could literally just transition to my implementation entirely

#

it uses built in components directly

pure temple
#

try it, if it's good hten im all for it

eager egret
#

and is more user friendly imo

#

let me build rq

pure temple
#

i like this

eager egret
#

could be added to the profile as well if needed

#

it's only on the right click menu currently

pure temple
#

try it see how it feels

eager egret
#

bet

acoustic yew
#

why not just a dropdown where you can seach lol

eager egret
acoustic yew
pure temple
#

this is basically both of our programs together

#

nice

pure temple
#

it's beautiful

quick zephyr
#

don't context menus support a search bar at the top. I swear I saw a plugin with it. or was it a custom component πŸ€”

eager egret
#

lmk if there's anything better-

quick zephyr
#

must be custom ig

#

could try a search box instead of a menu item at the top

eager egret
eager egret
#

haven't touched messages yet though tgk_babyrun

#

I'll try and figure out something a bit more pleasing UI wise

#

btw, how come PRs nowadays are opened into main directly?

quick zephyr
#

searchable select is fine tbh as long as the normalization logic on the searched terms and the compared timezones is good

eager egret
# eager egret https://github.com/Feinq/Vencord/tree/pr-3492-revamp

commit message for better context:

feat: Refactor UI to use ContextMenus and Modals
Replaces inconsistent CSS styling with standard components. Separates the plugin into multiple files for improved readability. Add plugin option to show current user-specific time next to messages for better UX.

floral briar
#

shrug

eager egret
#

anyway

dull magnet
#

look at BetterSettings/VencordToolbox

vapid oar
#

vencord plugin that lets you do this

dull magnet
#

you don't need a mod for that do u

vapid oar
#

no but still

dull magnet
#

oh i did it with a manual http request I remember

eager egret
#

seems more organized to me overall

#

and a lot more appealing

dull magnet
#

I don't think using a context menu for this would make sense

eager egret
dull magnet
#

what's wrong with a select?

eager egret
#

well considering that it probably wouldn't be changed frequently, you're right

dull magnet
#

put the GMT offset at the start and sort it by offset

#

sort it by offset then by alphabet

eager egret
#

the primary GMT group is sorted by the offset already, the other timezones following that are based on the Intl.supportedValuesOf() order

vapid oar
#

i dont think you need to add the manual offsets

eager egret
#

I didn't really modify much of the functionality that Hazrtine did catsweat

eager egret
#

but wanted to discuss it first with him among some other additions

#

since I'm not sure of the exact reason these were added anyway

vapid oar
#

what he meant was sort by the GMT+ offset

#

and if the offset is same sort alphabetically

eager egret
#

fair enough, I kinda misunderstood mb

dull magnet
#

I wouldn't add manual offsets

#

people shouldn't use them

dull magnet
#

it's easier to find your timezone without search that way

#

I think to a lot of people timezone isn't that intuitive

#

the plugin should definitely detect and display your own timezone so you can just tell it other people

#

add like
Your time zone: Europe/Berlin to the settings page

eager egret
#

AG_Nods gotcha

pure temple
#

@eager egret pls send me a friend req i can't send you one

dry reef
#

Anyone know why it's showing unexpected token?

{
    find: "zoomedMediaModalHelper",
    replacement: {
        match: /(function \i\((\i),(\i),(\i)\){)(let \i\=\i.length)/,
        replace: "$1$self.propogateImages($2,$3,$4);$5"
    }
}```
granite dune
#

probably its not updated to handle arrow function modules

granite dune
bleak falcon
#

Hey! wanted to retry plugins after a little while. But even if i pnpm dev'd i can't have the react devtool
so i used the native html and found the "onclick" function define that seems to be empty..
what i'm trying to do is unfollowing all threads from a post with one button.
I found a req in the network tab but it includes weird ass arguments and the token is needed, then i tried searching in FluxDispatcher but when i manually dispatch two related events it just doesn't work, leading me to searching the button itself but yeah doesn't seem to be working.. (Where can i see all the stores btw? maybe one is related)
-# ping on reply please, and if you want to know what flux event i used + the fetch req lmk

silk sorrel
bleak falcon
silk sorrel
#

Do you have them enabled in vencord settings? I can't remember whether they're disabled by default ngl

foggy mason
#

is there something i need to enable to use chrome dev tools ctrl shift i doesnt do anything (im using vesktop on mac)

foggy mason
#

im pretty sure i need to add "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOU'RE_DOING": true to the settings.json but i actually cannot for the life of me find it 😭

dull magnet
#

it just works

#

if it doesnt work youre probably pressing the wrong key combo

foggy mason
#

its command shift i right

proud parrotBOT
dull magnet
#

did this break

foggy mason
#

what the hell is mod

#

function?

dull magnet
#

vai what do I press for this on mac: mod+alt+i

shrewd tundraBOT
# dull magnet vai what do I press for this on mac: mod+alt+i

On a Mac, mod+alt+i generally translates to Command (⌘) + Option (βŒ₯) + I.

If you're trying to open Discord's Developer Tools, you might also find that Control (βŒƒ) + Shift (⇧) + I works. Some users have noted this as the functional shortcut on macOS for Discord's DevTools, even though Command (⌘) + Option (βŒ₯) + I is the more standard Mac equivalent for many applications.

-# Response generated by gemini-2.5-flash. AI may be incorrect or misleading.

foggy mason
#

yeah i already tried ctrl

dull magnet
#

well idk

foggy mason
#

ig ill try reinstalling

upper vessel
#

How does Discord handle webp? Thinking of making usrbg banners all encoded in webp, does Discord have any issues displaying them over something like png or jpg? (embedded as an image in someones profile)

humble tulip
#

I think discord makes their native banners you upload webp anyway

#

Oh nvm that was just ViewIcons but I replaced the url with webp and it still rendered perfectly fine

upper vessel
#

does changing the url actually change it? I was under the impression it changes the headers but still sends the same image (Discord handles image types very poorly, relies on extension and never checks file headers)

#

but mostly just wondering if the rendering + display is on-par with jpg, png, gif, etc. And also how it does with animated webp

humble tulip
#

Oh yeah, good point

#

nookies banner seems to be legit webp and animated

quick zephyr
#

Discord makes everything you upload webp

#

Webp supports animation and on discord that's used via ?animated=true query paramater for webp assets

#

most assets are available as png, jpg, and webp regardless of their source format

upper vessel
#

if you have an animated webp and dont provied the query param does it provide a static version?

quick zephyr
#

on the cdn you get different assets with ?format=<png/jpeg/webp> but on media proxy you get it by changing the extension in the url .<png/jpg/webp
on the media proxy you get different assets with ?format=<png/jpeg/webp> but on cdn you get it by changing the extension in the url .<png/jpg/webp

#

yes

#

for apng the parameter is ?passthrough=true and false

upper vessel
#

the media proxy?

quick zephyr
upper vessel
#

ah gotcha

quick zephyr
quick zephyr
#

oh true

#

I had it the other way around then swapped it 😭

clear parcel
#

i need to doc media proxy there tbh

quick zephyr
#

I did find a weird thing with emojis recently

#

if you upload an emoji as AWEBP or AVIF they arent converted to gif

#

but there's no way to know that

#

they still have the usual a_ hash prefix

#

but no signifier they are non-gif animated emojis

#

unlike gif emojis which are converted to awebp hms_mhm

upper vessel
#

this is all v helpful ty for the info

#

def sounds like webp is the move

quick zephyr
#

had to map this out for my plugin

clear parcel
#

it is docced pretty sure

upper vessel
quick zephyr
#

couldnt find it when i checked but dont remember how hard I checked

quick zephyr
upper vessel
#

comparatively maybe not

vapid oar
#

interesting autofix

dull magnet
#

Windows moment

vapid oar
#

do i have to reinject in order to update the CSP rules? they dont seem to be changing at all on restart

#

happy late 1 year anniversary to this

humble tulip
#

Are you doing a full restart or just reloading?

#

It needs a full close and reopen

vapid oar
#

yep full restart, but it doesnt seem to be changing

#

if i understand correctly then i just need to add the domain here in src/main/csp/index.ts right?

#

oh whoops i think the cors is on my side lol

#

yeah it was

#

how joyous

vapid oar
#

iframe horror

#

i could very easily use my own custom embeds since i already have the logic written for that

#

but im more worried about audio preview CORS

hushed loom
hushed loom
old beacon
#

hi, how can i edit the dom using patches ?

#

like i have a mutation observer on start listening on document

#
document.querySelectorAll<HTMLImageElement>(paths.img_badge).forEach(img => {
    if (img.src.includes(oldBadge)) {
        img.src = img.src.replaceAll(oldBadge, newBadge);
    }
});
#

and is there a guide to making patches please

stone wedge
#

dom manip kinda goated

quick zephyr
#

Typing for SearchableSelect shows that it takes:

className?: string;
popoutClassName?: string;
wrapperClassName?: string;
optionClassName?: string;

however I could only get className and wrapperClassName working. Had to patch the other 2 in. Am I missing something or is this just typed wrong?

quick zephyr
#

oh agony, on top of that there's an expiriment for this that breaks my code 😭

#

dev://experiment/2025-09-mana-desktop-select

#

new mana select isnt getting all the props passed to the searchable select. agony

silk sorrel
#

What's the mana select?

dull magnet
quick zephyr
#

it's just an entire replacement of the component

#

but it has some different props

#

and isnt accepting some of the old props

#

cant set a classname on it ,-,

hot wing
#

hiya, what's the best way to quickly reload discord during development?

#

for some reason when i reload through vencord settings it keeps logging me out

#

and reload() in console is inconsistent ;-;

granite dune
#

ctrl+r

hot wing
#

oh my ty

cedar olive
granite dune
#

plugins i use in my dev env, maybe i miss smh

#

like devcompanion can be useful

quick zephyr
#

console shortcuts is good too

#

dev companion a must

normal wagon
cedar olive
quick zephyr
#

insane

#

you have push perms tho dont you. you can just run reporter whenever you want on branch dev10

cedar olive
#

yes but I obviously test the patches before I push

quick zephyr
#

thats why companion so goated. it shows whether the patch even applied or not lol

vapid oar
#

it never works for me

quick zephyr
vapid oar
#

oh i was using equicord companion for vencord

#

whoops

quick zephyr
#

just use sadan's companion

#

best version works everywhere

granite dune
#

my beloved not supported

#

im not even sure its possible cuz api limitations

vapid oar
#

all you can really do is LSP's iirc

obsidian shell
#

satan mentioned that it would still work

#

even with just a lsp

granite dune
#

whatever, its rare when i use devcompanion

vapid oar
obsidian shell
#

idk

granite dune
#

i have something cooler trolley

#

real slopper in discord

obsidian shell
#

required: true

#

why

granite dune
#

its like that for a while

#

i did it that way at the beginning for some reason, and i havent touched it since

vapid oar
#

how do ii open the color devtools panel

#

found it

granite dune
#

🚧

quick zephyr
#

Jnder Construction

hushed loom
#

I have no reason to make an LSP version rn tho

#

The vscode apis make it 10x easier to write and debug

#

And I use vscode

vapid oar
#

so im in a bit of a corner, either i could add the audio preview URLs to csp.ts (which im not sure Vee would accept), or I could add a media proxy to my songspotlight API (which im not sure my cloudflare limits would like very much)

brave steeple
#

Is there something I need to do for my PR to get it looked at? If there is something wrong with it I can fix it I just haven't gotten any feedback on it.

GitHub

TLDR:
This should fix the &quot;Error 15&quot; in youtube embeds related to youtube identity verification. This also adds detection and workaround for the Youtube &quot;you look like a ...

hot wing
#

has anyone successfully managed to add a tab to the expression picker? im making a plugin that has a button in the chat bar but would like to integrate with the picker and i'm not super familiar with patching

#

currently just using a popout with a card component

vapid oar
#

for some reason, the exact same fetch request in my plugin's native.ts and in a normal nodejs file doesnt produce the same result, the plugin helper somehow fails the captcha while the nodejs script doesnt

#

im pretty sure i dont even need to spoof the user agent but im just throwing everything at the wall and seeing what sticks rn

#

checking httpbin it really is the exact same so im confused

vapid oar
#

ok so as it turns out its some nodejs TLS client hello handshake bullshittery blah blah so i wrote a fetch() wrapper around electron's net.request and now it works

tropic ice
normal wagon
#

random idea

#

ugly buttons yes

broken storm
#

So I'm making a plugin that uses this patch
⁨⁨```js
{
find: "0===i&&n&&!r&&(i=-1)",
replacement: {
match: /0===i&&n&&!r&&(i=-1)/,
replace: "i=Vencord.Plugins.plugins.NotificationBadgeControl.logic(d.default.getTotalMentionCount(), u.dH([h.A, c.A]), d.default.hasAnyUnread(), p.A.getDisableUnreadBadge())",
},
}

But you know what's weird? It doesn't work on Vesktop, but it works on the stock client
Vesktop just uses the default behavior regardless of what the ⁨⁨`logic`⁩⁩ function returns... but what's weird is that the logs still show that my logic function is being called
⁨⁨```js
logic(mentions: number, other: number, hasUnread: boolean, disabled: boolean): number {
  const checked = check();
  if (debug) logger.log("Received badge number logic call", checked, mentions, other, hasUnread, disabled, settings.store);
  if (!checked) return defaultNumber;
  const custom = settings.store.customLogic;

  // Later will return an integer
}
```⁩⁩
If anyone has any suggestions that'd be cool, I'll keep trying to figure this out... or not, depending on if I get bored lol
#

I've never done plugins before, so idk if my patch is actually terrible lol

quick zephyr
#
  1. Finds shouldn't use variable names such as ⁨⁨⁨⁨⁨⁨i⁩⁩⁩⁩⁩⁩, ⁨⁨⁨⁨⁨⁨n⁩⁩⁩⁩⁩⁩, ⁨⁨⁨⁨⁨⁨r⁩⁩⁩⁩⁩⁩, etc. They change frequently as Discord reobfuscates. Best to find a section of code which is unique without being interrupted by a variable name.
  2. Matches shouldn't use variable names. Use ⁨⁨⁨⁨⁨⁨\i⁩⁩⁩⁩⁩⁩ in place to match any variable. For example, ⁨⁨⁨⁨⁨⁨\i.\i⁩⁩⁩⁩⁩ would match ⁨⁨⁨⁨⁨⁩w.jsr⁩⁩⁩⁩⁩.
  3. Replaces shouldn't use variable names. Use capturing groups in the match ⁨⁨(\i)⁩⁩ to capture variables and use them with ⁨⁨$1⁩⁩, ⁨⁨$2⁩⁩, etc (number by order captured).
  4. Replaces shouldn't have spaces in them except occasional situations like a variable after a return (so ⁨return a.i⁩ instead of ⁨returna.i⁩).
broken storm
#

Mmm okay thanks πŸ‘

quick zephyr
#

Also, you shouldn't use your match as your find if you're overwriting the match with the replace.

#

⁨getDisableUnreadBadge(),⁩ is a unique find for that location.

broken storm
#

Oh cool thanks
I'll correct this one (and probably others I screwed up haha)

quick zephyr
#

what even is this supposed to do

quick zephyr
# broken storm Oh cool thanks I'll correct this one (and probably others I screwed up haha)

As for 3/4 of the arguments you're passing to ⁨⁨logic()⁩⁩, you can just access the stores directly. You can check if Vencord already exports them (GuildReadStateStore, NotificationSettingsStore) and if not, use ⁨⁨findByPropsLazy⁩⁩ (lazy is better in code to give it time to load) with some unique identifier such as in the picture.

#

Or I guess capture the existing calls is fine. More complex patch though.
⁨⁨```
(\i)=\i.default.getTotalMentionCount(),(\i)=[^]]{0,25}]),(\i)=\i.default.hasAnyUnread(),(\i)=\i.\i.getDisableUnreadBadge(),(\i)=\i+\i;

idk something like that
broken storm
quick zephyr
#

nvm neither lol. ⁨⁨Vencord.Webpack.find<...>⁩⁩

broken storm
#

⁨```js
{
find: ".getDisableUnreadBadge(),",
replacement: {
match: /0===(\i)&&(\i)&&!(\i)&&(\i=-1)/,
replace: "$1=Vencord.Plugins.plugins.NotificationBadgeControl.logic($1)",
},
}

Hmm this works
Does it look decent? I think it looks good imho
quick zephyr
#

and not make use of ⁨$2⁩ or ⁨$3⁩

#

⁨i⁩ as in ⁨$1⁩ resolved

broken storm
quick zephyr
#

check what out

#

I just meant you only used 1 variable

broken storm
#

Oh

#

I see

quick zephyr
#

and didnt feel like typing the whole thing out

#

⁨V...logic⁩ isnt a thing

hushed loom
quick zephyr
#

oh yeah that too lol

broken storm
quick zephyr
#

i still dont really know what your function does so just checking if passing the value you're updating made sense to you lol

broken storm
#

Oh lol ok
Well basically the entire plugin is to customize the app badge
Idk if it's been done before, ik there's a plugin to disable it
But mine patches the function that passes the status to the app badge function...thing and returns a different number, based on settings
So like that weird period that you might see is ⁨-1⁩, no app badge is ⁨0⁩, and greater than 0 actually shows the number

#

Anyways thanks guys, I have no idea why it's not working in Vesktop but it's def not cuz of the patch

quick zephyr
#

does vesktop even support badges

broken storm
#

It does the default behavior so yeah

#

At least on macOS

remote cedar
quick zephyr
#

give it a few more

floral briar
#

yeah prs take a random time of from 1 to 900 days to get reviewed

granite dune
#

just pray

vapid oar
#

how can I improve this finder? it works, but it's not really ideal lol ⁨```tsx
{
find: "=57.75,",
replacement: {
match: /openUserProfileModal)(.{0,20}userId:(.*?),.{0,500},disabled:\i})})/,
replace: "$&,$self.renderProfileSongs({userId:$1})"
}
}

magic sorrel
vapid oar
#

awesome thx

#

if you let a computer run for long enough you'd eventually be able to unhash every single intl key

#

it really is only 27 characters

silk sorrel
#

there are way too many collisions for even very short keys, you'd have to be able to somehow filter out the invalid results using a dictionary of real words or something

#

the hash stores 36 bits of entropy iirc (used to be 32 since they incorrectly duplicated some bits before)

#

ig alternative is generating keys based on known words like USER or PROFILE, but guessing new words would be a pain
also they sometimes misspell the keys 😭

silk sorrel
#

does that use satan's intl list

granite dune
#

im lazy to write, sorry

#

not that good, but better than nothing

#

slop key

granite dune
vapid oar
broken storm
#

So it seems as though ⁨NoSystemBadge⁩ specifies itself as only working on the stock Discord desktop client (not Vesktop and I'd assume not web). And I've noticed that with my plugin (which manipulates the system badge instead of outright disabling it), it works in the stock desktop client but not Vesktop. (I've not tested on web yet.) Vesktop almost just ignores my patches. Is there a reason for this? Does Vesktop just handle the system badge differently?

formal light
silk sorrel
#

Did you generate the chain based on whole words or individual characters?

formal light
#

and only order 1, cos anything above that woldnt be unique enough

silk sorrel
#

I see, interesting

formal light
#

the main issue was hash collisions, but since the json file dc uses is sorted alphabetically, i could check if an identifier was in the expected location

silk sorrel
#

Do you have the source code for that public anywhere

formal light
#

i can put it on gh later if u want

#

i was planning on refining it to enable searching for a specific key, but wasnt sure exactly how id go about it

silk sorrel
#

Hmm ig it's quite likely that u find a hash match for one key, but some keys dont follow the pattern (some have a _ as the first character or are lowercase) so you would never find the original

formal light
#

yeah, i just removed them

#

(i think they have all been found)

#

ill check if theres any gaps around those ones later

silk sorrel
#

did prism remove their vencord clanker repo 😭

#

i was checking how they did their intl lookup thing

granite dune
#

did a full refactor and stuff

#

later ill reupload

granite dune
silk sorrel
#

btw I dont really get the alphabetical lookup thing
I assume the KEY_MAP values are the original keys (the same as in satan's file), but you also check whether hashing the keys would keep the order with the candidate key?
but like the hashes of two ordered keys don't neccesarily also have to be ordered?

#

also why not just directly compare the 64bit hash representation, that should be faster than comparing strings

#

was this also vibecoded

granite dune
#

i should fix some stuff but im lazy

#

i love seeing how it sometimes overcomplicates a 10s problem as if it were related to quantum equations

#

in the end, i still have to fix the issues it generated blobhuskcozy

granite dune
#

this multi step modal looks so cool

vapid oar
#

finder so unused even vencord companion forgot it exists

#

what do i do when the module infact is lazy loaded

#

the patch works but it always complains

granite dune
#

noWarn: true

dull magnet
vapid oar
granite dune
vapid oar
#

oh yeah

vale pier
#

Heyo. I want to open the gif menu from my code. I've tried to import ⁨⁨import ExpressionPickerStore from "@webpack/common"⁩⁩ and then do ⁨⁨ExpressionPickerStore.openExpressionPicker("gif");⁩⁩ however this doesnt work. It somehow sets the state to "open" so discord thinks it is opened (realized this when clicking the official gif button, that I need to click twice to open the menu, so propably it is "closing" the menu first time) but the menu doesnt really opens. Am I doing something wrong here or is the function broken?

Also tried to query the gif button to call click on it but its really hard as the only way Ive encountered would be to use the exact aria label which makes it language incompatible.

granite dune
humble tulip
#

You can also just import ComponentDispatch from @webpack/common

vale pier
vale pier
quick zephyr
#

I was cooking tho

picker = findByCode("activeView", "activeViewType", "lastActiveView", "getState().activeView");
picker("gif", findByProps("NORMAL", "OVERLAY").NORMAL, SelectedChannelStore.getChannelId());
vale pier
quick zephyr
#

I just reverse engineered the onClick of the emoji button

#

took a while to find findByProps("NORMAL", "OVERLAY").NORMAL though

granite dune
#

lmao

humble tulip
#

I'll do you one better: ⁨ComponentDispatch.dispatch("TOGGLE_GIF_PICKER")⁩

humble tulip
vale pier
quick zephyr
#

"emoji", ..., channelid
figuring out where a came from was annoying lol

dull magnet
#

like a click

broken storm
proud parrotBOT
quick zephyr
#

why you gotta do allat

#

you just need the urls for images dont you? cant you just use spotify's image url and let electron resolve the image

#

even discord itself doesnt use the media proxy for spotify covers it just uses spotify's cdn directly

#

⁨⁨https://i.scdn.co/image/<hash>⁩⁩

vapid oar
#

but wdym let electron resolve the image

#

like in native.ts?

#

alternative solution

#

you can't create object URLs in the native thread, that was the first thing i tried

#

but this also requires the thumbnail & all audio previews to be loaded otherwise the component wont render

#

ehh

#

i still think this is better than adding like 6 more domains to csp

quick zephyr
vapid oar
#

ok nvm turns out its not that many domains

broken storm
hushed loom
#

It does a lot for things like this

#

It's somewhere buried in user plugins

vapid oar
#

oh lol

#

it just adds it to csp yea

#

this is all i really need tho

dull magnet
vapid oar
dull magnet
#

if you're having issues with cors you're doing something wrong

#

cors doesn't apply to image tags

#

why are you fetching the images

dull magnet
#

that is csp not cors

vapid oar
#

oh

#

i thought it was the same thing

dull magnet
#

no..

vapid oar
#

oh

#

trolley

dull magnet
#

vai explain csp vs cors

shrewd tundraBOT
# dull magnet vai explain csp vs cors

CSP (Content Security Policy) and CORS (Cross-Origin Resource Sharing) are both security mechanisms that protect web applications, but they operate differently:

  • CSP is a browser security mechanism that helps prevent attacks like Cross-Site Scripting (XSS) by allowing you to define which sources (domains, protocols, etc.) your website is permitted to load content (scripts, styles, images) from. The browser will only execute or render resources from these whitelisted sources.
  • CORS is an HTTP-header based mechanism that allows a server to specify any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. It provides a controlled way to bypass the Same-Origin Policy, which normally restricts web pages from making requests to a different domain.

In short, CSP focuses on what content your website can load and execute, acting as an allowlist for client-side resources. CORS, conversely, focuses on who can access resources from your domain, enabling secure cross-origin data sharing between different web origins.

-# Response generated by gemini-2.5-flash. AI may be incorrect or misleading.

vapid oar
#

yea i didnt wanna add more domains to CSP so i did the image fetching instead but i think this is cleaner anyway

#

but i still needed to push the song parsing part to native because of CORS

broken storm
#

My plugin now works in vesktop so yay

dull magnet
#

@umbral canopy im sorry for rejecting it but don't get discouraged, you did a great job anyway πŸ€—

lost gulch
dull magnet
#

for next time I suggest discussing ur idea here first to get early feedback!

umbral canopy
#

Will do

#

I just discovered that the programming role exists

broken storm
#

Deleting that because the embeds didn't work...

#

Hello guys πŸ‘‹ I had a few ideas for plugins
Well, I call them ideas but I already made them lol
Just wanting feedback on them, it doesn't bother me if they don't get merged anyway

  • MessageCorrector: Auto-organizes messages based on their timestamp. Basically Discord normally just gets a message and adds it, it can lead to some inconsistencies (first screenshot). My plugin organizes them based on their timestamp, which is when Discord's server received them.

  • NotificationBadgeControl: I feel this one wouldn't get merged, but I'll share it anyway
    Basically I got annoyed at Discord's (and Vesktop's) badge behavior, specifically the weird period or whatever that showed when you had unread messages (which is all the time for me). So I made this, which can make it so that the unread badge only shows when you want (always, never, or default), and you can also control a lot of other things (even adding your own JavaScript logic!). It even works with Vesktop (although for Vesktop, instead of patching it just call's Vesktop's setBadgeCount so it sometimes seems to fight with vesktop lol)

  • MemberLeftBadge: Adds a badge next to members who are no longer in the current server (includes bots (can be changed) and deleted users). It'll also show a badge on threads/posts created by someone who's left, although it'll only show for the one you've selected (due to limitations with Discord). It's very helpful for if someone created a post asking for help then leaves an hour later

#

Fourth screenshot just didn't wanna show... I'll send it right here (it did wanna show it's just smal)
-# please ping me for replies I don't check this server often

fleet hinge
#

Question to the more experienced in the plugin development community:
How should I communicate data from the native environment to the browser?
I have a native.ts which spawns a playerctl process to listen to changes on local media players (linux only for now), but have no idea how to get the data over to the browser side to display it (like how SpotifyControls), or vise-versa. I would use electron's ipc system, but I'm not allowed to import that on the browser plugin.

Also: when trying to build I get a similar error

src/VencordNative.ts:13:28: ERROR: [plugin: ban-imports] Cannot import electron in browser code. You need to use a native.ts file
```, where VencordNative is unmodified. Unsure what is happening here
vapid oar
broken storm
#

Ah cool thx
NotificationBadgeControl controls the system badge
So first screenshot is Discord Canary, which doesn't have Vencord installed
It shows that weird dot

#

This one is Vesktop with NotificationBadgeControl
Notice how there's no dot

#

Basically it manipulates the system badge, kinda like NoSystemBadge but with the ability to control it

#

Idk if that explains it very well lol

dull magnet
#

those can already be customised

proud parrotBOT
silk sorrel
dull magnet
#

in notification settings

broken storm
#

Oh

#

Well

broken storm
silk sorrel
#

my plugin is unofficial cuz it's way too big (and harder to maintain), but as a standalone feature I think it has a higher chance of being accepted

broken storm
#

Oh yeah you made the BetterForums one I saw in #1256395889354997771
I might tinker around with the "OP Left" badge on forum posts later, when I have the time

silk sorrel
#

yup

broken storm
# broken storm Well

Well my plugin comes with the added bonus of making it seem like you have friends hehe /j

granite dune
fleet hinge
# dull magnet look how other plugins do it

Okay, so far I have figured out how to call a native function, but I still need a way to go from native to my plugin.
I have tried registering a callback, but this doesn't seem to be possible, because, well, Uncaught (in promise) Error: An object could not be cloned..
I found the appleMusic.desktop plugin which has a similar issue where they need to get native metadata and then update rpc. The way they solved it is by having a constant timeout (defaulted to 5 seconds). Though definitely a possible solution, I want to look deeper to see if there are other alternatives. After all, playerctl has the ability to send me updates when they occur (playerctl --follow), which gives more real-time feedback than the timeout solution (say you skip a song just after the update was called, you would have 5 seconds, or whatever setting you have, where it displays the incorrect data).
Since this is the SpotifyControls application, and not an activity generator, it would be nice for a user to have a more responsive real time update when tracks change automatically. (Since if I were to have user input I could update it instantly anyway since we are going browser -> native)

TL;DR:
Is there a way to send information native -> browser, which is not a callback created from the browser (since it doesn't work), and not electron's ipcMain?

dull magnet
#

you can use webFrame.executeJavascript to run js in the browser

#

pass data via JSON.stringify

dull magnet
#
// index.ts
export default definePlugin({
    someMethod(data) {
        console.log(data);
    }
})

// native.ts
export async function someNativeMethod(e) {
    const data = doStuff();
    // callback:
    e.sender.executeJavaScript(
        `void Vencord.Plugins.plugins.YourPluginName.someMethod(${JSON.stringify(data)})`
    ); // void keyword ensures that it doesn't return anything, otherwise you may get clone errors
}
#

using JSON.stringify ensures that evaling it is safe

#

anyway this is very ugly and I plan to add a better solution eventually

proud parrotBOT
dull magnet
#

it might be possible to pass readstreams over ipc

#

let me test

silk sorrel
#

damn since when did discord start bundling code with the spread operator

fleet hinge
#

Well, it's kind of working haha

broken storm
#

Thanks
Can confirm it works with both posts and threads now
I'ma work on making it show a tag for forum posts too

craggy hazel
#

Hey -- is there anything I can do to increase the chances of a plugin being accepted into Vencord? We've been maintaining it for around a month or so, but haven't received any review yet

GitHub

Allows completely hiding muted private channels, and optionally ignored users as well, from the DMs list. Hides them visually as well as from alt+arrows.
This is used by myself to mitigate a behavi...

quick zephyr
#

Discord already has a built-in per-server channel hider so probably not going to be accepted.

#

There's also the hide muted channels option.

craggy hazel
#

I understand you can hide server channels. This plugin is for private channels

quick zephyr
#

DM Groups?

craggy hazel
#

DM Groups and Users, yes.

quick zephyr
#

Why not just leave the group?

craggy hazel
#

Have you read the PR description?

quick zephyr
#

Yeah, and if you don't want to hear about a group then leave it, no?

craggy hazel
#

If you want the group to know that, and to not have the possibility to come back without an invite, sure.

#

We also use this plugin for users who we want to ignore, but without using the built-in Ignore feature that collapses all their messages. It's useful that their channel doesn't jump to the top of the list each time they message, stealing our attention from other things, but we can still access it using the Quick Switcher when needed

craggy hazel
# quick zephyr DM Groups?

Also, it's worth noting that "private channels" is everything under direct messages. It's not just group DMs; user DMs are channels as well

#

(I hate Discord's image cropping)

fleet hinge
# fleet hinge Well, it's kind of working haha

Alright well I got everything working and am doing some cleanup and I have noticed that the plugins stop method is never called. Or at least, it doesn't seem to be working as I imagine.
I try to remove the child_process (playerctl) when that function is called, but whenever I exit discord or restart (ctrl + r), it doesn't properly kill the processes.
I know the killing works since I've run the function after a 10s delay and it worked perfectly fine. Is this a known bug in Vencord or am I possibly doing something wrong?
I currently have a workaround to have a process.on("exit"), but this isn't called when the browser restarts, meaning that it leaves behind some ghost processes every time you restart.

I am also unsure what to do with the plugin. I will probably publish it as an unofficial plugin since it currently only supports Linux (and very specifically the Elisa media player at that, though adding player support on Linux is trivial).
I saw some of the discussion on the plugin requests github (#198) and it would likely need to be cross-platform, which playerctl is not. Could a solution to this be having different native backends for the different platforms?
It might be nice to have a swappable backend to be able to support even other online apis in the future, though for this my code might have to be improved a bit :P
This is especially the case since this plugin is not compatible with the SpotifyControls as I stoleborrowed their code (and patch where the panel is drawn)

GitHub

Vencord plugin requests. Open the link below to create a request - Vencord/plugin-requests

craggy hazel
# fleet hinge Alright well I got everything working and am doing some cleanup and I have noti...

My recommendation:

  1. You can have the webpage ping your native code every second or so to prove it's still alive. If your native code doesn't receive a ping from the webpage for a couple seconds, assume it froze or was unloaded, and clean up.
  2. If you call some setup routine on load, then make sure to perform any clean up first, just in case a reload happened quickly and the two seconds hasn't elapsed yet.
#

Of course, you'll have to reinit if you clean up but the webpage starts being alive again, but I think that's a fair tradeoff?

dull magnet
craggy hazel
dull magnet
#

you have to justify your use case if you want to have any chance of it being considered

#

I don't see the point of it so I wouldn't accept it

craggy hazel
#

Not in the way you are asking. I explained how existing features don't work for us given the constraints (no blocking or leaving, no collapsing of messages). I don't need to sell my constraints to you; they're not unreasonable, and come up all the time in nuanced social situations.

#

Tons of plugins in Vencord exist purely for decorative purposes, for accessibility, for convenience, or etc. This plugin fills a convenience niche in a well-defined and fairly simple way. The code also should be fairly idiomatic. You could just as well argue that nobody needs to see someone else's platform, etc.

#

We have tons of plugins we probably won't ever try to upstream because the constraints are far more particular to ourselves. We want to upstream this one because there are documented instances of other users asking for it.

dull magnet
#

who's we

quick zephyr
#

loaded question lol. their bio has a link explaining

obsidian shell
#

but at the same time couldn’t css do this? @craggy hazel

craggy hazel
dull magnet
#

it sounded like they were working together with someone so I asked for clarification

#

and if u think I'm clicking view full bio on "Fluffy, cuddly female Flareon, lover of glue things and lewd things~
" you're crazy

craggy hazel
#

I feel it'd only be loaded if you were asking just to criticize the answer, I get it genuinely from time to time

craggy hazel
broken storm
#

I don’t think that’s gonna help lol

#

But what do I know I’ve been here what like 2 days

#

Oh, 7? Time flies

violet burrow
#

hi

#

how to add a setting tab in settings ?

#

I did use makeSettingsCategory but i suppose i need to add something like a hook

violet burrow
#

finally succeed to do it

cobalt prism
#

Hello, newbie here, im trying to understand how match-replace works, i read pinned message but that confused me still, cause that nsfwallowed thing isnt a UI or component. The reason im trying to fix this cuz cant see nsfw server pings/mentions in my inbox when living outside of dumb EU verification ideas. Idk why asia is affected on this, cant verify or do anything at all to make this work even though im 28. <.>

dull magnet
#

that's it

storm rivet
#

hi! do i need to include the license preamble in any files i write?

#

id like to merge them at some point, but speaking of which, since the plugin requests are closed can i still submit prs to add plugins? i made a vosk voice message transcription plugin

vast karma
#

Eslint automatically adds it

quaint cipher
#

how am i supposed to make it more specific if theres no other exports EB_VaporeonCry

#

i figured it out ```js
let filter = m => Vencord.Webpack.filters.byClassNames("bar", "error")(m) && Object.keys(m).length == 2;
Vencord.Webpack.mapMangledCssClasses(Vencord.Webpack.find(filter, { isIndirect: true, topLevelOnly: true }), ["bar", "error"])

raven rock
#

Could I in theory create a plugin that allows you to create profile presets, like. idk.
click apply and it changes your pfp, bio, whatever you want

and also maybe some server nicknames

Or would I get like ratelimited wicked hard or osmething

storm rivet
raven rock
#

Lost me on that last statement

storm rivet
#

change your discord user profile however u want -> "save, discard, save preset" -> save preset -> copy input image and modified data to.. somewhere. you could probably store the image as an image string along with the data in indexed db or something but filesystem (fs) just putting it in a folder might be better, but i rarely dabble with electron so theres probably a better way to do it

#

then youd just restore the modifications from that location

raven rock
#

True

#

Though, if I only change a PFP and some server nicknames, that wouldn't be too ratelimity, would it? I could also make it wait.

quick zephyr
#

pfp is like twice an hour isnt it. or is that username

raven rock
#

I do not remember, though I've been able to change my PFP pretty quickly.

storm rivet
#

the docs aren't very consistent

broken storm
#

Not helpful but I have the same confusion too lol

quick zephyr
#

you can pr plugins you've made you just can't ask others to make plugins anymore

#

also know the odds of getting a pr merged are like 1/1000 and the timeframe is an exponential curve of like 0.00001% chance tomorrow to 5% chance in 3 years.

broken storm
#

Ah cool

quick zephyr
#

also if you pr obviously ai generated code or ai plugin description you will get shit on and then pr closed

vital tree
#

I've replicated the plugin because my alt acc got into the age verification testing group even though I'm not in the UK or EU

#

@cobalt prism

#

You can look at the request headers when opening the nsfw channel, it returns a 403 forbidden response

cobalt prism
#

But good to know. probably wont reach here. hopefully

#

i was able to fix it via injecting console at the moment, that at least works fine for my inbox issues

#

im so dumb about how regex replace works so i will try whenever got time for it

vital tree
raven rock
#

can a plugin change that stuff at all

quick zephyr
#

dont see why not. you'd just call RestAPI.patch or smthn like that on /users/@me or w/e the endpoint is

#

just change that stuff manually and watch network tab

#

or take a look at https://discord.food docs on it

Discord Userdoccers

Overview Changelog You’ve found the Unofficial Discord User API Documentation! These pages are dedicated to showing you all the ways that you can use Discord to make cool stuff. It is not an offic...

raven rock
#

are there liek example plugins or sm ive never done this before lol i have no clyue how vencord works..

vast karma
#

There's a couple hundred plugins right there

quick zephyr
#

search the repo for examples

raven rock
silk sorrel
storm rivet
raven rock
#

hm good point

#

ok lowkey been testing some shit

i dont think the pfp ratelimit is twice an hour anymore

#

there definitely still is one

quick zephyr
quick zephyr
raven rock
#

Also the endpoint works just fine

storm rivet
raven rock
#

eh i like how i have it where i can do it from anywhere

plus im updating server nicknames too which needs the api(?) so i might as well go all in

#

though i almost want to add it so where if you are able to, it switches your answer in channels & roles or maybe applies a reaction role

but

also

like

i think discord would take me out back and shoot me

humble tulip
#

Has anyone made a plugin that implements this little audio player on desktop yet? Might do that if not

#

Would be nice to be able to listen to an audio file without it stopping if you navigate literally anywhere

gloomy terrace
humble tulip
#

Oh lol

#

I didn't consider embedded stuff, that might be harder but I can give it a go

#

I haven't done any programming in months so will be a good one to get back into

#

I guess it would be expanding this rather than its own plugin

#

setting to auto pip when navigating away

gloomy terrace
#

Yeah that's the plugin I originally mentioned in the feature requests model

humble tulip
#

I am blind

gloomy terrace
#

Haha dw

valid portal
#

Am I cooking with this?

#

and yes i copied raycast

silk sorrel
#

didnt @oblique viper also make something like this

tropic ice
#

I do know there's a command palette plugin in equicord
And probably a userplugin version

oblique viper
tropic ice
#

this is what the one in equicord looks like

raven rock
iron epoch
valid portal
#

added alot more commands, made the commands faster too

#

UI is faster

#

page fluidity is better

#

gonnna try adding direct plugin support, as if they were Raycast Extensions

#

so lets say you can control equicord's holynotes from the palette

#

or uhhh SilentTyping

#

stuff like that

#

big plans and big ideas

vital tree
vital tree
valid portal
raven rock
#

Are there any docs for slash commands? I swear I'm doing something wrong, considering the fact that it sends a message with the sent command along with actually doing the action.

valid portal
#

only figured out one so far

#

but it works!

valid portal
#

to learn how

#

there's no official docs on slash commands afaik

raven rock
valid portal
#

mmmm

silk pewter
granite dune
#

this sohuld be smaller

#

these too

#

most likely these ig

valid portal
#

i plan to just turn it into an action panel

worldly silo
#

I am having some trouble getting it to recognize the custom dist set, I followed the guide, and I am not actually seeing any errors that lead me to believe this failed in some way, just routine stuff. I originally tried to build in WSL, figured it might be a directory issue, and restarted from scratch following the guide precisely. I don't see custom plugins or any indicator that it is failing to load them. Is there something from the guide I am missing, beyond just pointing vesktop to the dist?

#

(and also restarting the client completely, that's been done too)

#

Do I specifically need to specifiy --dev?

silk sorrel
#

Are there no errors in the console related to the custom plugins you're installing?

#

also this isn't support

worldly silo
#

None. Forgive me if I am in the wrong place, but more generically I am trying to ensure that it is actually loading the dist. Nothing in the console suggests any issues with the plugins I am trying to run, and ultimately I am not looking for support for those plugins, more just wondering what would cause issues with a custom dist seemingly not even loading

#

Figured it out was a permissions issue

#

WSL funk

silk sorrel
#

😭

quick zephyr
#

any way to get a function that isnt exported πŸ€”

#

gotta be a better way 😭

humble tulip
#

I do that but pass the function to $self

quick zephyr
#

substantially less cursed

humble tulip
#

Good timing

quick zephyr
#

ye lol

#

now how do I access that outside of a patch 😭

#

cursed? type hinting for accessing plugins object was yelling at me

#

aint working. agony

humble tulip
#

Just ts-ignore the plugins way

quick zephyr
#

that also didnt work

#

function is just returning null

#

which is the initial behavior

#

when I call it in dev console it returns fine though

humble tulip
#

I haven't written anything for vencord in months tbh so I don't remember much off the top of my head anymore

quick zephyr
#

oh looks like I might be victim of bad typing

#

I was tryna access effect_id but data im getting has it as effectId

#

yeah that worked

barren thistle
#

Howdy! I am working on a few things, But was curious about backing up data in CloudSync, is there documentation anyone can link to where that might be explained so I can read up on how one does that?

cedar olive
#

save it in your plugin settings and it will be saved to cloud automatically

frozen zephyr
#

forwarding this over as i got confused 😟

dull magnet
frozen zephyr
#

oh wait

#

hang on i'm stupid

#

😭

#

i'm so tired i can't bro give me a second

dull magnet
#
export async function uploadFileNative(
    event: IpcMainInvokeEvent,
    url: string,
#

besides that

  1. You are using your own method wrong (even without the event arg)
  2. Use JS apis like FormData instead of rolling your own
  3. Your code isn't safe. You shouldn't allow sending arbitrary http requests
frozen zephyr
#

god i'm so bad at this 😭
hang on thanks for the help let me see if i can change some stuff rq

green vessel
#

hi

#

@obsidian shell

valid portal
#

is 9 thousand lines in total too much for a plugin

#

i feel like it is

broken storm
#

That's quite the lines of code

daring holly
#

heyy
i don't think there's a plugin that does that but i feel like that would be useful
i'm trying to make a code that gives you the list of all channels of a discord with their descriptions and permissions if available
but i suck and llms i asked help too sucked too

any help on how i'd be doing this ?

broken storm
#

There are some existing plugins I’d look at if I were you

valid portal
#

permisionsviewer, showhiddenchannels is a good mix

#

simply right click on a channel, click permissions and this comes up

#

then look at both of those plugins and figure out a design to make this in one modal.

iron epoch
valid portal
dull magnet
#

no

valid portal
#

not even a little bit

obsidian shell
#

no you just write shitcode

obsidian shell
#

how can i add a right side panel to discord

#

like devtools/modview

#

@hushed loom figure out

vapid oar
valid portal
vapid oar
#

oh right

valid portal
#

with plugin integrations like silentMessageToggle, Experiments ect

#

you can open stuff like theme library, quickcss ect

#

this is going to be PR'd to equicord as equicord is a more experimental fork than vencord and i don't see it being merged here tbh

#

i don't think vee will be happy to review all 9 thousand something lines of code

vapid oar
#

true

#

torture thororen instead

valid portal
#

yes

#

honestly its a good plugin imo

#

yeah the codes a little bit horror

#

but its a useful plugin

#

well..i hope it is atleast

vapid oar
#

you should 100% split the code into multiple files

valid portal
#

into alot of files

#

maybe too many actually lmfao

iron epoch
#

yo fix your website

eager egret
#

I mean it's not wrong

valid portal
#

I'm just copying an existing product into discord

#

I mean you are technically right I used to do UI/UX design

iron epoch
#

where's the plugin wip code then?

valid portal
#

@iron epoch

iron epoch
#

okie dokie, ty

valid portal
#

the codes a little horror

#

so keep that in mind

#

there are still a few bugs

#

compact mode doesn't quite work

#

and the UI has a sort of delay/lag

obsidian shell
#

make

quaint cipher
#

oughh

quaint cipher
#

window.CustomPanelStore.open() to open

obsidian shell
#

thank you

quaint cipher
#

its missing some things from discord devtools'

#

like the ability to make it into its own window or resize it

#

wouldnt be too hard to add

#

also css i forgor

#

added this as a test ```css
#vc-custom-panel {
background: var(--background-base-low);
color: var(--text-default);
}

#

think devtols is like that idk

#

now discord app isnt loading cus internet so idk

obsidian shell
#

idc about own window

#

and resize i’ll try impling at some point

obsidian shell
hushed loom
quaint cipher
#

neverrrr :3

azure fossil
#

idk if it's just me but syntax coloration of Java seems a bit broken

@Mixin(LightmapTextureManager.class)
public class LightmapTextureManagerMixin {
    @WrapOperation(
            method = "update",
            at = @At(
                    value = "INVOKE",
                    target = "Ljava/lang/Double;floatValue()F",
                    ordinal = 1
            )
    )
    private float getGammaFloatValue(Double instance, Operation<Float> original) {
        return original.call((!Config.VisionLimiter.enableFullbright ? instance : Double.valueOf(Float.MAX_VALUE)));
    }
}
#

it's better in chatbox than in chat

quick zephyr
#

looks like you have a code block plugin

#

probably that failing

azure fossil
#

yeah i use shiki code blocks with pretty much defaults iirc except i have set the theme

#

and setting it to prefer shiki over highlight.js make code coloration kinda cursed and even more broken

quick zephyr
#

bug in shiki then ig

azure fossil
#

ih i'll have to debug it :pain:

fleet hinge
#

I think it is just normal discord behavior

quick zephyr
#

they're saying the blue one is better/correct

#

so shiki is failing to make it all the same color

fleet hinge
#

Ohh, yeah then that is incorrect πŸ˜…

azure fossil
#

only the first line is blue

#

also shiki might not be wrong, but it's kinda unreadable imo with color being all over the place

quick zephyr
#

well I do think shiki is wrong because the blue extends even into the ( parenthesis which doesnt make sense

#

if only @WrapOperation was supposed to be colored and not the function itself

azure fossil
#

i think the whole annotation is supposed to be blue

quick zephyr
#

yeah thats more likely

#

just stating I dont see a world where it was a stylistic choice to not color the function itself

#

since the opening curly was blue'd

azure fossil
#

i think it just did not expect that the annotation would be multi-line

#

which tbh is fair

#

most of the time you don't do big annotations

#

except when you code minecraft stuff and you use Mixins

azure fossil
#

wait i think shikicodeblocks plugins also break discord ansi codeblocks

#
\u001b[0;40m\u001b[1;32mThat's some cool formatted text right?\u001b[0m
or
\u001b[1;40;32mThat's some cool formatted text right?\u001b[0m
#

cause that's all i can see

tropic ice
azure fossil
#

nvm found out you need to use the non escaped character

#
That's some cool formatted text right?
or
That's some cool formatted text right?
#

like the actual code 001b

#

like the char value

#

tho it makes the WYSIWYG editor a bit eeeeeh

tropic ice
azure fossil
#

me who just type my shit by hand :w:

#
  • here it wasn't for much, just to have accurate terminal output
#
root@Free:~# apt install -s snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package snapd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'snapd' has no installation candidate
unkempt kindle
#

what 'find' would you guys use for this module?

silk sorrel
#

Hmm maybe ⁨=500;function⁩

humble tulip
#

or ["aria-hidden"],onMouseEnter

quick zephyr
#

ye what suff said

#

suff's better tho

#

cause it could be extended to the let current to anchor it even more

silk sorrel
#

findByCode searches for specific exports and the "500" is part of the module's code

quick zephyr
#

oh reason davs didnt work is cause findbycode is for functions

#

right

#

whats the function to test a patch find in console then

unkempt kindle
#

i think discord did not like me doing that

silk sorrel
#

😭

silk sorrel
humble tulip
#

^

#

Just takes a string or regex

#

Vencord.Webpack.findModuleFactory("=500;function")

quick zephyr
#

real and true

marsh radish
#

i have 2 monitors and its really useful for me

normal wagon
#

yours isn't overdone though so props to that

slow yacht
#

I tried to patch this module but for somereson vencord says it has no effect why?


function InjectedBar() {
    return (
        <div style={{
            padding: "8px",
            marginBottom: "8px",
            borderRadius: "8px",
            background: "rgba(0,0,0,0.2)"
        }}>
            TEST βœ…
        </div>
    );
}

.
.
.
.

find: "aria-labelledby",
replacement: {
  match: /children:\s*\[\(0,\s*r\.jsx\)\("div",\s*\{\s*className:\s*a\(\)\(y\.wx,\s*this\.props\.headerClassName\),/,
  replace: 'children:[(0,r.jsx)($self.InjectedBar,{}),(0,r.jsx)("div",{className:a()(y.wx,this.props.headerClassName),'
}
.
.
.
.

also I am new to vencord plugins so sorry if its a bit dumb question

silk sorrel
#

First of all, try to find something more specific to that module rather than aria-labeledby. If you use the patch helper it will warn you that there are multiple matching modules

#

Also, you don't have to use \s* since discord's bundle is minified and doesn't contain any spaces unless necessary

slow yacht
#

yes but for now I just testing and it says it cant find it

silk sorrel
#

That's because it finds the first module and tries to patch that

#

if you want all modules to be affected, add all: true

#

and noWarn: true (neither is recommended tho)

slow yacht
#

so it just patches the wrong module?

silk sorrel
#

yeah

#

FavoriteGifSearch injects into the same module it looks like, so you can take a look at their patches

slow yacht
silk sorrel
#

It's fine really, since this is a single component it's unlikely that it would ever get split into multiple modules

marsh radish
#

didnt know that ahaha

normal wagon
#

so something like this wouldn't be accepted into vencord?

humble tulip
#

Aren't those changes batched into one "save changes" on stock anyway?

#

So it's still one button press -> one action

normal wagon
#

not the actual profile

humble tulip
#

So it just fills in the page and you still click save yourself?

normal wagon
#

Save or Cancel

humble tulip
#

I think it'd be fine even if it did submit it personally but I do think that's better

#

I don't see any reason it couldn't be included besides maybe being niche but I can't really judge that as I don't use server profiles

normal wagon
normal wagon
#

its pretty much your identity and many people like customizing their profiles with different colors, different name plate styles etc so its practical for those users

normal wagon
humble tulip
normal wagon
umbral canopy
silk sorrel
#

srgb linear gradient horror

obsidian shell
#

yop

normal wagon
dull magnet
#

looks like something you would see in some aislop generator site

granite dune
normal wagon
#

it still stands out quite alot

granite dune
#

i was just jokinπŸ₯€

normal wagon
#

πŸ’”

#

i do like it actually quite alot more though to be fair

#

looks beautiful gif does not do it justice nvm

#

this is better

tropic ice
#

animated gifs are terrible and shouldn't be used

#

actual video files are higher quality while being significantly smaller file size

#

and it seems like static gifs are almost as useless

normal wagon
#

would anyone actually use this

umbral canopy
tulip notch
#

Does anyone know where I can find a near-perfect replica of discord dm ui? Could help me with testing features to add to plugins

tropic ice
#

why can't you test it with the actual dm ui?

tulip notch
silk sorrel
tacit locust
#

why is the top code valid but the bottom one not? what am i missing?

#

this is not my original use case but i've abbreviated because the rest is unnecessary :p

humble tulip
#

The edit one has a different signature

#

So your messageObj argument there is actually just the messageId

tacit locust
#

just for completeness- what would the correct code snippet be?

humble tulip
#

Just that one part needs to be addMessagePreEditListener(async (channelId, messageId, messageObj) => { and the rest can stay the same

tacit locust
#

ohhhh

#

thank you!

humble tulip
#

np thumb

tacit locust
#

what does "message re-render" mean in the context of MessageUpdater.js?

#

and what is a message click?

#

just