#🧩-plugin-development

1 messages · Page 55 of 1

vast karma
#

No need to worry before that happens

flint bronze
#

If another plugin needs to patch it, someone will make a common API or change the patch

vast karma
#

I did get a report that one of my userplugins conflicted with SMYN, but it wasn't too hard to fix once I found out

flint bronze
#

stupid question

#

nvm

quasi sentinel
#

how do i debug plugin errors? ctrl + shift + i is useless

vast karma
#

Add more console.log

dull magnet
#

the console has your error

quasi sentinel
#

where exactly is the error

dull magnet
#

there is different log

#

look above

worldly adder
#

i think i see what i gotta do for the IPC stuff, i need to add 2 IPC events

  1. to open the system directory selector dialog to choose the output directory
  2. to write a file out (with appropriate safety checks etc.)
    i think i could add them to ipcMain.ts but i also see there is a file ipcPlugins.ts which might have been made for this purpose?
dull magnet
#

neither actually

#

we have abstractions for it

#

^

worldly adder
#

oh 😮 awesome ty

dull magnet
#

our build tool ✨ magic ✨ auto generates bindings for you

quasi sentinel
#

how do i run javascript snippets via a plugin? vencord blocks eval()

flint bronze
#

function constructor

vast karma
#

Or just copypaste the code into the plugin

flint bronze
#

But @quasi sentinel is building a JS snippet plugin

flint bronze
#

look, glorified eval

vast karma
#

Eval does not need glory

quasi sentinel
#

ty

#

but this doesn't seem to support newlines (unless im stupid)

vast karma
#

Of course it does

#

It supports arbitrary strings, as long as they contain valid js syntax

#

If you mean js string literals don't support newlines, then correct

quasi sentinel
#

well shit

vast karma
#

