#🧩-plugin-development

1 messages · Page 85 of 1

quick zephyr
#

amazing

#

now to see if there's an easy way to get it without having to open all 130 popouts

#

nice network tab called to https://api.yapper.shop/v3/discord-quests

#

tf quest was this

#

2030??

silk sorrel
#

lmao

quick zephyr
#

was this quest scrapped or something

#

I feel like I would remember this

silk sorrel
#

considering that it says "stream minecraft" it could very well be a random testing quest

quick zephyr
#

oh maybe it's upcoming and so the config on discord's system isnt complete yet

#

cause they also have this one listed

#

or yeah maybe just never gonna be real quests

#

ai ahh assets

#

looks like the site is missing 8 quests I have in my data

#

damn

woven lion
#

that sword asset is something they sold on the shop before

#

iirc

#

yeah

quick zephyr
#

ok have 141 quests in total now. 139 minus those 2 sus ones above. somehow need to find the full data for the 8 I have that the site doesnt though

#

annoying the claimed endpoint doesnt return task data

silk sorrel
quick zephyr
#

pretty sure all 8 are long expired so probably but ill take a look

#

you had 4 new ones bruh

#

now thats 12 with incomplete data

jagged geyser
#

ok, so I think I actually found most of the stuff I'll need to hook into for this! next thing to solve is: how does one store/cache plugin data? I can think of custom ways I could do it, but I assume there's some vencord-specific way one is intended to

quick zephyr
#

how did u find this. when I try to google stuff like "discord quest archive" I get a bunch of useless stuff 😭

quick zephyr
#

you can check just about any plugin for how to use plugin settings. fewer use the DataStore

#

i think thats what it's called

silk sorrel
quick zephyr
#

sku archive?

silk sorrel
#

Yeah I mean the shop archive

quick zephyr
silk sorrel
#

Yup used to be but ig they added more features

quick zephyr
#

I wonder if the api will return sku info for expired shop items. it doesnt for quests

#

it does interesting

silk sorrel
jagged geyser
quick zephyr
#

also seems partially incomplete but a lot more than the rest

#

on a side note that yapper.shop has fake data for the mokoko quest

#

the application id and asset sku are wrong

#

they point to the moomoo milk asset

silk sorrel
#

Hmm weird

quick zephyr
#

weirdly amia's doesnt have any app data for the mokoko quest

#

lost ark isnt hard to get data for so i can just add it myself

quick zephyr
#

this is so weird they have minecraft's application id as 356875570916753438 in quest data which apparently it was 6 years ago but it's 1402418491272986635 nowadays. why would they do that 😭

#

not just mc. multiple games. fortnite is too

#

many are on the old id scheme... why SKULL_SKELETON

quick zephyr
#

welp merged the data of the 2 sources. 251 quests total. only 8 have incomplete data

1235258834524700703
1241062724922769408
1270822177289142464
1271118866113892352
1275119152989732895
1275212711088885770
1275212711088885771
1280648686736638006
brave steeple
#

I submitted some changes to FixYoutubeEmbed and youtubeAdblock as a PR. This is my first contribution to this project and if anyone has any advice for improving the PR or any suggestions for something else to work on that isn't too complicated for someone new to this project I would welcome them.

hoary pilot
#

let's say i want to have icons like spotify/AM from images, what would be the best source to load them

#

or should i embed in the plugin code directly

#

might use emojis

hushed loom
#

@hoary pilot evil

quick zephyr
jagged geyser
#

oh yeah, so like, the plugin I wanna make / am making would involve users having a URL in their profile, and the plugin would fetch some JSON from that. question: does that count as breaking the "no untrusted 3rd party APIs" rule for plugins?

dull magnet
#

also who would wanna have a random json url in their bio

jagged geyser
#

I mean, it'll be possible - it'll just require a native component to do the requests

hoary pilot
#

that’s not a great idea

#

just make a backend and store stuff there

jagged geyser
#

lol

hoary pilot
#

my body is a machine that turns iClouds into bypassed iClouds

jagged geyser
#

I mean, it's fine as long as you actually validate and sanitize your data 🤷‍♀️

hoary pilot
jagged geyser
hoary pilot
#

you’re bypassing the renderer sandbox

#

which is subjected to CORS and CSP

jagged geyser
#

yes

hoary pilot
#

vencord uses a strict CSP for a specific reason

jagged geyser
#

that reason being?

hoary pilot
#

you don’t want a theme to arbitrarily contact a server

#

if your theme or JSON link points to my server congrats i have your IP

#

not so great privacy wise

jagged geyser
#

not a theme

#

but also valid

#

I don't like the idea of the plugin being tied to a specific hosted api, but that is a good reason to do that

hoary pilot
#

any plugin with an unfiltered fetch method in native will never be merged or allowed in unofficial plugins

jagged geyser
#

yeahh, strongly considering changing my mind there

quick zephyr
hoary pilot
#

i needed to display a png image and wondered if i should host

#

if and where

quick zephyr
#

what png tho

hoary pilot
#

i just base64 encoded them in the end

hoary pilot
quick zephyr
#

just steal from discord

hoary pilot
#

and apple music

#

and tidal

#

and qobuz

#

and ytm

#

and yt

#

i’m making song.link plugin

quick zephyr
#

ok ye discord doesnt have tidal

#

or qobuz

#

cant believe they have amazon music but not yt music

#

scam

keen heron
#

hello, can I get access to electron's BrowserWindow instance from a vencord plugin?

#

oh wait I've just searched in this channel and found helpful stuff

#

yep maybe I didn't need to make a modmail for channel access lol

keen heron
#

so peak (yes it needs the timeout lmao)

frosty mist
silk sorrel
#

how does that work
do you not need to join a server with that specific sticker?

frosty mist
#

it works by using a dedicated server where the plugin uploads the sticker you select, and when you want to use another sticker, it replaces the previous sticker and uploads the new one you just selected
it's basically just uploading the sticker the moment you click on it so you don't use up the sticker limit on a server
though, this plugin can only be used by nitro users

silk sorrel
#

ohh I see

#

does discord not flag that as api abuse?

frosty mist
#

I don't think so unless you're sending stickers every second

silk sorrel
#

it would be cool if you could import entire sticker packs from other platforms like telegram blobcatcozy

frosty mist
#

I have a script I made that lets me import from LINE stickers, but it's outside Vencord so I didn't include it

#

still pretty cool though

#