You can use a template literal (`-enclosed) or \n

quasi sentinel
#

oh

#

i just thought defining strings would error out if they have a \n

dull magnet
vast karma
#

There's a lint against direct eval I think

quasi sentinel
flint bronze
dull magnet
quasi sentinel
#

this is the error

dull magnet
#

??

#

no it isnt

quasi sentinel
#

yes it is

dull magnet
quasi sentinel
#

oh shit im dmub

#

wait what it works now

#

im a genious

#

ok now time to add support for multiple snippets

worldly adder
#

hmhm, i am trying this in my context but it doesn't seem to see the native function (i get TypeError: Cannot read properties of undefined (reading 'selectImageFolder')).
the name should match the string in definePlugin({name:"",...}) right?

dull magnet
#

full restart discord

worldly adder
#

okay

dull magnet
#

and no, it matches your foldername converted to PascalCase

#

without any .desktop suffixes and such

worldly adder
#

~~what about the .desktop -- ~~ okay, that should be the same either way. full restart it is

#

do both files have to be .ts and not .tsx?

flint bronze
#

do you use react components? (for example, injecting custom UI elements)
YES: tsx
NO: ts

#

also I dont think tsx will work for native stuff

worldly adder
#

ok cool thanks. i found the error, i didn't put an empty parameter at the start. is there a use for it?

vast karma
#

At start of what?

worldly adder
#

at the start of the native function export e.g. export function sayHi(_) {console.log("hello :3");} or whatever

#

the _ there

flint bronze
#

from what I can tell it is a IpcMainInvokeEvent

dull magnet
#

yes the first arg is the ipc event

jagged briar
#

i just thought of a plugin that would remove all of discord's css and apply a basic theme so its more performant

#

idk if im stupid or not

flint bronze
#

.sender is WebContents

flint bronze
jagged briar
#

would prob require dom manip blobcatcozy

flint bronze
#

you will have to restyle everything

flint bronze
jagged briar
#

actually that's a terrible idea lol

vast karma
#

Just tried it, looks terrible and breaks scrolling completely

jagged briar
#

well i mean after that applying a very basic colorable theme

worldly adder
#

oh that is actually super useful 🤔 could i get the BrowserWindow instance from it somehow instead of using BrowserWindow.getFocusedWindow() which i would guess is a bit fragile?
or do the WebContents and WebFrameMain not have back references...

#

i need the BrowserWindow instance for dialog.showOpenDialog i think, to do a directory selector instead of file selector

#

maybe it doesn't matter

vast karma
#

console.log it

#

Wait where would that log even show up

worldly adder
#

not in the console apparently 😅 i wonder if i could grab some other logger on the native side of things...

vast karma
#

Maybe it shows up in the terminal that launched vesktop, like nodejs does

dull magnet
worldly adder
dull magnet
#

but yes you can get that from the event

#

hence why we pass it to your func, in case you need it

#

but 95% of ipc methods just ignore it :p

quasi sentinel
vast karma
#

Never use direct eval

#

It messes up all kinds of jit and bundler optimizations

#

Either (0, eval)(str) or new Function(str)()

quasi sentinel
#

oopsie

vast karma
#

Also might be good to add a isValid to the settings

iron epoch
#

how to get the style of a prop? like navbutton

iron epoch
vast karma
#

What does "style of a prop" mean

#

Props is just an object your component is passed

iron epoch
#

really sorry if what i am saying is non sense. I always chose to program plugins mid night

vast karma
#

Classes are usually in className prop

iron epoch
vast karma
#

Depends on what context your code is running in, and like a billion of other factors

jagged briar
worldly adder
#

ok this is a bit of a noobie react question but...
i'm making the folder selector Settings component and it's working but i want to have a text field that updates when a folder is selected to display the value to the user. the html/js way to do this is to just give the Text element an id and use document.getElementById(textElementID).innertext = choice but surely there must be a way to enclose a reference to the Text element in the button's onClick handler instead

dull magnet
#

you do it via state

worldly adder
#

ah ok

dull magnet
#

check the react guide

noble rose
#

Do I need to do anything about this? Added myself to the list, thought I had branch updated before doing so.

glass oracle
#

git pull again

north flame
#
rm -rf *```
iron epoch
#

lmao, weird bug

#

any experts in UI? I want some suggestions of how you think this should look like

vast karma
#

Having the box empty looks bad, add a placeholder

#

And set the same border-radius as the cards below

#

Margins are inconsistent too

glass oracle
#

heading weights and margins inconsistent

iron epoch
#

yeah that looks much better

#

now time to convert the parser to typescript

vast karma
#

Doesn't look like you changed anything?

#

Except the placeholder, I guess

iron epoch
vast karma
#

The placeholder is an improvement (personally I'd move the parenthesis from the heading to there)

#

The heading should look like the other heading

iron epoch
#

hm, alright. I am gonna change it to match the other heading

vast karma
#

Describing what content is allowed should be in the placeholder, not the heading

iron epoch
#

done

worldly adder
#

hello, still working on the image downloader plugin.
right now I am weighing options for the actual fetching & saving of the file.

  • electron-dl is not included.
  • WebContents.downloadURL is convenient but hooking the event and not messing with other downloads might be tricky.
  • copying Quicksave-BD-plugin's method (spooling up the chunks and saving them to disk) is fiddly but might have some advantage like not creating a broken file if the download gets interrupted idk
  • https/http .get => response.pipe(file) after the appropriate checks seems the cleanest but isn't very electronny. still, i have a fragile prototype working with this method.

is there another better option?

dull magnet
#

the last option would indeed be the best

#

but make sure to verify the url

#

for example only only discord cdn / media proxy

worldly adder
#

i made a setting to toggle whether to allow grabbing from other places (on safe by default)
since discord sometimes compresses stuff on its proxy? according to a thing idk

lean bear
#

My problem requires me to isolate users video feed and preferably expose it in real time on some local endpoint

#

and I am thinking about achieving it with vencord

#

is there some plugin that interacts with user cam that I can look into?

jagged briar
#

there isn't a plugin that does that as of now

#

Messing with that is definitely not a starter project

lean bear
#

idk if capturing ws connection would be easier 💀

#

but thanks for info

leaden fable
#

Is there a way to debug my custom plugins other than the console?

#

Idk like making breakpoints and such?

jagged briar
#

the sources tab is your friend

#

you can put breakpoints in it

#

use react devtools to find the script you need

leaden fable
#

Meh. Also can I make a pull request to update someone else's plugin? Like adding feature/improvement?

jagged briar
#

yes

dull magnet
# leaden fable Idk like making breakpoints and such?

yep

either check the .vscode folder, there's a launch config for attaching vscode as a debugger and instructions how to use it

or way easier, search for your plugin name in devtools via ctrl shift f, open its file and you can just put breakpoints there. if you got sourcemaps enabled it'll show source code there

leaden fable
#

Pull requests should be made on the dev branch or main?

viral roost
#

dev

leaden fable
#

Who's on the github account of Vendicated? Sho?

vast karma
#

Secret

#

It's @dull magnet though

leaden fable
#

Well whoever it is, they should take another look at my pull request

north flame
#

They’ll get around to it

noble rose
#

We needa give them some slack

vast karma
#

This is discord not slack

jagged briar
#

venslack when

stone crag
#

do u guys know where the source is for Toasts (like the full implementation for show() and stuff)? i don't think it's part of discord
i'm trying to make a persistent toast that i can edit the text of dynamically for my plugin
basically they can search through a list of messages with arrow keys and i tell them their progress (eg 2/5 messages)

#

also i wanna see how it works

cedar olive
#

enter Vencord.Webpack.Common.Toasts in the console

#

it will show you the source

stone crag
#

ohhhh

#

thx

floral tapir
#

this is a beginner af question, but i've made some changes to the code, how do i test it out in discord before making a PR to make sure my code actually works lmao

#

ik how to code just, never rlly worked with web stuff/discord stuff before

north flame
floral tapir
north flame
# floral tapir love you goodbye

After injecting you can just do shell pnpm watch so you don’t have to rerun the command every time (it’ll autobuild every time you save), and make sure to refresh Discord when checking new changes

floral tapir
#

so i just do this in my vencord local repo?

north flame
#

Yes

#

In the terminal

floral tapir
#

yes i love you

tame nexus
#

Hello! The recent changes to the Settings API unfortunately broke my plugin and I'm currently trying to fix it. My plugin uses stores to save its own settings which was useful at the time. I'm not sure if it's still relevant or if Vencord has added its own API for that. Anyways, here is my implementation.

The error that this line of code throws is Uncaught (in promise) Error: An object could not be cloned.. This line of code causes the error to be thrown in the first place once executed. If any property is changed from any plugin in the Settings object, this error will be thrown. The value is still being changed which means if you access it, it has its new value but it still prints this error. I didn't come up with any solution yet. The only thing that seemed to work was using the PlainSettings object instead of the Settings object. But that solution is bad because the settings don't persist after a restart probably because they are not proxied.

As you can see I have almost no idea and the only reason I want to fix this is because some people use my plugin if that weren't the case I would just abandon it. I would be really grateful if someone who maybe worked on the rewrite could quickly look over it and maybe explain the issue because I just can't seem to find it...

dull magnet
#

this means every member you store in settings needs to be cloneable

#

things that aren't cloneable include functions, classes, etc

#

your error implies that you're storing something inside settings that isn't cloneable

#

json stringify would just discard such members so nothing has changed in functionality

tame nexus
#

Ohh... yes that would be the issue then. My implementation of stores has functions inside the objects.

dull magnet
#

why?

#

that never worked

#

well it would just discard the function members

#

what even is the purpose of your store thing?

tame nexus
#

It did. Before the api changes everything worked fine. I have an idea do you think that would work Settings.plugins[pluginName].stores[storeName] = JSON.parse(JSON.stringify((typeof s === "function" ? s(get()) : s) || get()));? I know that's pretty bad to do but do you think this would achieve the same behaviour before the rewrite?

dull magnet
#

i would recommend just not storing functions in there

#

why are you doing that

tame nexus
#

I had so many properties to change so I remembered a library like zustand and implemented similar behaviour

dull magnet
#

what are the functions in there for

#

are they part of your api or are you just spreading some object that happens to contain functions

#

also i still think you don't even need it. the regular settings store already provides reactivity and hooks and such

#

if you tell me what extra functionality you require, we could think about integrating it natively

tame nexus
#

I don't know if what I did is good practice so be aware I didn't had and have any Idea what I'm doing there

dull magnet
#

so the main use case is managing multiple profiles of the same set of settings?

tame nexus
#

Not really that was an Idea that came later but yes that's also pretty useful. I think my main reason to why I added this whole store functionality was because I needed a clear way of modifying properties. I know there are probably easier ways to do it but at that time I thought this was the best Idea.

dull magnet
#

i mean in vencord you just

const settings = definePluginSettings({
   ...
});

settings.store.fooBar = 42;
#

don't think it gets any simpler

tame nexus
#

but wouldn't all of that show up in the settings tab? In my plugin I have this custom interface.

dull magnet
#

you can use something like

const settings = definePluginSettings({}).withPrivateSettings<{
    profiles?: Record<string, Profile>;
}>();

function getProfile(name: string) {
    settings.store.profiles ??= {};
    return (settings.store.profiles[name] ??= makeDefaultProfile());
}

getProfile("high-res").bitrate = 1000000;
cedar olive
#

you can also just set hidden to true

dull magnet
cedar olive
#

no because hidden is still managed with defaults

#

personally I think private settings is mainly for arrays and stuff

tame nexus
# dull magnet you can use something like ```ts const settings = definePluginSettings({}).withP...

Yeah something like that is certainly possible. But my approach is just easier to handle in my head than this because after a while it just gets more complex and I also made it reusable so it's really really easy to just create a store and also to create middlewares that modify something in the store. Not to say that your approach is bad it's as good as mine but I'm just used to it. But that you for the help and suggestions I really appreciate that :)!

iron epoch
#

could someone take a look at my plugin code?
https://github.com/programminglaboratorys/Vencord/tree/main/src/plugins/betterModeration

and maybe helps me to fix those

C:\Users\ACER\Downloads\Vencord-main\Vencord\src\plugins\betterModeration\UI.tsx
  1:1  error  Invalid header                      simple-header/header
  9:1  error  Run autofix to sort these imports!  simple-import-sort/imports

C:\Users\ACER\Downloads\Vencord-main\Vencord\src\plugins\betterModeration\automod.ts
  1:1  error  Invalid header  simple-header/header

C:\Users\ACER\Downloads\Vencord-main\Vencord\src\plugins\betterModeration\index.tsx
   1:1  error  Bad header spacing                  simple-header/header
  18:1  error  Run autofix to sort these imports!  simple-import-sort/imports

Note: if you found unnecessary code its probably for debugging or testing

vast karma
#

--fix

#

Just like it tells you to

frosty otter
#

run autofix

iron epoch
vast karma
#

pnpm lint --fix

iron epoch
#

oh nice, its fixed

#

now with the css warnings (done)

noble rose
#

it's annoying that i have 2 import sorting extentions that do the exact opposite

#

when i save i gotta lint it all over

near aurora
glass oracle
#

why do you need an import sorting extension

#

vscode has this builtin

frosty otter
near aurora
#

when pr into main??

#

or did you already open and it got forgotten?

chrome elbow
#

author closed the pr

iron epoch
#

can someone help me figure out the best way to deal with this bug.

is creating a variable to check if the component is already rendered to not render it again, is the best option?

proud parrotBOT
# iron epoch https://github.com/programminglaboratorys/Vencord/blob/main/src/plugins/betterMo...

**UI.tsx: **Lines 17-52

export function TestInputBoxComponent(props: { currentRules: AutoModRule[] | null; }) {
    const [inputValue, setInputValue] = useState("");
    const [warningText, setWarningText] = useState("");
    const { currentRules: currentRulesProp } = props;
    const currentRules: null | Array<AutoModRule> = currentRulesProp;

    useMemo(() => {
        if (!inputValue || !currentRules) return null;
        const match: undefined | MatchedRule = currentRules ? match_rules(inputValue, currentRules) : undefined;
        console.log(match);
        console.log(inputValue);
        if (match !== undefined) {
            setWarningText(`Match: ${match.rule.name}, filter: ${JSON.stringify(match.filter)}`);
        } else {
            setWarningText("");
        }
    }, [inputValue, currentRules]);
    return (
        <div>
            <TextArea
                className="automod-test-box"
                value={inputValue}
                placeholder="Type something to test automod (Supports filters only)"
                onChange={setInputValue}
                id="AutomodTestBox"
            />
            <p
                style={{ display: warningText ? "block" : "none" }}
                className="automod-test-text-warning"
            >
                {warningText}
            </p>
        </div>
    );
}

proud parrotBOT
vast karma
#

categoryContainer sounds like there'd be multiple of them

#

So if you patch that, it makes sense that it appears in each category

iron epoch
cedar olive
#

first thing you can change your find to .Messages.GUILD_SETTINGS_AUTOMOD_MESSAGE_FILTER_DESCRIPTION

#

and you want to only render the input once? here?

#

instead of one in the members, and one in the content

iron epoch
#

yes

cedar olive
#

so you need to patch where the arrow is

#

what I marked with the red line is what renders the Members and the Content

iron epoch
#

oh alright

cedar olive
#

it should be pretty easy honestly

#

you can just do this

vast karma
#

Or patch the H perhaps?

iron epoch
cedar olive
#

I would prefer just patching the place before

iron epoch
#

should I credit you two in the authors? for the assistant?

vast karma
#

Love chrome's formatting of indirect calls btw

#

Nah don't think so

cedar olive
#
{
    find: ".Messages.GUILD_SETTINGS_AUTOMOD_MESSAGE_FILTER_DESCRIPTION",
    replacement: [{
        match: /\.textBadge.+?}\),/,
        replace: "$&$self.renderTestTextHeader(), $self.renderInputBox(),"
    }]
},
vast karma
#

Not unless you're gonna credit mdn too

iron epoch
cedar olive
#

the match is super simple, it matches .textBadge and goes forward until it finds the closing component render }) followed by a comma (which means we are going to the next children)

#

it works because textBadge is part of the last component rendered there (in that children array)

vast karma
iron epoch
iron epoch
cedar olive
#

there nothing specific to see

#

it's just docs for web related stuff

#

css, html, javascript and more

flint bronze
#

for my homepage plugin, I am adding a few quick access buttons in the main overview header box, I need suggestions for what people need to quickly navigate to

#

i plan to dynamically populate the rest of the page btw

#

help i have a stupid button and i hate it

vast karma
#

What does the stupid button do?

#

A barrel roll?

flint bronze
#

Nothing

#

yet

vast karma
#

You should add a barrel roll button

flint bronze
vast karma
#

Do credit me for the idea

amber mantle
#

do abarrel roll!

flint bronze
#

get real

flint bronze
#

The feed card

worldly adder
#

am i doing anything nonsensical here...

dull magnet
#

well first of all, you're storing the folder in regular settings that the browser can change

#

so that defeats the point of the isolation

#

since the browser can change the folder to whatever it wants to write arbitrary files

#

i plan to introduce separate native only settings soon which you'll be able to use

worldly adder
#

oh, gotcha. so the native side code needs to validate and store the folder on its own.
i can do some kind of temporary thing with app.getPath('userData') in the meantime i spose

#

unless by 'soon' you mean in like the next week or so

#

work picked up so i'm busier than i expected 😅

dull magnet
#

i can add it very soon, its only a few lines of code

#

i recently made a refactor of the settings api to prepare for this

worldly adder
#

ok, i will just wait on that and work on other improvements in the meantime milliethumbsup

dull magnet
#

i think adding it as a hover button is strange

#

why not add it here?

#

below save image

#

and also add it on embed images

#

ReverseImageSearch plugin should be useful reference, does exactly what you want

worldly adder
#

mostly to reduce number of clicks for my aging fingers 👵 this way you can download e.g. 6 images in one click. i often upload 6 different photos of cooking process in one message and then it's a pain to download each of them individually.