I thought about implementing it directly but I'd need to use a third party API since I can't use Python (I don't think I can) in Vencord, and third party APIs aren't allowed

silk sorrel
#

oh yeah I forgot that vencord security policies could be an issue 😭

quick zephyr
#

mfw I need to add a event.currentTarget ??= event.target as any; to a context menu function to prevent a Cannot read properties of null (reading 'contains') error.

dull magnet
#

just make it yourself

#

it's like 3 lines of css remsip

hearty arrow
#

hi

royal shoal
#

there dont seem to be any docs for vencord's types, could someone explain these select things i dont understand

#

the Activity interface has a timestamps field... what is this for?

#

i assume this is for the listening activity kind for the time listened bar thing; what does it take timestamps as? present to future seconds or milliseconds?

#

or does it take the time of the activity it should start displaying the bar?

dull magnet
#

bro these are discord types

royal shoal
#

can u tell ive never done client modding before

#

well that solves my issue, thx

royal shoal
#

im familiar with the former, any resources for the latter?

dull magnet
#

this is useless

#

irrelevant to modding

hoary pilot
#

and vencord plugins source code

royal shoal
#

another q: whats the preferred formatter for the codebase? the editorconfig is a bit vague and my applied formatting looks quite different from the other plugins' formatting

dull magnet
#

vscode formatter

royal shoal
#

im on zed that must be it

#

isnt it a part of tsserver

dull magnet
#

the formatter is called typescript language features or something like that

#

it's all configured in .vscode/settings.json

royal shoal
#

yea i noticed

#

noted

lime haven
#

you can use findGroupChildrenByChildId

#

it's used in translate plugin if you want an example

jagged geyser
#

two components I'm currently trying and failing to find, maybe someone knows a plugin that touches them or something:

  1. profile pictures on messages
  2. wherever discord makes the decision to cluster messages together, when they're by the same user and close enough in time
royal shoal
#

whats the idiomatic way to store some state (temporarily / for the session)?

#

should i use raw browser apis? i feel like i shouldnt

quick zephyr
#

just in memory if you never need it to persist

#

if you need it to persist reloads then a hidden: true setting would work

royal shoal
#

like what do i call

quick zephyr
#

my userplugin has tons of private settings. brief example

export const settings = definePluginSettings({
    disableQuests: {
        type: OptionType.COMPONENT,
        component: DisableQuestsSetting,
        description: "Select which Quest features to disable."
    },
    disableQuestsEverything: {
        type: OptionType.BOOLEAN,
        description: "Disable all Quest features.",
        default: false,
        hidden: true
    },
    disableQuestsFetchingQuests: {
        type: OptionType.BOOLEAN,
        description: "Disable fetching Quests from Discord.",
        default: false,
        hidden: true
    },
    disableQuestsDiscoveryTab: {
        type: OptionType.BOOLEAN,
        description: "Disable Quest tab in the Discovery page.",
        default: false,
        hidden: true
    },
#

hidden just means it doesnt show up in the plugin settings page but you can still use it as normal

#

arrays arent supported but records are

#
    lastQuestPageSort: {
        type: OptionType.STRING,
        description: "Remember the last used sort on the Quests page.",
        default: "questify" as string, // sort key
        hidden: true
    },
    lastQuestPageFilters: {
        type: OptionType.CUSTOM,
        description: "Remember the last used filters on the Quests page.",
        default: {} as { [filter: string]: { group: string, filter: string; }; }, // Array of filters
        hidden: true
    },
    ignoredQuestIDs: {
        type: OptionType.CUSTOM,
        description: "An array of Quest IDs that are ignored.",
        default: {} as Record<string, string[]>,
        hidden: true,
    }
});
#

well according to my ignoredQuestIDs nesting it works

#

just cant be top level

#

thats what my ignoredQuestIDs does. it's userID to array

#

I think there's a pr for array support

#

it's been open for like 10 years though

#

so dont hold your breath

#

lol

#

example of how it ends up looking

royal shoal
royal shoal
#

just to weigh my options

quick zephyr
#

what do you need

royal shoal
#

im trying to store rpc durations and stitch them together to get accurate time reads

quick zephyr
#

const rpcDurations = [];

royal shoal
#

the plugin refetches data from an api every couple seconds

#

i need the data to be persisted across instances (i believe)

quick zephyr
#

instances?

#

like reloading?

#

cool good talk

royal shoal
#

i figured out what the structure is

quick zephyr
#

what's it look like

royal shoal
#

sorry for my monetary stupidity

royal shoal
#

alongside a timestamp

#

if the time difference is above a certain threshold, we consider it invalid

#

to be more specific, im trying to add a time bar for lastfm rich presences

#

lastfm's api gives u little info abt playback, so i need to just figure out the track's duration and stitch some stuff together

#

theres the case where the song is paused, and it is no longer of the nowplaying state, but when its resumed, it shouldnt start the rpc from scratch with time from zero

#

which is what looks like currently already happens

#

this behavior gets is more visible when we have a timebar vs just a simple time counter

quick zephyr
#

why does that need to be persistent across reloads

royal shoal
#

and then it refetches the api and sees a nowplaying status

#

and now the bar is time zero while the track may be nearing completion

vast karma
#

Time passes while you're reloading though so it'll still be inaccurate

royal shoal
#

several seconds vs entire minutes

vast karma
#

Or if you close discord and open it again tomorrow

royal shoal
#

like i stated, if the timestamp is older than a certain threshold, its invalidated

#

iirc lastfm has some period of time before a nowplaying track is considered as invalid

#

the threshold would be that

royal shoal
#

i do not want it to be that redundant

#

i want to store temporary data, but across reloads

#

it seems a bit hyperspecific tho so i doubt there is an existing solution for that

bronze dove
#

menuitem inside a menuitem

bronze dove
dull magnet
#

what kind of data

dull magnet
#

why do you need to store anything

#

are you trying to cache?

#

i think adding a time bar is kinda pointless

#

there's already a timer

prisma yew
#

does anyone know how does the adding to GIF's work? I can patch the RegEx directly to images to treat them like gifs

#

but I wanna know how can I patch the add gif thingy to images

royal shoal
#

its nice to have a progress rather than just a timer

royal shoal
# dull magnet why do you need to store anything

the api gets polled at a constant rate, like i explained above, and when the api does not return a nowplaying track (which is also for the case the track is paused), the presence gets cleared

#

once the track is resumed, the nowplaying track is set again, and the rpc is reset to starting from 0:00 time

#

which was already the case, but with the timer it was less noticeable

vast karma
#

Not much you can do to modify the search

#

You don't have access to their databases

silk sorrel
vast karma
#

Sure but you can't correct the hit count, and it's quite inefficient

#

So it'd be some sort of shorthand for existing filters?

#

Or does the api support filters that the client doesn't?

silk sorrel
vast karma
#

link_hostname sounds pretty nice, assuming it does what it sounds like

frosty mist
#

is there anywhere here where I could ask for reviews/suggestions/critique?
while my plugin is technically done and 'works', I feel like something is off and it's not optimized enough so I was wondering if there was a place where I could ask for feedback

tropic ice
#

here

frosty mist
#

I'm mainly concerned about the modal closing since it gets slow the more stickers you have, but there may also be a ton of other issues that might be there, or questionable decisions. Anyway I'm looking for any feedback at all
https://github.com/chev0004/UnlimitedStickers/blob/develop/StickerPicker.tsx
The way I'm doing it right now is by hiding the non-visible sticker categories before the user scrolls them into view, then it expands them, and that makes the interaction feel a little smoother, but I have no clue what to do when it's time to close the modal because if there's a lot of categories opened, React also spends more time demounting them

GitHub

Vencord plugin that lets Discord Nitro users send unlimited stickers by uploading them to a private server used as sticker storage. - chev0004/UnlimitedStickers

#

ngl I feel very nervous even showing my code but I need feedback to improve 😔

hushed loom
silk sorrel
#

Idk what causes the perf issues, but I think you should split up some of your components
Like for example in your modal component you have a render function, which should probably be its own component. Also wrap the smaller components in React.memo (you'll probably need to use proxyLazyWebpack since React isn't available initially)

hushed loom
hushed loom
#

also afaik unmounting in react is fast

#

all it has to do is cleanup effects, and remove the dom node

frosty mist
frosty mist
hushed loom
#

for react.memo, you probably have to use a lazy component

#

you might be confusing re-rendering with unmounting

#

a component unmounts when it is removed completely

#

a component re-renders when things like state or props change

proud parrotBOT
frosty mist
frosty mist
hushed loom
#

(also it isn't that hard to implement your own lazy scroller)

frosty mist
#

I implemented a lazy scroller already (I believe so), it's just that, for some reason, the modal takes a long time to close when I've loaded a bunch of categories already

hushed loom
#

tbh i wouldnt worry about the time it takes to close that much

silk sorrel
#

I think you're not removing the elements once they're out of view, so by the time you close the modal they all have to be removed at once

#

idk

frosty mist
proud garden
#

I'm looking at porting the patches from my native idle pr to a Vencord plugin like vendicated suggested, but since it uses a native node module should I just leave all of the electron main thread specific stuff in vesktop itself and mark the plugin as vesktop only? Or should I put as much as I can into Vencord itself

proud garden
#

I'm just going to assume it's ok to leave the actual idle implementations in vesktop itself since I'm pretty sure it's just the patches that need to be easily updatable

hushed loom
#

is is possible to load .node modules into both vesktop and discord desktop from a plugins native.ts file

proud garden
#

the .node module is completely useless outside of vesktop on wayland linux so it doesn't make sense to put it into vencord

hushed loom
#

was just wondering in general for something else i want to do

dull magnet
#

vencord is just 3 js files it can't load native modules

#

that's why i was working on asar bundle at some point so we aren't limited by that

proud garden
dull magnet
#

like i said dont worry about it

proud garden
#

okie dokie

#

guess I just have to find people to test on different platforms

leaden fable
#

Is there any way I can set my own origin header for a single request?

hoary pilot
#

why do you even need to do that

leaden fable
#

Yep just did that

#

Messing around with a text to speech public API that require specific origin header

static pebble
#

im trying to make my plugin but cant really get it working
im getting "typeerror: can not fetch"
anything im supposed to do?

extra info, im calling my llm model over on my fastapi app on a online server

#

this is what i get in console(i cannot provide the api url tho.. its private
this is a personal plugin anyways)

swift delta
#

Have you allowed it

static pebble
swift delta
static pebble
#

okay, lemme try

swift delta
static pebble
proud parrotBOT
swift delta
swift delta
# static pebble okk

But honestly, if you understand typescript, you can just really read the code of Vencord and understand how it works

#

Vencord (atleast most parts of it) are pretty easy to understand

static pebble
#

thanks @swift delta it works great!

hoary pilot
swift delta
#

Just figure out which one you need for your purposes and use that one

#

Idk what they are doing exactly with that api/plugin

inner raft
#

hi im planning on making a pr for a plugin but before i will, do they have to follow some text styling guide (like text shouldn't be all lowercase) or is there really no attention to that

hoary pilot
#

titles should use title case
sentences should use sentence case

#

plugin name has to be like this: PluginName

inner raft
#

alright thank

dull magnet
# static pebble are there any docs related to this or talking about this?
MDN Web Docs

The HTTP Content-Security-Policy response header allows website administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
This helps guard against cross-site scripting attacks.

#

your csp error will say which directive was violated

proud garden
#

is it possible to get a cached boolean (stored as a local variable) from a native.ts file in a plugin without returning it as a Promise?

dull magnet
#

no

proud garden
#

if I wanted to get said value would I just have to convert everything into async

hoary pilot
#

you would need an async getter function yes

#

chances are it will be easy

proud garden
#

I’m trying to patch a boolean check with a value from the native file and I’m kinda dumb so I couldn’t find a nice way to get the value synchronously since that’s what the check expects

#

but I suppose making everything async could work?

vast karma
#

Patching the entirety of discord to allow async in that one place?

hoary pilot
#

you could try

  • making a variable in your plugin definition
  • in an async start() function call ur native method and set its return value to that variable
  • in your patch, $self.variable || originalValue
dull magnet
#

^ (?? instead of ||)

#

just load it at the start and store it in a variable

green narwhal
#

i want to create a plugin for something related to deleting your own messages, i am not sure yet. however, id like to know some things:

  • is there a documentation for the api?
  • is it difficult to transition from private plugin to official plugin?
  • is there any other page except for https://docs.vencord.dev/ that can guide me? maybe some pins here or whatever?
#

anyway, until then, i will probably just look around inside the code of other plugins to get a feel for vencord 👍

inner raft
#

so basically just keep on doing what you are

green narwhal
#

alright

inner raft
#

you can also look in current.js of the discord datamining repo

#

for example to find stuff to patch

#

or stuff that hasnt been put in the discord types package for some reason

inner raft
green narwhal
#

i see there is a presend message event, but is there no postsend message event? 🤔
for example, i am sending this message right now, is there any way to get the msg id of it and tinker with it?

green narwhal
#

got it :D

proud garden
vast karma
#

It's gonna be unpleasant for sure

proud garden
proud garden
vast karma
#

They're not exported I hope

proud garden
#

they’re not but if they are called elsewhere they don’t return anything

#

only one function which I’m fairly confident is only called within the module returns a value

green narwhal
#

are plugin descriptions escaped? no discord markdown support?

dull magnet
#

it's just plain text

green narwhal
#

i will be honest, i probably should have asked before, but i wanted to make an auto-delete message plugin. however, i have now read the #1256395889354997771 header text that talks about "No selfbots or API spam". This plugin will have generous rate limits and cannot guarantee perfect deletion (for example, you suddenly lose power), so i am curious if you guys would even consider the pr in the first place https://github.com/Vendicated/Vencord/pull/3765

i dont really want to progress if it has no chance of being accepted

#

thanks for the quick reply

proud garden
#

is it possible to send a message from native.ts into index.ts or is it just from index.ts to native.ts

proud garden
#

asides from adding some kind of listener structure onto VencordNative, the other option I see is a direct contextBridge api, but at that point I'm guessing it'd just be cleaner to attach some kind of generic native to renderer messaging system for plugins onto VencordNative?

proud parrotBOT
proud garden
#

oo thank you :D

dull magnet
#

just make sure not to put unsafe code in there

#

it's a very ugly solution but the best you can do until I add a better api

proud garden
#

I know you said not to worry about it but I'm just tinkering around with making nativeidle a plugin

#

this is basically calling handleEvent

#

should probably be safe?

#

I'd be surprised if it wasn't since it's in the discord client itself

dull magnet
#

calling everything is safe as long as you don't embed untrusted input into it

#

just be careful to not return complex objects (classes) or you will get serialisation errors

proud garden
#

hallelujah it works!

agile nest
#

hey im new to plugin development can i someone tell me how the patches work and finding element or components ?

proud garden
#

the patches work on webpack modules and use regex to locate the specific parts you want to replace

agile nest
#

and how can i see or know the modules?

#

ok

#

thanks

hushed loom
silk sorrel
#

sadan the goat, check out his extension

hoary pilot
#

i only use god approved extensions

#

no Satanware

#

but i should swirch

hushed loom
inner raft
#

Im looking at the plugin in marketplace

#

My ass is unable to read properly

hushed loom
inner raft
#

Yah i just got that

#

Time to not use this for like 5 days until i get a burst of motivation

wispy sand
#

is there somewhere I can see all values for the UserSettingsAPI?

silk sorrel
#

you can get them directly from the module ig

Object.values(Vencord.Webpack.wreq(Vencord.Webpack.findModuleId('"textAndImages","renderSpoilers"'))).filter(s => s.userSettingsAPIName)
brave steeple
#

is it possible to access plugin settings from within native.ts? I've tried just about every way I could think of to get at the plugin settings there and it always generates an error saying that window is null if I do

vast karma
#

Export a function that accesses it, dunno

hoary pilot
#

since you're in the nodejs context

#
import { RendererSettings } from "@main/settings";

const settings = RendererSettings.store.plugins?.YourPlugin;
#

if a setting is at its default value it will not be defined

brave steeple
#

knowing it's undefined if the value is not set was what I needed, thank you

#

got it working now

tranquil hemlock
#

it's been probably over a month now since I submitted a plugin to #1256395889354997771 on #📩-modmail but haven't received a reply yet, how long are the wait times usually?

hoary pilot
#

(plugin-submission-????)

#

actually i can find that

tranquil hemlock
#

ah thanks

tbh ur kinda right my plugin was kinda pointless, it was meant to be a patchwork solution for more secure communication but yeah an encrypted messanger is probably the best idea

#

if you don't mind me asking, why is editing the message content in place a bad idea? and how could this be improved?

static jewel
#

can someone help me find a way to disable/enable noise suppression

dull magnet
#

like programatically ?

#

use react devtools on the button that does that

#

and see the onclick code

#

then do the same

static jewel
dull magnet
#

no

static jewel
#

how do i access it then?

static jewel
dull magnet
#

look up a tutorial on YouTube

#

if you don't see the option in devtools you need to press ctrl r to reload

meager palm
#

hi - i want to add listenbrainz rich presence support, just like LastFMRichPresence, should I add on top of the mentioned plugin or make a new one
and should I even attempt contributing to the main repo lol

#

nvm theres an unofficial plugin for it ignore ty

half chasm
#

hi im wondering what exactly the test patch button does

#

does it like run it once

#

or does it persist

#

bcs when i press it it says patch ok even though nothing happeens

vast karma
#

What test patch button

half chasm
#

in the

#

vscode extension

#

uhh

#

vencord buddy

#

or something

#

i forgot what it was called

half chasm
hushed loom
hushed loom
half chasm
#

does it execute it on your discord client or

hushed loom
#

Does not give any other runtime guarantees

half chasm
#

does it just test if its valid

hushed loom
half chasm
#

oh okay

#

so how do you see how patches will look

#

when you run them

#

do you have to inject ur plugin to test or

hushed loom
#

You can use patch helper in discord settings, run the plugin with the patch or use my version of vencord companion which will let you see what patches look like as you write them

half chasm
#

or is it like pinned

hushed loom
half chasm
#

thanks man

hoary pilot
#

@hushed loom satan

#

what does your companion do above stock

#

why is there nix

#

insane

quick zephyr
#

other than the thing that it still says it does in the readme but which it doesnt cause sadan removed it but didnt update the readme

hoary pilot
#

@hushed loom satan

hushed loom
#

Insnae

quick zephyr
hushed loom
#

Nop

civic elk
#

made a lil timezone plugin for me and my friends yippee

vast karma
#

That'll be the what, fourth?

hoary pilot
#

@dull magnet merge timedones

mortal turret
#

does anyone know how to make a vencord plugin cuz im trying to make a plugin for vencord to add a button at like the mute and deafen thingie

tropic ice
#

there's also resources in pins

mortal turret
#

k thanks

mortal turret
#

does the vencord compainon also build it automaticly?

half chasm
#

you still need to build and inject ur plugin every time you wanna see how the patch looks

swift delta
#

You don’t need to inject every time

#

Just build

silk sorrel
#

Kid named pnpm run dev

half chasm
#

does anyone know any plugins that patch message rendering

#

i cant find anything that doesnt patch message store

#

ty.

vast karma
#

Depends on which aspect of message rendering

#

Markdown parsing/rendering? Grouping? Embeds?

half chasm
#

i just want to find whatever is like responsible for the messages being rendered into the dm / the channel

#

how would i go about that

#

at like

#

the level where

#

the element is added

vast karma
half chasm
#

would it be better to like patch the messagestore

#

or to patch the message rendering

vast karma
#

I guess messagelogger has some patches related to that

#

Or NoBlockedMessages

half chasm
#

they dont have any patches relating to normal messages

half chasm
#

i didnt read through the entire thing but it looked like they just added a deleted attribute to the message

#

and patched the color rendering

#

i dont know

#

i'm considering if manipulating the dom directly would be worth it (since im not planning to publish this either way)

civic elk
# vast karma That'll be the what, fourth?

i had looked at timedones and it was too out of date, did not run, and the timezone database it used was completely down
mine is much simpler and uses the intl api https://github.com/Commandtechno/Vencord/tree/main/src/plugins/timezones
i also made a database that me and my friends can set which is why i dont plan on turning this into anything more
i do not know of any other ones

GitHub

A Discord Desktop Clientmod. Contribute to Commandtechno/Vencord development by creating an account on GitHub.

#

its pretty tiny, steals most of the code from uservoiceshow

#

i mainly wanted to recreate the local time thing from slack

#

i also made a separate thing that parses and replace timestamps in messages i might combine these 2 things

humble tulip
amber mantle
#

insert disappointment around timedones plugin

night lichen
#

Hello everyone!
Sorry to bother. It's been ~2 hours I search around, but can't find anything.
My goal is to create a (prototype?) plugin that change the fancy text in channel to their "normal" conterpart.

I tought that patches allow that. I looked around (mainly with the hidden channel plugin) but can't find the good find. I always get "two much module".
Anyone know if they are plugin that done that or something around that so I can check their code?

Thank you !

night lichen
#

it is with vesktop ?

#

Because I talk about channel name, not the fancy display name! Some people for example, use 𝐑 instead of R and it makes the search totally broken

vast karma
#

No, that setting is for discord's latest nitro bullshit

#

Unicode abuse is a completely different matter

night lichen
#

Also, even after enabling the react dev tools it doesn't show up in the dev tools, should I do something more than restart discord?

humble tulip
#

You have to do a full restart of discord then also a regular refresh for it to show up

#

Dumb bug

night lichen
#

I got this :

patches: [
        {
            find: "UNREAD_IMPORTANT:",
            replacement: [
                {
                    match: /name:\s*(null\s*!=\s*\i\s*\?\s*\i\s*:\s*\i)/g,
                    replace: "name:$self.fancy($1)"

                }
            ]
        }
    ]

But it works "only" for displaying. If someone have an example for searching /autocomplete!

tropic ice
#

alternatively, you could make a font and use css

night lichen
#

I don't think font allow to change #:loudspeaker:|𝐃écrets・𝐌ortels to their counterpart :/

#

(Also I don't think it will works on searching :/)

tropic ice
quaint cipher
#

make plugin patch when the channels get added to ChannelStore and replace the text there mayhaps

night lichen
vast karma
#

Nice betterdiscord-style patching

night lichen
#

😭tried my best.

#

Need to remove the stupid comments I left

languid kiln
#

mhmm

#

I need an api for my plugin but I cant fetch it

normal wagon
#

actually idk if i can send it here

nimble sluice
#

Hey guys, I would really love some assistance from you guys who know the ins and outs of the vencord api + discord api. I am working on making a plugin that interacts with buttons within a discord channel (so that I can use my keyboard to control my music bot).

However I keep getting a 401 Unauthorized result from sending a valid payload to the API. I tried the restAPI along with the FluxDispatcher (unsure if these actually do what I want, just trying anything I can find at this point)

The only method I have found is querrying DOM elements with:

document.querySelectorAll('[id^="message-accessories-"]');

// narrowing it with

const buttonText = button.textContent?.toLowerCase() || "";
const ariaLabel = button.getAttribute("aria-label")?.toLowerCase() || "";

const emojiImg = button.querySelector('img[alt]');
const emojiAlt = emojiImg?.getAttribute('alt')?.toLowerCase() || "";

for (const label of labels) {
  const searchLabel = label.toLowerCase();

  if (buttonText.includes(searchLabel) ||
    ariaLabel.includes(searchLabel) ||
    emojiAlt.includes(searchLabel)) {

// and ultimately calling it with the hackiest way I could think with my limited knowledge of how things truly work internally

(button as HTMLElement).click();
tropic ice
#

have you looked at the video in pins?
probably would be helpful

civic elk
#

im going to take the datastore stuff from it

languid kiln
#

Can I preview my plugin or smth?

#

to get suggestions, help and notes.

red harbor
#

Hey, I'm working with addMessageAccessory and I assume that the props.message is a Message from @vencord/discord-types. If that's the case, is it normal that the Embed has no footer? property?
I tried to console.log the props.message with a message that has an embed with a footer and it shows that it has a footer property; also I tried logging props.message.embeds[0]?.footer?.iconURL and it works: it shows the icon URL link just fine. Is it another type?

dull magnet
#

use renderMessageAccessory instead

#

and maybe the type is just wrong

red harbor
#

Ok thank you, I'll try that

#

renderMessageAccessory is something in @api/MessageAccessories?

dull magnet
#

no

red harbor
#

Oh

dull magnet
#
definePlugin({
    name: "YourPlugin",
    
    renderMessageAccessory(props) {
        return <p>Hi</p>;
    }
})
red harbor
dull magnet
#

(but this is not going to fix your issue, just an unrelated thing)

red harbor
languid kiln
#

I need help I can't fetch to my domain its give me TypeError: Failed to fetch. Refused to connect because it violates the document's Content Security Policy.

dull magnet
dull magnet
#

you should always use auto managed methods unless you need more control

languid kiln
#

I will wait for my order

#

meow

dull magnet
languid kiln
dull magnet
languid kiln
#

Gonna try everything again and again and come later

languid kiln
#

still same issue

dull magnet
#

fully restart discord

languid kiln
#

same

#

and this is my native.js

red harbor
#

Just to be sure: You're not using web right? This doesn't seem to work with web since it says that native.ts is an Electron thing

languid kiln
#

im using canary

red harbor
#

Ok

swift delta
red harbor
#

Btw try renaming native.tsx to native.ts. I don't fully remember if Electron supports React out of the box but try that

languid kiln
#

gonna try

#

new error yippie

red harbor
#

Seems like your domain doesn't send a Access-Control-Allow-Origin header

languid kiln
#

Yeah yeah ik im just happy isnt the same error

red harbor
#

Ah ok lel

languid kiln
#

after finish my plugin how Can I share it ?

red harbor
#

Oh no wait

languid kiln
red harbor
#

As far as I know, I don't have permissions for posting there. But when I asked how to get access to this channel, I spotted on a menu on modmail saying "I want to submit my plugin". But I don't know if that means to submit it in #1256395889354997771 or to make it part of Vencord built-in plugins

#

TL;DR: Ask a moderator

tropic ice
#

to get it in vencord, you'd make a pr (and wait a decade for it to get reviewed and possibly accepted)

red harbor
#

Yeah I thought it was the same permissions for this channel's access

tropic ice
#

You can make a pr, but probably only make one if you know what you're doing and you think it has a good chance of being accepted

vital nymph
#

how do I run code when my plugin's settings are changed ?

dull magnet
#

onChange

languid kiln
#

Cuz I wanna submit it

vital nymph
#

the onChange is supposed to go inside definePluginSettings right ?

#

also are things like console.log supposed to show up in console ?

#

ok I have a big skill issue nvm

vital nymph
#

is useState forbidden at the top-level of plugins ?

#

ok thanks I guess I'll just use a let then

#

cat (2) real

hoary pilot
#

The Rules Of Hooks

languid kiln
quick zephyr
#

1/10 the color changing color picks a single solid color after you finish drawing instead of remaining a colorful line

quick zephyr
#

idk you didnt give any details at all just said "rate plz"

#

give a description of all it does

tropic ice
#

kinda cool, but seems useless to me

hushed loom
quick zephyr
#

apparently tic tac toe with friends

silk sorrel
#

Also how does the protocol work?
It would be cool if it was also real time (so you dont have to press confirm every time) and persistent, I'd love draw little things next to my messages

tropic ice
#

send an image

#

and if you want a real time thing you can use the whiteboard activity

languid kiln
#

a lot of messages

#

aaaaaaaaaa

languid kiln
# quick zephyr give a description of all it does

The drawing sticks to the message itself, not the screen — so when you scroll or zoom, it stays perfectly on the message. The idea is to let people add little notes, circles, highlights, or reactions directly on top of chats. It’s meant to feel natural and persistent, like you’re marking the conversation itself.

#

also I add this badge ApepeBaked

quick zephyr
#

looks off center

#

larger gap on right than left

languid kiln
#

Gonna improve it

hoary pilot
languid kiln
languid kiln
#

still waiting for suggestions

hoary pilot
languid kiln
hoary pilot
quick zephyr
#

anyone know the name of the experiment for this new dms button

#

searching dm and message turned up nothing unless im blind

hushed loom
quick zephyr
#

I dont have the experiment

#

it's crashing someone with questify who does have it

hushed loom
#

Just look around that area

quick zephyr
#

182 results in the file agony

hushed loom
quick zephyr
hushed loom
#

That's not what I meant

#

Just look around the code for that area

#

Experiment calls usually have their results destructured so you can spot them easily

languid kiln
hushed loom
quick zephyr
languid kiln
quick zephyr
#

first thing I see: MutationObserver

languid kiln
quick zephyr
languid kiln
#

post it

quick zephyr
#

I think MutationObservers count as dom manipulation 🤔 which isnt allowed

languid kiln
#

isnt big proplem to delete it

quick zephyr
#

can see the guidelines here

languid kiln
#

okk

#

What else

quick zephyr
#

install questify for +1 more

silk sorrel
#

hell yeah

silk sorrel
# languid kiln isnt big proplem to delete it

Most of your code is based on raw dom manipulation, which definitely isn't great (cuz it doesn't interact well with react's virtual dom, and can break things)
You should also remove document.createElement, document.querySelectorAll, and addEventListener's (unless used with a react ref)
Also, don't use the location href for parsing the channel id. Use SelectedChannelStore.getChannelId() instead. You can use it to get realtime updates with SelectedChannelStore.addChangeListener, or with useStateFromStores

languid kiln
#

but is the idea good?

#

is it worth?

silk sorrel
#

I like the plugin idea, would be fun to goof around with it in dms
you could even add an option to attach stickers to other people's messages like iMessage has

azure fossil
silk sorrel
#

there are probably more random buttons I missed

azure fossil
amber mantle
#

wtf is landing or learning about the dms page

silk sorrel
#

I think I saw a concept where the home page would have way more sections, including more stuff in the sidebar, so with this experiment they move the dms to a separate page
(possibly also related to the ICYMI experiment)

daring karma
#

hi, I have a patch for youtube watch together that removes the timeout limit in a file that I can override, but I'm not sure how to get that into vencord itself, it loads the main.js for the activity but I can't seem to get to it?

granite dune
storm needle
#

'ello would like feedback on this vim plugin i've been working on (I swear it's not fully vibe coded slop, I did put a lot of thought into the design and code for the most part 😭)

granite dune
#

share

hoary pilot
proud parrotBOT
# hoary pilot https://git.nin0.dev/userplugins/spotifyMainColor/src/commit/70eaba1e6847362b77e...

index.ts: Lines 15-27

async setTrackMainColor() {
    if (!SpotifyStore.track) {
        document.getElementById("vc-spotify-main-color")!.innerText = "";
        return;
    }
    const mainColor = await window.colorjs.average(SpotifyStore.track?.album.image.url, {
        format: "hex"
    });

    const style = document.createElement("style");
    style.setAttribute("id", "vc-spotify-main-color");
    style.textContent = `:root { --vc-spotify-main-color: ${mainColor}; }`;
    document.head.appendChild(style);
atomic sierra
hoary pilot
#

is there even a better way

#

i should make this support Apple Music and set your client theme

#

😭

storm needle
hoary pilot
storm needle
#

Thanks will check

green vessel
#

hi vencodr

#

i enabled the react devtools thing

#

restarted vesktop

#

and do not see react devtools

#

is it not in the extensions tabs as normal?

#

errors out on desktop gg

tropic ice
leaden fable
green vessel
#

does vencord have an eays API okr something to mke these buttosn?

#

i found it

#

fym button from vencord

#

ill jus use the deprecated thing

granite dune
storm needle
#

What's this eslint error
failed.
Error: Key "rules": Key "no-useless-escape":
Value {"allowRegexCharacters":["i"],"extra":"","extraCharClass":""} should NOT have additional properties.
Unexpected property "allowRegexCharacters". Expected properties: "extra", "extraCharClass".

dull magnet
#

the I didn't run pnpm install after updating error

storm needle
#

Oh

storm needle
#

I need some implementation advice for the vim plugin, beacuse if branches are atrocious

#

I tried this approach instead #3799
nvm, i think it's complete, at least the first iteration

storm needle
#

Do I have to raise another ticket for code review, or post on unofficial plugins?

hoary pilot
dull magnet
#

this isn't java you know 😭

#
type Motion = (ctx: VimContext, count: number) => VimRange;

const motion: Motion = (ctx, count) => {}
storm needle
#

i thought it would be cleaner that way so i can check the key with instanceOf at runtime

desert brook
#

hi hello!

#

anyways

#

im learning type script as im writing this plugin idea i had for a while

#

im having a block in how i fetch the user's favourite gifs

#

sorry if this is the worst fucking code ever, again i only had experience with c# and modding unity games not typescript

atomic sierra
#

oh waow its the ultrakill custom map guy

desert brook
#

yes hi i made envy and spite

#

funny

atomic sierra
#

hi

desert brook
#

anyways, yeah is there some sort of way of getting the user's fav gifs? this is just getting the fucking document elements and checking if they're a gif basically

atomic sierra
desert brook
#

it really only gets whats currently active and it cant fetch tenor gifs or giphy (i should update the filter list)

desert brook
#

alsoooooooo if im submitting it to the public mod list is it bad that im using this as the image for the randomize button

#

was meant to be playtesting but its funny so i wanna keep it in

atomic sierra
#

give people the ability to change it to whatever image they'd like /j

desert brook
atomic sierra
#

you mean gif's creation date or date it was added to favs?

tropic ice
atomic sierra
desert brook
#

OK OK IT WORKS NOW

#

THANKS UHHHHHHHH

#

THANK YOU SADEN

#

okay so

#

im assuming i cant have loggers right

#

for releasing a public plugin

#

seems like it

atomic sierra
#

why would you need loggers for public plugin

desert brook
#

lemme upload an example video

desert brook
#

workth

#

now how do i submit a plugin............................

silk sorrel
desert brook
#

its way worse btw than it was

#

before hand

#

previous:

silk sorrel
#

Why are you accessing vencord exports from the window object

desert brook
#

i feel like theres still some more ways to optimize this

desert brook
silk sorrel
#
import { findStore } from "@webpack/common"

(your editor will most likely correct this import)

desert brook
#

oh yeah

#

reminds me

#

i kinda uh

#

added // @ts-nocheck to my file

#

because it was complaining alot about import shit

#

but it still worked

silk sorrel
#

💀

desert brook
#

so i wanted to supress that error

desert brook
silk sorrel
#

Well it wont pass code review that's for sure

desert brook
#

unggggggggg ok ill look at the issue again

dull magnet
#

90% of those globals you're trying to access don't exist and that entire ?? chain makes no sense

desert brook
#

no? why

dull magnet
#

have a look at other plugins then instead of guessing random code

#

if you have to disable typescript or cast to any your code is wrong

desert brook
#

well i have been, the code for pasting gifs into text is from pastegifs plugin

#

and im cleaning up the plugin more

#

its just more or less me trying to experiment with typescript

#

i only had experience with modding unity games in c#

desert brook
austere mauve
#

I think you should just request ur data export

desert brook
#

my head kinda hurts wrapping over this and i've been working the entire friday but this is really something i wanted a long time ago as a plugin that i just now decided to do

#

i have alot of more respect for yall than i did ago now

dull magnet
#

just stay away from the window, you don't need to access anything from the window

all apis are able to be imported, just let your editor auto complete them. use vscode if you aren't and don't disable type checking

if you get stuck have a look at how other plugins do things

#

or ask here

desert brook
#

my head hurts

#

type script is like c# if it had a baby with python in my opinion

#

wait

#

fuck

#

forgot to update the copywrite

#

i kinda just copied it from another plugin

#

yes i added myself in the constants because i figure that out

dull magnet
#

you can put your own name in the copyright

desert brook
#

oh really?

#

okay

#

so uh

#

i made a fork

#

added the commits

#

do i just send a pr and do a request in modmail

#

right?

dull magnet
#

it's not too bad now but you can't load images from walmart without adding it to the csp which you shouldn't do

desert brook
#

i couldnt figure out how to load images locally

dull magnet
#

just use an svg

#

also move your findStore to the top level and use the lazy variant instead

desert brook
dull magnet
#

you never used svg?

desert brook
#

im looking into it

desert brook
#

ok i think i got it

#

shit its 1 am

#

ill finish this tomorrow

desert brook
#

ok does anyone know how to get like discord's icon colors for each theme? i feel like this arrow changes colors between black and white theme

#

black is b9b9bf for its arrow

#

and white is 6d6e77 for its arrow

molten night
desert brook
#

look at the arrow

#

look at the magnifier

#

they're different colors in each theme

#

thats what i want

molten night
desert brook
#

ohhhh

#

i misunderstood that i thought it would get the bg color

desert brook
desert brook
#

gotta fix off set tho

#

its ugly

#

looks good enough?

molten night
desert brook
#

wtf why does it have round border beyond the dice

#

its like BARELY there

#

but its there

desert brook
molten night
desert brook
#

yeah i know

#

ok fine ill see

desert brook
#

ok i think i got it

molten night
#

😭

desert brook
#

well

#

i think thats all

#

so

#

whats the process for submitting a plugin

molten night
#

How well does it work with other plugins like FavoriteGifSearch that adds a search bar right where your icon is?

desert brook
desert brook
#

ungggggggg

#

i dont know what to do

desert brook
#

hmmmmmmmmm maybe i could do some regex patching tomfoolery to find if favsearchbar added its search bar

molten night
desert brook
# molten night That shouldn’t be needed, how are you doing it currently?
patches: [
    {
        find: "renderHeaderContent()",
        replacement: [
            {
                match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,
                replace: "$1 $self.renderFavButton(this, $<searchComp>);$3"
            },
            {
                match: /(,suggestions:\i,favorites:)(\i),/,
                replace: "$1$self.getFav($2),"
            }
        ]
    }
]```
#

i just copied the code personally from the fav search

#

i just get the header and tell it to render the button

#

wait

desert brook
#

ok

#

so

#

i think im starting to get the issue

#

basically

#

the header where the search bar is

#

it replaces the entire header's rendering system with its own

#

meaning it fucks mine up

#

ill try to see if i can add my rendering along side it, not override it

#

arghgrhagrhag

#

ill figure this out tomorrow

cedar olive
#

this patch seems to not be needed

#

and your first patch needs to be changed in a way that it's compatible to be applied with FavSearchBar

#

you could instead patch this place

#

and insert your button after this.renderHeaderContent()

#

but only if this.state.resultType === "Favorites"

#

kinda like this: children: [t, this.renderHeaderContent(), this.state.resultType === "Favorites" && self.renderFavButton(...)]

desert brook
cedar olive
#

same module you are patching

desert brook
#

taking another attempt

desert brook
#

ok i might be stupid and its patching in a new file but when i enabled favourite gif search, for some reason my patch gets overridden?

#

heres with fav gif disabled and mine turned on

#

i got a class soon irl so i gotta go

desert brook
#

i hate my life what am i doing wrong here

#

i just want compatibility with another plugin

#
renderHeader() {
            let {resultType: e} = this.state
              , t = null;
            return null != e && (t = (0,
            r.jsx)(c.P3F, {
                onClick: this.handleClearQuery,
                className: v.backButton,
                "aria-label": O.intl.string(O.t["13/7kX"]),
                children: (0,
                r.jsx)(c.whL, {
                    size: "md",
                    color: "currentColor"
                })
            })),
            (0,
            r.jsxs)(f.Z, {
                align: f.Z.Align.CENTER,
                children: [t, this.renderHeaderContent()]
            })
        }```
#

what am i doing wrong

dull magnet
#

there are no new lines in discord's code

desert brook
#

dude i just want this plugin to be done

#

im so burnt

#

okay one last attempt

humble tulip
desert brook
#

i give up bruh

#

hey if anyone wants to fix this one singular bug for me then heres the file ok bye forever i guess

#

im stupid 120%

granite dune
pure temple
vast karma
#

How would you add buttons without patches?

#

Dom manip?

pure temple
#

no

#

accessing a plugin that did hte patches for me

#

specifically here:

const favGifSearchBar = Vencord.Plugins.plugins.FavoriteGifSearch;
        if (!favGifSearchBar) return;

        const original = favGifSearchBar.renderSearchBar;
        favGifSearchBar.renderSearchBar = (...args) => {
            const jsx = original.apply(this, args);
            return (
                <>
                    {jsx}
                    {this.renderFavButton(this)}
                </>
            );
        };
    }
#

kinda cursed becuase i don't like touching other peoples code but mmhamahm

desert brook
pure temple
#

uhhh

#

i dunno really, i have a plugin coming up with me as Dev.haz but honestly you can say this one is all you king

desert brook
#

ok uh

#

now new bug

pure temple
#

oh is there? tbh i did VERY minimal testing apart from going "ooh it's there"

desert brook
#

if search doesnt exist it doesnt appear

#

but

#

i think i can fix that

pure temple
#

that's how it looks like

pure temple
#

it is called randomfavouritegifsend

desert brook
#

i just wanted both compat

pure temple
#

but that i kinda have a fix to, you'd just have to manage css or whatever

#
    patches: [
        {
            find: "renderHeaderContent()",
            replacement: [
                {
                    match: /(children:\s*)(\i(?:\.\i)+\(\i(?:\.\i)+\))/,
                    replace: "$1[$2,$self.renderFavButton(this)]"
                }
            ]
        }
    ],
#

this patch worked but made it look weird, put it under the word "Favourites"

#

so just do some css or html nonsense and it should be fine?

#

but then i saw i assumed it was favourites only and scrapped it

desert brook
#

ah wait its nearly 12 am

#

shit

#

well you can either fix it for me while i wake up tomorrow or just leave it to me

pure temple
#

this was my procrastination from doing finals studying tbh i need to lock fr in RIGHT now

desert brook
hoary pilot
#

gl

#

making vench0rd plugins won’t land you big money studying will

pure temple
#

my finals start in a week so i guess i have the time, im being very proactive compared to my usual self

desert brook
#

thanks haz

#

this wouldnt had happened if it werent for you :D

amber basin
#

havent touched plugin dev in ages, if i make clone an upstream plugin into userplugins it favors the userplugin right?

#

looks like it, but wanna be sure

#

@hoary pilot rate hack

#

will be delayed but atleast it works

#

banger

hushed loom
dull magnet
#

it is deliberate and won't be changed

#

(but at the same time I don't actively test userplugin support, I really don't care about it)

muted dirge
#

How often do the pull requests get reviewed?

quick zephyr
#

somewhere between 1 day and 3 years

desert brook
#

dang i was JUST gonna ask that here

#

aughhhhhhhhhhhhhhhhhh

#

i just finished my exams and wanted to check in my pull request but nothing happened yet

#

strange tho other people's got done tho, i just thought they at least started by date

quick zephyr
#

whether your pr gets reviewed is (recency bias bonus + how much V likes you + roll a D20 (1-19 count as crit fail))/2

desert brook
hoary pilot
pure temple
#

man.

viscid marsh
#

If I'm trying to fetch https://www.xivmodarchive.com/modid/123268?json=true, should this be all I need in my native.ts file?

import { ConnectSrc, CspPolicies } from "@main/csp";
CspPolicies["xivmodarchive.com"] = ConnectSrc;
swift delta
#

But Yes

viscid marsh
#

o gotcha, that makes sense - thanks!

dull magnet
#

without /

viscid marsh
#

actually what worked I think was www.xivmodarchive.com

dull magnet
#

yes the www is important

#

that's an entirely different domain

viscid marsh
#

Dang, the site's referrer policy prevents hotlinking rip

#

would I be able to like, upload an image from a url to the discord cdn and display that link?

languid kiln
#

when u change anything in native.tsx

viscid marsh
#

put an image from a url I retrieve from a fetch inside an embed

languid kiln
#

and what is ur proplem

viscid marsh
#

I get a 403 error when the renderer tries to display the image

languid kiln
#

or something like this

proud parrotBOT
swift delta
#

Yes, make sure you are using the correct one for your purposes

viscid marsh
#

I do have

import { ConnectSrc, CspPolicies, ImageSrc } from "@main/csp";

CspPolicies["xivmodarchive.com"] = ConnectSrc;
CspPolicies["www.xivmodarchive.com"] = ConnectSrc;

CspPolicies["static.xivmodarchive.com"] = ImageSrc;

Without CspPolicies["static.xivmodarchive.com"] = ImageSrc; I was getting CSP errors, but I no longer get CSP errors now that I have that, I get that 403 error

viscid marsh
#

dang, and the site owner said they wouldn't relax their referrer policy due to abuse :(

dull magnet
#

you can send fetch request from native.ts to bypass

hoary pilot
#

Vench0rd AbandonWare

dull magnet
#

no you're just retarded

#

you're rendering your sidebar entry instead of your panel

#

vencord_userplugins_panel

desert brook
#

man im sad

#

its been a week

#

my plugin hasnt even been reviewed

quick zephyr
#

if you're sad after a week you might need to be put on a preventative watchlist before long

humble tulip
storm needle
hoary pilot
#

write good DX

#

typesafe Vencord.Api.openSettings()

shrewd tundraBOT
languid kiln
#

I have a proplem in my own draw/doodle plugin I need someone to focus with me

iron epoch
viscid marsh
#

is site rip

#

getting 504 error when trying to run inject script

hoary pilot
#

vai what is 504 status code

shrewd tundraBOT
# hoary pilot vai what is 504 status code

A 504 Gateway Timeout status code indicates that a server, acting as a gateway or proxy, did not receive a timely response from another upstream server it needed to access to complete the request. This often points to network-related delays or issues within the server infrastructure, rather than a problem with the user's device or internet connection.

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

dull magnet
#

only github

hoary pilot
#

is there an api to add things to profile popout

#

or do i need to manually patch

dull magnet
#

no api

hoary pilot
#

makeeeeeeeeeeee

ancient shard
#

I'm having trouble with a patch for my plugin. Basically i want to add a third button panel to the voice chat controls tray. I made a patch and the regex works but it's not rendering. It's my first plugin and I don't fully understand how this works.

this is the patch

patches: [
        {
            find: "center-control-tray",
            replacement: {
                match: /(\(0,\s*([a-zA-Z0-9_$]+)\.jsxs\)\("div",[\s\S]*?className:\s*([a-zA-Z0-9_$]+)\.buttonSection[\s\S]*?)(,\s*\(0,\s*[a-z]+\.jsx[\s\S]*?onDisconnectCall:)/,
                replace: '$1,(0, $2.jsxs)("div",{className: $3.buttonSection, children: [(0, $2.jsx)($self.myCustomComponent, {})] }) $4'
            }
        }]

The tray is a wrapper element that has two button sections and the disconnect button as it's children, i just want to inject a third buttonsection and render my component inside it.
I even added a console.log inside the custom component but it doesn't show up in the console like it never loadad, but when i open the webpack module, i see that the replacement worked.

ancient shard
#

hold on, i think i am regexing the wrong thing. im surprised it didn't error

dull magnet
ancient shard
#

yeah, i was writing the regex through crtl-f in vscode, now i found the patch helper in the settings

silk sorrel
#

isn't [\s\S] equivalent to . husk

ancient shard
#

tuff time neva last, only tuff peepol last

dull magnet
silk sorrel
#

interesting, I didn't think of that

dull magnet
#
/./s.test(text)
/[\s\S]/.test(text)
#

these are the same

ancient shard
#

also the react dev tools disappeared bruh, i even retoggled the thing in vc settings

dull magnet
#

press ctrl r

ancient shard
#

worked

orchid gazelle
#

im tryna wrap my head around MediaEngineStore, anyone got any resources on it?

#

tryna find a way to get incoming golive streams

#

this could also be the wrong place to look to try and kinda "intercept" an incoming stream

ancient shard
#

what is golive? is it screenshare?

orchid gazelle
#

yeah

quick zephyr
#

is using a native file the only way to get past cors when making a post request

dull magnet
#

do you control the server

quick zephyr
#

no the discordsays domain

dull magnet
#

the most likely answer is no

quick zephyr
#

I decided just to try with a native file but now im being hit with

TypeError: Cannot read properties of undefined (reading 'complete')

which is my native function im calling from index.ts