but yes i'll add those options next and change the default away from my own preference to something more familiar

dull magnet
#

i think having both would be best then

#

youre acting like youre 60 PrinzLaugh youre definitely not tthaaaaaaaaaat old right

worldly adder
#

ok not quite that old...but i'm old enough to get arthritis sometimes and i don't want to make it worse 🤣

dull magnet
amber mantle
#

the funny mice

worldly adder
#

goodness i hope not. though i already did buy a mouse with a recommendation for this purpose, the Logitech MX Master 3S.

jagged briar
#

there are two different functions and they are both identical and i need to patch one of them

#

i'm stuck

#

one of them isn't used and the other is

#

wait theyre in 2 different modules im stupid

jagged briar
#

would it be possible to let pnpm watch listen to css file changes too? cause everytime i change the styles for my plugin i have to save another file to build it

jagged briar
#

qhar

flint bronze
#

your pnpm watch is busted

#

it works for me

jagged briar
#

yeah it doesnt build when i save it

flint bronze
jagged briar
#

its always been like this

dull magnet
#

skill issue

#

works on my machine

jagged briar
#

maybe it's a vscode quirk

#

idk

frosty otter
#

works on my machine

vast karma
#

I've sometimes had to restart the watcher after adding new files

tropic ice
#

works on my machine

acoustic nest
#

made a little plugin to help with understanding context around a blocked message

frosty otter
#

so basically jump to message?

acoustic nest
#

yes but the message is blocked and doesn't exist anymore

frosty otter
#

nice

#

actually very useful

acoustic nest
#

so it's really hard/tedious atm in native discord to go and find surrounding messages

#

to see if they tried to evade or smtn

#

or generally to see what the convo was about

acoustic nest
swift delta
swift delta
acoustic nest
iron epoch
jagged briar
#

My css is in the same folder as my plugin and my plugin builds fine

pure temple
acoustic nest
#

whar

pure temple
#

in vanilla discord, clicking on the automod message jumps to the message

#

only if it wasn't blocked, though

acoustic nest
#

ah

#

didn't notice

#

could do

acoustic nest
#

out of curiosity

pure temple
#

i'm just making a suggestion

acoustic nest
#

@pure temple might it not confuse people as to why they can't see the message itself

pure temple
#

hmm maybe

#

what happens with jump to context when it is a flagged message?

acoustic nest
#

similar behavior

#

i.e.

#

actually sec lemme demo

pure temple
#

Kangaroo

acoustic nest
#

I copied the name from another part of the code where they also jumped dogecheemssmile

pure temple
#

lmao

#

discord classname mappings when

acoustic nest
#

wdym

worldly adder
#

to un-minify it

#

so we can actually read the code kittyhehe

#

there was a community project for Minecraft that collected observations from modders to generate reasonable classnames once they figured out what a given function did

#

until mojang finally hired enough people out of the modding community that they finally just released the official mappings under a license 😛

#

specifically Searge, who's now also active in stable diffusion development

worldly adder
dull magnet
#

what's the point

#

the code is perfectly readable

#

everything is already named properly

frosty otter
dull magnet
frosty otter
#

classnames

dull magnet
#

not useful then

#

simply don't hardcode your css class names

swift delta
#

nvm sorry for the ping

jagged briar
grim hare
#

handle it in a similar way to how message logger does

#

that way when you do jump to the context the actual location of the message is obvious

swift delta
#

chat can you tell me the difference between the two minus the “ // --- TEST ----“ part

dull magnet
#

what is that question supposed to mean

#

also don't overuse important

swift delta
dull magnet
#

you can customise the style of the button via js

#

there are different button styles

swift delta
swift delta
dull magnet
#

did you read at all what i said

swift delta
#

yes, and it took me three days to do this because i tried, but that button is stupidly made and this was the only way to do it. As said i even had @trail talon help and they agreed

dull magnet
#

the button is not stupidly made

#

you can customise the style of the button via js

#

the button component takes style as property

trail talon
#

huh

#

whats happening

swift delta
swift delta
pulsar briar
#

who wants to help me make a plugin that stops crashing and memory leaks when screenshares occurr

#

i finally got an error to trace down whats causing it

swift delta
pulsar briar
#

i remember betterdiscord lagging and crashign constantly back in the days

flint bronze
#

horrors

grim hare
#

hey, so, thge usrbg plugin (rather, their server to request changes to your banner) has been having some issues for some time, and a lot of that is down to some issues that have been happening with imgur

#

I've been talking with the dev about some possible solutions and they're open to trying some different image hosts but the side effect is that we'd need to have cors modified for the plugin to work

#

I imagine it won't be an issue because decor has to do it too (iirc) but yes, i thought i would at least mention it

swift delta
grim hare
#

I know, yeah

#

they've been getting ratelimited by imgur incredibly hard - like, only being able to upload 5 images a day or their quota not refilling with no explaination

swift delta
#

seems like they need to stop using imgur set up with something else

grim hare
#

yes, that is the point of me posting about it here

#

CORS is the big issue though

#

imgur is allowed through discord's default csppolicy, other hosts are not

dull magnet
#

decor does not have any cors modifications

grim hare
#

bah yes I do

#

I always get them mixed up because I'm silly

dull magnet
#

csp modifications are not necessary. vencord already lets any images through

grim hare
#

alright neat

dull magnet
#

why dont they just selfhost the images?

#

you can put cloudflare inbetween with aggressive caching of images to limit bandwidth usage

grim hare
#

I'm helping them set up with selfhosted images though, yes

#

just need to deal with csp issues elsewhere

dull magnet
#

easy way to save 99.9% bandwidth with no complications

grim hare
#

I know, yeah, that was the plan

dull magnet
#

thats how vencord badges work

#

if you limit banner size to something reasonable like 2mb (should do that anyway so it doesnt take 3 years to load), you can store thousands of banners with only a few gb of disk use

grim hare
#

I already have the infra side set up, it's mostly me just figuring out the logistics and pain of updates for the css and js plugins at this point (then they need to update their bot to use the infa i have)

dull magnet
#

cool

dull magnet
#

they dont use it anywhere

grim hare
#

so they can save bandwidth on imgur embeds probably

#

they don't use it themselves but lots of other things upload to imgur directly and give users links

#

screenshot tools in particular

dull magnet
#

i dont think thats true?

#

yeah it still proxies

flint bronze
#

reddit watermark husk

dull magnet
#

yep proxied

grim hare
#

weird

dull magnet
#

i know because i am ipbanned from imgur

#

but they display fine in discord

flint bronze
grim hare
#

on desktop they don't proxy

#

wait

#

smg discord

dull magnet
#

i use a selfhosted vpn

grim hare
#

I read the href not the src

flint bronze
dull magnet
#

to counter abuse?

#

wikipedia also has the ip banned

flint bronze
#

wikipedia makes more sense tbh

#

is imgur just worried some bot will spam loads of random shit onto there

dull magnet
flint bronze
#

or scraping

grim hare
#

anyways yes thanks for the answers vee even if I am mildly smoothbrained in terms of remembering acronyms and stuff

dull magnet
#

:p

flint bronze
#

hold on

#

how much stuff is hotlinked in vencord anyway

#

regardless of site

dull magnet
#

how do u generate these?

#

do they ever expire?

#

if they dont expire it could be an easy csp bypass

flint bronze
#

idk

#

sending a message?

#

and having it embed

dull magnet
#

why answer if u have no clue

flint bronze
#

i do have clue i'm just not confident

#

hang on

#

i just realised something

grim hare
dull magnet
#

yeah sadly

grim hare
#

would be neat though

dull magnet
#

yeah dont think any of these can be abused

#

upload banners as yt thumbnails 🔥

grim hare
#

flawless

#

yeah I looked through the list of them as well before going through the effort to get things set up

dull magnet
#

actually maybe twitter could be

#

but twitter is gonna spontanoeusly combust

grim hare
#

also insanely limited

#

only 50 requests per day on their free tier

#

1500/mo

rare glade
#

Heyo, I'm trying to make a plugin for which I want to add a button, so I decided to take inspiration from the gameActivityToggle plugin, where the button code looks like this:

const Button = findComponentByCodeLazy("Button.Sizes.NONE,disabled:");
[...]
return (
        <Button
            tooltipText={showCurrentGame ? "Disable Game Activity" : "Enable Game Activity"}
            icon={makeIcon(showCurrentGame)}
            role="switch"
            aria-checked={!showCurrentGame}
            onClick={() => StatusSettingsStores.ShowCurrentGame.updateSetting(old => !old)}
        />
    );

So I tried to copy that into my code, but for some reason the <Button /> tag tries to import things instead of using the const. So how can I make the Buitton tag use the const?

frosty otter
#

remove the import

rare glade
#

i dont have any

frosty otter
#

you said it's using the import?

rare glade
#
import { Settings } from "@api/Settings";
import { disableStyle, enableStyle } from "@api/Styles";
import definePlugin from "@utils/types";
import { findComponentByCodeLazy } from "@webpack";```
rare glade
frosty otter
#

then don't import it

rare glade
#

yea I'm not importing it, and getting this error:
'Button' refers to a value, but is being used as a type here. Did you mean 'typeof Button'?

frosty otter
#

Is this warning form your code editor or from the build logs? @rare glade

rare glade
#

it's an eslint error

#

so in the editor

#

this is in the build logs:

X [ERROR] Expected ">" but found "tooltipText"
@frosty otter

acoustic nest
#

I'm building a plugin that sorts your guild list based off of how often you visit the servers

#

Gauging opinions on the concept

#

so shoot

#

it does get rid of folders entirely doe

#

maybe I could sort within folders instead

#

idk

vast karma
#

I just sort them that way manually

gloomy terrace
#

^

acoustic coyote
#

true

#

i have folders 1 to 4 where numbers mean importance

#

and then you just move the servers around as you feel

rare glade
#

ok so I rechecked everything a kazillion times but I still don't see why it refuses to use the const??

const Button = findComponentByCodeLazy("Button.Sizes.NONE,disabled:");

function RPCToggleButton(): JSX.Element {
    return (
        <Button
            tooltipText = "pls work";
        />
    );
}

Button' refers to a value, but is being used as a type here. Did you mean 'typeof Button'?
I'm so confused?? it's literally the same layout as in gameActivityToggle but it doesn't work

#

hm strange, even when i copy the whole gameactivitytoggle code into my script the button doesn't work

#

I wonder if it'll work when I make it in the plugin folder

#

still the error hm

#

this makes 0 sense to me

vast karma
#

Weird error message, but try removing the semicolon maybe?

rare glade
vast karma
#

Is it on the <Button it's complaining?

rare glade
#

yea

vast karma
#

Is the file named .tsx? That syntax isn't supported in .ts

rare glade
#

wait really-

#

if this was the issue the whole time I'm goingto drown in a lake

vast karma
#

So perhaps it's interpreting it as a generic parameter to dog-knows-what

rare glade
#

this workked 😭

#

this is so embarrassing, I should've known that as a web dev lmao

#

thanks a lot o7

steady knot
quaint cipher
#

what'd you need help with

steady knot
#

is it really good enough to PR, because I literally have no idea what I'm doing lol

#

also I'd really like to add some customization to the relative timestamps like in the documentation I linked but I have no idea how to put that in

#

or actually maybe it's not that important

rare glade
#

wheere can I check discord's color css variables?

steady knot
rare glade
#

for which class do I need to change the min width so the settings cog is back?

gloomy terrace
#

idr if it's container_ca50b9

rare glade
rare glade
gloomy terrace
cedar olive
#

would the text to reaction plugin from powercord be allowed in vencord?

dull magnet
#
  • vencord users are definitely gonna abuse that for spam bleh
#

not a good idea imo

cedar olive
#

maybe I will just make it for personal use

dull magnet
#

whenever i make plugins i think about the consequences

#

insane whitenames will flood messages with reactions and maybe even slurs

cedar olive
#

yeah that's why I asked if it was allowed

dull magnet
#

the world if you didn't have to consider retarded kids in every step

cedar olive
#

lmao

rare glade
#

XDDD

warped nacelle
#

I want to make a modification to the friendsSince plugin (just adding an icon to the popout), however there are 2 versions of the popout, where one has the icons and one should not. I have the icon working but it shows on both popups. How can I add the icon only if viewing from the server member popout, and not the DM popout? All I am doing is adding an extra element to the popout.

dull magnet
vast karma
#

Do plugins that use external unpkg dependencies need .desktop or a similar suffix?

cedar olive
#

uhn no

cedar olive
#

oh they do? I was thinking of fake nitro which doesnt have a suffix

dull magnet
#

webstore wont allow cdn usage

#

and wont work on userscript anyway

#

if u want the plugin to work on web u need to bundle with extension

#

like the moanco editor is bundled toferger with ext

cedar olive
#

oh right

vast karma
#

How do decor and reviewdb get around csp?

dull magnet
vast karma
#

Doesn't that make them kinda not work at all?

steady knot
#

a lot of things don't work on the userscript

#

no themes/quickcss, no oneko

flint bronze
#

Would a plugin to change this to the current remaining duration be suited best as an option inside of the existing ShowTimeouts plugin?

elfin geyser
#

oh cool, i have access here now.. again

flint bronze
#

it FINALLY works tho

vast karma
#

Why not just do $self.useTimeout(arguments[0].message, this)?

flint bronze
#

I originally had something like that set up

#

I wanna clean up the actual output first

elfin geyser
#

i made a bad desision using message patches for channel and guild things

flint bronze
#

well i made a thing

elfin geyser
#

7 days?

#

what did you make?

#

i just started panicing after i noticed a memory leak to find out its literal kilobytes an hour

flint bronze
elfin geyser
#

i spent several hours making a fancy a show up in the chat

#

yeah im not the best with react

elfin geyser
#

honestly, im not sure how you all can do the patches in here, im slowly going insane trying to understand and find them

pulsar briar
iron epoch
amber mantle
#

i dont lol

noble rose
#

by the way, do i need to do something about this or do I just wait till someone sees it?
Cause I see every other PR as green and am confused.

chrome elbow
noble rose
stone crag
#

yo guys i was working on this https://github.com/Vendicated/Vencord/issues/1512 but it's a bit messy to bundle the opus-recorder library into the userscript
like rn i'm turning the entire library js file into a blob and slapping it as a global var
should i still try to make the userscript support the new library
bc i saw someone made a latex plugin and they said they won't support userscript bc it uses an externa llibrary

GitHub

Like the title says, the recording is webm, not ogg. This causes voice messages to be unplayable on ios. Unfortunately, chrome does not support ogg, so we will likely have to use a library like htt...

orchid shard
#

currently trying to change #1032200195582197831 message to use the apple sounds (say what you will but apple's sound design kinda hot ngl)
now im trying to just play a sound when the user sends a message, which i tried to with just the enter key but that doesnt seem to come through
how can i listen for the message send event and then play a sound?

const keydown = (e: KeyboardEvent) => {
    for (const sound of Object.values(sounds)) sound.pause();
    
    if (e.ctrlKey && e.code === "Backspace") {
        sounds.massdelete.currentTime = 0;
        sounds.massdelete.play();
    } else if (e.code === "Enter" && !e.shiftKey) {
        sounds.send.currentTime = 0;
        sounds.send.play();
    } else if (e.code === "Backspace") {
        sounds.backspace.currentTime = 0;
        sounds.backspace.play();
    } else if (e.code === "Space") {
        sounds.space.currentTime = 0;
        sounds.space.play();
    } else {
        if (ignoredKeys.includes(e.code)) return;
        const click = sounds[`click${Math.floor(Math.random() * 3) + 1}`];
        click.currentTime = 0;
        click.play();
    }
};
frosty otter
#

but this will waybe lag

orchid shard
#

I just added a PreSendListener and play the sound, works!

frosty otter
#

I think the button component has an hover style prop

balmy sky
#

Would it be a good idea to make a plugin that adds permanent classes to elements, so themes don't get effected when discord changes them?

dull magnet
#

no

#

just use attribute selectors

vast karma
#

It's kinda eh

balmy sky
balmy sky
#

How would i go about getting the file path of the client? (on a dev build)

dull magnet
#

to do what?

#

why do you need file path

#

seems big xy problem

balmy sky
#

I want to make a button in the plugins menu to open the userplugin folder

balmy sky
vast karma
#

Isn't there a setting for vencord build dir to use

#

Grab that I guess

amber mantle
#

seems ultra laziness but i am a hypocrite

#

just (cwd)/src/userplugins would probably work lmao idk

gloomy terrace
#

(asking because I don't have a dev build)

vast karma
#

No, userplugins are part of the source code

gloomy terrace
#

Nevermind then approvestare

dull magnet
#

@orchid cairn why do you need to pass flags to the cli, like what's your goal?

orchid cairn
#

for quick building & injecting cus my ass is lazy

#

when i checked the installer source i see it very much supports cli flags

dull magnet
#

download the cli manually

run ./cli -install -branch stable

#

you can pass environment variables to customise where it takes vencord files from (default is to download them from github), see runInstaller.mjs or whatever it is called for those env vars

orchid cairn
#

alright

orchid cairn
#

or is that no longer a requirement

dull magnet
#

it's not no

#

i doubt it ever has been

orchid cairn
#

oh damn nice

dull magnet
#

it's optional, same as in posix

warm sigil
#

is there any full plugin docs or do i just ask in here?

amber mantle
#

not sure if docs have evolved since i last read them

warm sigil
#

thanks

steady knot
warm sigil
#

yeah thats a bit more in depth, ty

#

just lookin at the vscode extension

#

is there a function to start the companion plugin in app?

#

its not on the plugin list for me

steady knot
#

when you do pnpm build --watch you have it

warm sigil
#

is there anything special i have to do for it running under linux?

steady knot
#

not that I know of

#

but if you use vesktop, instead of injecting you change the vencord location in vesktop settings to the dist directory of the build

warm sigil
#

yeah i was lookin at using that, ill have a look

#

thanks for the help

leaden fable
#

@cedar olive

cedar olive
#

nah I didn't just ripoff

#

I took inspiration

#

and I did a lot of research before choosing where to patch

leaden fable
cedar olive
#

I don't choose a place to find before actually knowing how the thing is used

leaden fable
#

Could've approved my pull request and made the changes but you decided to attribute it to yourself

cedar olive
#

so yes I did a lot of research before choosing if I should patch there

#

and no I don't want the credits to me

#

just because I made the commit doesn't mean it

#

and my patch isn't even like yours, I actually made it work for everything there and not target wrong stuff

leaden fable
#

SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE

cedar olive
#

"doesn't work"

#

do you even know what those are for

#

your patch was literally a replacement for e.available buddy

#

"let me just replace every e.available in that code without even making sure it's the right thing"

leaden fable
#

Which is the only thing required and unique

cedar olive
#

literally is

#

it's like targeting an object with a key called name and expect no other code to include it in the future

leaden fable
#

"I did a lot of work" bro really just searched for my match string, adding a couple of unnecessary strings to it and said it took a lot of research

leaden fable
cedar olive
#

yeah yeah you can think I only did that

leaden fable
#

Anyways it doesn't matter

cedar olive
#

you can't know what I did before that

#

and I can't prove to you so it doesn't matter what I say

#

in fact your patch had a hardcoded e which didn't even target one of the places it should patch cuz the variable was called t

leaden fable
#

As I said you wanted to attribute it to yourself else you would've approved the PR or just requested some changes or made them yourself

cedar olive
leaden fable
leaden fable
#

Could've requested the changes or made them yourself. It's not exclusively either approve it immediately or make your own "inspired" patch

#

Kinda rude af having the PR closed immediately without even understanding it's content then having someone else make the same feature under their name

#

I hope you see where this is coming from

cedar olive
#

okay I could have granted you the commit

#

my mistake on that

dull magnet
#

no way you're this pressed about a 4 line change 😭

#

what would nuckyz even gain from "attributing" it to himself

iron epoch
#

seems like i am unable to do this plugin without modifying the api itself, as the plugin is interfering with the api

#

so is there work arounds?

#

wait I think I got idea :thonk:

iron epoch
#
{
    find: 'location:"ChannelTextAreaButtons"',
    replacement: {
        match: /(children:)(\i)\}/,
        replace: "$1$self.test($2)}"
    }
}

location:"ChannelTextAreaButtons" is not something?

cedar olive
#

not anymore

#

look at the find of the chat bar api

iron epoch
#

darn it

worthy frost
#

how would i get all the channels in a guild? i can only see methods for getting specific channel ids
(and get all members in a guild, if thats even possible, because GuildMemberStore.getMemberIds returns a limited list)

dull magnet
#

try figuring the first one out yourself

#

look at guildstore and channelstore

#

the latter is not possible

iron epoch
flint bronze
#

yes

clear parcel
flint bronze
#

I'm trying to webpack find class names (to do horrible things) ||Horribly patch over Discord's CSS at runtime, no I cant use [class^=] as there would be conflicts||

Does anyone have any idea why I cant find this specific module?

vast karma
#

Hasn't been loaded yet I guess

dull magnet
#

find* only searches cached aka already loaded modules

flint bronze
#

let me guess

dull magnet
#

if you need more control you can use findModuleId or manually traverse wreq.m

flint bronze
#

Vencord is loaded after the loading screen

dull magnet
#

no?

flint bronze
#

then why tf isnt that loaded

#

I really am doing cursed thing and recieving even more cursed behaviour

#

Ah.

#

What the hell is going on here?

dull magnet
flint bronze
#

Does discord even load this?

#

Is this relevant?

#

huuuuuuuuuh???

#

wtf?

#

its still used in the css

#

so

#

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

#

@dull magnet stupid question but

does discord never clean out their CSS, like ever

#

OHHHHHHHHH

#

I KNOW WHAT THIS IS

dull magnet
#

what

#

you're making no sense

#

the module was simply not imported yet

#

which means they're either not used, or, more likely, the component that uses them has simply not been loaded yet, for example because you need to open some menu or popout to see it

vast karma
#

Sounds like those classes are for the login screen

#

If you don't view the login screen, maybe because you already have a login token, it's not loaded

vale spear
#

i'll work on fixing moreusertags in my own pr because it's my job to fix my own patches

#

what the actual heck a new update changed shit AS I WAS FIXING IT

#

time to start using canary so i can have it fixed before it hits

vale spear
#

i'm proud of myself

#

Sorry for the ping

#

Maybe once I finish all the work of making this PR work with the Discord update you can just merge it and not have to update it yourself (when Discord updates, of course. I'll keep the Canary version of the code in a separate file for when the day comes)

#

Because fixing it for canary breaks it for stable

dull magnet
#

they reverted canary too now

vale spear
#

Welp all that work for nothing

#

It was fun though

vale spear
dull magnet
#

just commit it to some branch

vale spear
#

Got it

#

Refreshing discord and having everything work perfectly is a refreshing feeling

#

oh no

#

unintentional pun i'm so sorry

iron epoch
#

is there a way to get the stickerstore?

iron epoch
#

should I give credit to MessagePreview dev for the eye icon? prograss

iron epoch
#

uh, the icon is from discord themselves

vast karma
#

Discord deserves no credit

iron epoch
swift delta
#

@vast karma Where did i get this plugin and why do i have it, i dont remember downloading it

#

(sorry for the double ping took a better photo of it)

north flame
#

w

balmy sky
#

Is there a way to add the streaming status to the status picker?

#

Not really sure why, i just randomly thought of it

signal goblet
#

Wait that's what you asked

balmy sky
#

Lmao yeah

signal goblet
#

Probably then

signal goblet
#

I would think it's possible to just spoof it and add it

#

Seems simple enough

#

Real question is how easy is it lol

amber mantle
#

you cna just use a rpc for that

#

streaming requires a link anyways

balmy sky
#

So is it impossible to have the streaming status color without actually having a streaming rpc?

noble rose
#

I have another question.
Do I need to update the branch every time or will it sort itself out in merging?

chrome elbow
#

latter

fervent stirrup
#

Is there a plugin for changing Servers and other people's avatars only on my end?

gloomy terrace
#

Css?

fervent stirrup
#

It could be easy and fast

#

like when giving a nickname to a friend

#

also "server nicknames" could be nice 😄

flint bronze
#

why tho

iron epoch
iron epoch
#

hello, how do I match until I reach a suffix of something?
my current match /let (\i)([\i\)\}\)\];]?)/

#

I want to end the matching until i reach t)})];?

#

nvm, I finally understood ^

vast karma
#

.*?

iron epoch
iron epoch
tropic ice
#

wtf is that

#

that makes no sense

iron epoch
tropic ice
#

is \i even a thing

#

what were you trying to do

vast karma
#

\i is a vencord exclusive thing

tropic ice
#

oh

#

what does it do

jagged briar
#

variable names

ionic breach
#

after like

#

a bajillion years

#

i actually did the thing

#

trying to add rolecoloreverywhere to the bottom left corner of discord was 80% of the reason i joined this server

ionic breach
ionic breach
#

how would someone normally target this module? I was trying to do a proof of concept so i used s()(r.title, n), but obviously that's not future-proof. But I'm not sure what about this function is unique enough to be targeted, can we use regex in a find?

function(e, t, n) {
    "use strict";
    n.r(t),
    n.d(t, {
        default: function() {
            return o
        }
    });
    var l = n("735250");
    n("470079");
    var a = n("803997")
      , s = n.n(a)
      , i = n("481060")
      , r = n("172626");
    function o(e) {
        let {children: t, className: n} = e;
        return (0,
        l.jsx)(i.Text, {
            color: "roleColor",
            className: s()(r.title, n),
            variant: "text-sm/medium",
            children: t
        })
    }
}
jagged briar
#

that's a rough module to patch

ionic breach
#

i feel like im doing x/y

#

there's definitely a better way

ionic breach
#

okay so function o is called by a different function in a different module which uses o's properties here like: color and puts it through this switchmap

void 0 !== E)
           switch (E) {
           case "none":
               t = void 0;
               break;
           case "always-white":
               t = "white";
               break;
           case "roleColor":
               t = Vencord.Plugins.plugins["RoleColorEverywhere"].getGuildChannelId();
               break;
           default:
               var A;
               t = null === (A = l.default.colors[_[E]]) || void 0 === A ? void 0 : A.css
           }

i can't just edit this module tho because then it'll change all the colors that use it to the roleColor. so do i have to target the one above?

flint bronze
#

I have a feeling this isnt supposed to look like that

vast karma
#

Perhaps because with css there is no way to get the role color

dull magnet
#

xy problem

ionic breach
# dull magnet xy problem

I acknowledged that above, but there's no other module that gets called for the rendering of this text component

#

It's just the two i discussed

#

I can't pick another one without no longer influencing the right piece of text

dull magnet
#

what are you trying to do

vernal grove
#

Hello, ive been trying to display a message in a modal but ive ran into a problem. Ive got the react component of message with const FindMessage = findComponentByCodeLazy("InlineEmbedMedia.useSetting()", "RenderEmbeds.useSetting()", ".useContextMenuMessage", ".MessageTypes.THREAD_STARTER_MESSAGE"); and i passed in the required field (image). But the problem is, this doesnt show the author's name and pfp if the message doesnt have a reply

#

it works if the message is a reply msg

#

if its not a reply msg, it doesnt show the author's name and pfp

ionic breach
#

It colors the bottom left modal name with your role color

#

But there seems to be only two functions that control this piece of text

flint bronze
#

got bored

#

found out there's loads of guild discovery categories

ionic breach
#

Huh

#

I didn't know this either

vernal grove
iron epoch
swift delta
flint bronze
swift delta
vast karma
ionic breach
#

o and c are the two components that seem to make up the lower left hand modal

#

unless im missing others

#

hm

ionic breach
#

Oh yeah forgot about this I'm gonna look into P next time i have the energy

#

The parent of c and o

vast karma
#

Those names are meaningless

ionic breach
# vast karma Those names are meaningless

Well it's mostly me talking to myself. And I'm not on my computer so I can't highlight what I'm talking about but it's all in the screenshot I sent (still meaningless) but that's what I'm referring to

dull magnet
#

how do u even sync with computer

#

is that windows only

#

i dont have it

#

look at findStore("ThemeStore")

#

should have all you need

#

also what are you even trying to do like whats the bigger picture

dull magnet
dull magnet
fallen flint
#

oops wrong channel

#

sorries

jagged briar
#

they removed lootboxes but api still there

#

time to make my own lootbox plugin

flint bronze
#

nop

#

click the badge in someones profile to open it back up

jagged briar
#

lol

#

i didnt know it gave you a badge

flint bronze
#

only shows while the decoration is equipped

jagged briar
#

well they are prob gonna remove that eventually sooo

#

also i was gonna add more items

flint bronze
#

well

jagged briar
#

what if

#

hear me out

#

crafting

flint bronze
#

they will probably remove the whole thing

#

UserLootboxes

jagged briar
#

I would call it DiscordMMORPG

flint bronze
jagged briar
#

yes

#

no badges though

flint bronze
#

true

jagged briar
#

but like viewing other peoples profiles

#

and money

flint bronze
#

it would
1: people would farm them
2: makes vee bankrupt

jagged briar
#

ugh i actually have to make an api and database for this

flint bronze
#

maybe a badge for how many stupid lootboxes someone has opened would be a fun idea

#

oh

#

but also

#

botting

jagged briar
#

i'll rate limit it

#

luckily i should be able to host all of this for free with vercel and supabase

#

but if it gets enough traffic then i will have to do something about it

#

prob will make a different account on both cause i have stuff that i don't want to stop working

jagged briar
#

should i just make the whole thing a big modal

#

i dont want to put it in settings

#

also what should the money be

#

and what should the boxes be

gloomy terrace
jagged briar
#

yes

jagged briar
#

and that's where i leave off for today

oblique lark
#

you should have to do something in discord to get the free one

jagged briar
#

like what

viral roost
#

at that point might as well turn the ddr easter egg in the keybinds menu into a proper game

jagged briar
#

I hate that

#

It always jumpscare me

#

It’s so loud

stable trellis
#

stupid question: i'm trying to use preSendListener to check when you send a reply, but i'm having trouble figuring out how to get the message type from it (which i believe should be 19 for replies?). i originally thought it would be somewhere in MessageExtra but i dont see it there. is it there at all or am i just missing something

#

if it isnt there, what should i use instead

grim hare
#

you can use the extra.replyOptions instead, I believe that message type is only returned from the API and not something provided by the client

stable trellis
#

this is the plugin im tryin to make

balmy sky
#

How can i get the most frequently used custom emojis?

dull magnet
#

there's a frecency store

balmy sky
vast karma
#

Just grep displayName=

#

Or check discord devtools, it has a list

frosty otter
vast karma
#

Wait they're not permanent? Thought Vee said it was

frosty otter
#

they updated the support article yesterday

#

to be more clear

#

about that

balmy sky
vast karma
#

Discord devtools, not chrome devtools

dull magnet
#

decors are permanent

#

discord support confirmed it on twitter

balmy sky
dull magnet
#

the badge is going away after 8th, the decor isnt

frosty otter
#

[...] a limited-time avatar decoration [...]

vast karma
dull magnet
#

it's staying permanently

frosty otter
#

hmmmmmmm

dull magnet
#

the decor is staying

#

trust me

frosty otter
#

trust me

dull magnet
#

"badge that will be available until April 8, 2024 (10:00am PT) and a limited-time avatar decoration."

frosty otter
#

available

dull magnet
#

just trust me :p

vast karma
#

A risky prospect

#

But for something as inconsequential as this I'm willing to take the gamble

dull magnet
#

naaah this guy's a simp

balmy sky
vast karma
#

Next to vencord toolbox and all that

dull magnet
balmy sky
cedar olive
#

enable experiments plugin, is staff option on it and devtools in developer options in discord (next to experiments)

balmy sky
#

WOOO it works

#

Are the devools safe? or can i fuck things but because this does NOT seem like normal client behaviour

frosty otter
#

try it

#

it will override the avatar decoration data asset with an B64 encoded string of the image

balmy sky
#

I'm probably gonna not

#

I don't feel like risking being banned

frosty otter
#

this doesn't make any API request

#

just locally

#

trust me

balmy sky
#

I don't but i'm gonna fuck around and find out

frosty otter
#

thanks

frosty otter
#

nothin' happens

balmy sky
#

It did literally nothing

#

NEVERJMIND

#

It did indeed not do nothing

frosty otter
#

craze

balmy sky
jagged briar
#

Look at other plugins

#

That’s your best resource

vast karma
#

Check the module that defines it

#

Or findStore() it and check what methods it has

balmy sky
vast karma
#

For stores, the interesting stuff is in the prototype

balmy sky
cedar olive
#

I see

stable trellis
iron epoch
#

what are the benefits, of a patch replace being a lambda function?