#🧩-plugin-development

1 messages · Page 5 of 1

cedar olive
#

nvm yeah it doesn't

dull magnet
#
find: find a module by filter function that should return a trueish value for the found module
lazyWebpack: same as find but lazy

findByProps: finds a module by export names (export.foo)
findByCode: finds a single exported function by its code
findByDisplayName: dead, doesn't work

findBulk: takes an array of filters and finds all modules at once. This is considerably faster than regular find if you need to search many modules

findModuleId: Find the id of a module by its source code. You can ten import it via wreq(id) or extract it into its own file for easier reading with extract(id)

mapMangledModule: first find a module by source code (it can be anywhere in the module, doesn't have to be exported), then check each import against your mappings to rename them to a more usable thing
mapMangledModuleLazy: Same as mapMangldModule, but lazy

waitFor: Each time a module is added by discord, check it against your filter. Once found, calls your callback and removes your listener

find approaches search the module cache for matches, waitFor checks modules as they fly in. The big difference is that find won't find modules that haven't been loaded. Plugins and most other Vencord code are loaded wayyyy before anything from Discord has been loaded, so finds will not work on top level. You can only use find inside methods called later (plugin.start for example) or inside lazy blocks such as lazyWebpack, LazyComponent, etc...

lazy makes it so that searches aren't done immediately. Rather, they are done only once you interact with the found module in any way. For example:

const UserStore = lazyWebpack(filters.byProps("getUser")) // not yet executed

await sleep(2000) // still not executed
doOtherStuff()

UserStore.getUser() // now it searches

So basically, lazy is the recommended approach for working around the issue of being unable to search on the top level and also better for performance and startup speed because modules are only searched on demand.
waitFor is generally the most performant approach since it does no search and instead finds modules as they are loaded, but only use it for things that must be loaded, still use lazyWebpack for "optional" modules (aka only required for your plugin)

cedar olive
#

thoughts about a filter for checking the key name

#

or maybe if you just pass a string it does it

dull magnet
#

huh?

#

show an example

cedar olive
#
const RunningGamesStoreModule = mapMangledModuleLazy('.displayName="RunningGameStore"', {
    RunningGamesStore: filters.byProps("getRunningGames", "getGamesSeen"),
    /** Used to re-render the Registered Games tab to update how our button looks like */
    IgnoreActivities_reRenderGames: 'IgnoreActivities_reRenderGames'
});

IgnoreActivities_reRenderGames would match this

export {
  IgnoreActivities_reRenderGames: blablabla,
}
#

when I used this before it would work cuz lazyWebpack checks the filter on the mod.exports, and then on every prop

const RunningGameStoreModule = lazyWebpack(filters.byProps("IgnoreActivities_reRenderGames"));
dull magnet
#

that module only has a default export which is the RunningGameStore

#

isn't a simple findByProps sufficient

cedar olive
#

I'm exporting IgnoreActivities_reRenderGames

#

it's a function that's not exported by default

dull magnet
#

findByProps should be fine

cedar olive
#

eh I just wanted to use it with mapMangledModule

dull magnet
#
const RunningGameStoreModule = lazyWebpack(filters.byProps("IgnoreActivities_reRenderGames"));

RunningGameStoreModule.IgnoreActivities_reRenderGames()
RunningGameStoreModule.Z.getRunningGames
cedar olive
#

That's how I do it already

#

but I wanted to avoid using Z

dull magnet
#

if you wanted to use mapMangled you could just make the filter for reRenderGames m => typeof m === "function"

cedar olive
#

that won't work if any other plugin exports a function too

dull magnet
#

just use findByProps

green vessel
dull magnet
#

dw about using Z

dull magnet
green vessel
#

sweeet

#

also you should make a donation link

#

just sayin

cedar olive
#

what if you make mapMangledModule call each filter on mod which is the exports object

dull magnet
green vessel
#

then link it

#

😩

dull magnet
#

github sponsor

#

or Aliucord patreon!

simple folio
#

ven embezzling ac funds

dull magnet
#

yop

plucky ginkgo
#

@dull magnet am I missing something, shouldn't Vencord.Webpack.findAll(Vencord.Webpack.filters.byProps("voiceStates")); find voice channels since they have a property of voiceStates?

simple folio
dull magnet
#

you mean this?

#

@plucky ginkgo

#

those are react props

plucky ginkgo
#

I believe that's what I want yeah...

dull magnet
#

findByProps refers to import names

plucky ginkgo
#

Oooohhh

dull magnet
#

findByProps("foo") -> exports.foo

#

do you know how nodejs require works

plucky ginkgo
#

That explains what I was getting earlier

simple folio
#

ven loves colorstore

dull magnet
#

require("foo").bar

plucky ginkgo
#

Yeah

dull magnet
#

this gets the bar export from the foo module

green vessel
dull magnet
#

now imagine instead of names like "foo" you have numeric ids

#

require(17217).bar

cedar olive
#

this too

findByProps("foo") -> exports.something.foo

dull magnet
#

they just have require, but it uses ids instead of names

#

obviously you have no way of knowing the id, so you search the exports instead

green vessel
#

that's pretty much what i did

simple folio
#

childern

green vessel
#

patched the react call to call my own function too so i can steal the args

plucky ginkgo
dull magnet
#

this is webpack

simple folio
#

webpack is used in a lot of js projects

dull magnet
#

Vencord.Webpack.wreq = require: require function
Vencord.Webpack.wreq.c = require.cache: require cache has a cache of each module that has been imported. This is how findByProps works, it just checks every cache entry

plucky ginkgo
#

So is Webpack the bundling of required node modules into a package for the web then?

dull magnet
#

yes

#

webpack bundles all imports into web friendly code with its own webpack require implementation

plucky ginkgo
#

That clarifies a fair bit in my head, ty.

dull magnet
#

this is basically how find works

#

but now replace "react" with 17281

plucky ginkgo
#

mmmmm

#

so since I'm trying to hook into the vc channels, I'd want something more like... Vencord.Webpack.findAll(Vencord.Webpack.filters.byProps("pu"));

#

because that seems to be vc channels... I think

granite wharf
#

@dull magnet did you add delay to module importer
in the gh patches checker

granite wharf
#

150ms delay seems to do the trick

dull magnet
dull magnet
granite wharf
#

dpacker

dull magnet
#

uh

#

could have just asked me, I have already bleh bleh

granite wharf
#

you told me to ping megu instead bleh
this was like at the beginning of october

magic violet
#

the update wont gone

#

already on latest commit, Vencord A788813

#

but it keeps want to update

dull magnet
#

i will fix it at some point

magic violet
#

i thought it was only me

dull magnet
#

the issue is that there are new commits but no new build

#

cause the change i did didn't change any source files

#

fixed!

#

inb4 updater broken now

#

Testing updater changes is always so hard

#

because i gotta do some weird stuff to make my client think im outdated

magic violet
#

so to use vencord alongside armcord, just copy the inside of browser folder to armcord plugins right?

dull magnet
#

ye

dull magnet
#

like this

dull magnet
#

don't mind the -> at Vencord.js

#

that just links my Development folder build to armcord :P

fresh birch
#
> vencord@1.0.0 watch /home/dea/.local/share/Vencord
> node scripts/build/build.mjs --watch

[watch] build finished, watching for changes...
✘ [ERROR] Could not resolve "diff"

    src/components/PatchHelper.tsx:28:25:
      28 │     var differ = require("diff") as typeof import("diff");
         ╵                          ~~~~~~

  You can mark the path "diff" as external to exclude it from the bundle, which will remove this
  error. You can also surround this "require" call with a try/catch block to handle this failure at
  run-time instead of bundle-time.

1 error
[watch] build finished, watching for changes...
Build failed
Build failed with 1 error:
src/components/PatchHelper.tsx:28:25: ERROR: Could not resolve "diff"
[watch] build finished, watching for changes...
```is this normal when you run `pnpm watch`?
dull magnet
#

install dependencies!!

dull magnet
green vessel
#

may i know how or when does PRs get accepted? since i seen some plugins that haven't been accepted and been there for some time which kinda demotivated me towards this lol

green vessel
#

with whole respect to the respective person, this doesn't give me an answer I'd like a more sensible answer

#

if plugins are gonna be PRs then there must be some responsibility and consideration to the efforts poured into them since unlike other client mods which i could share the plugin link with my friends, keeping in mind that've and i'm still working on a big PR with multiple plugins and features but why would i waste my limited free time on a coin flip pr

grim hare
#

if you've not gotten feedback on a PR then you can pong ven or another maintainer to get someone to look at it - you'll notice that all of the currently open PRs have feedback from maintainers that the PR creators haven't taken action on

green vessel
#

not really all of them...

grim hare
#

I only found one that doesn't have feedback commented on it (technically two but I know there was discussion about the second one in this server between ven and the author)

granite wharf
granite wharf
#

it'll never get merged because too difficult to do everything simultaneously

#

you can't just expect to open a pr and leave it hanging expecting itll get merged keep bugging ven then it'll work trolley

green vessel
#

i don't see any guidelines or "rules"

granite wharf
#

common sense if you've done prs before
split up the functionality as much as possible

granite vault
#

Should be common sensetrolley

granite wharf
grim hare
#

it is generally common courtesy to one feature per pr, yeah

green vessel
#

how adding multiple features in a single pr a bad thing? i've contributed to multiple big projects in such a way and no one ever complained lol..

#

it's more of instead of reviewing 4\5 PRs

#

it will be one

#

have you seen unreal engine's PRs lol?

granite wharf
green vessel
#

for some cases it might be understandable, but those are just plugins bruh

granite wharf
#

have you seen some of the review chains on a plugin pr

green vessel
#

well i do get that

granite wharf
#

one went on for like a month

green vessel
#

but also that's another thing i dislike, because if the plugin works as i intend it to i shouldn't be told what to do

granite vault
granite wharf
#

nobody's saying you can't you'll just find it easier to merge them separately

grim hare
#

they're to make sure your code style is consistent with the rest of the project, as well as that what you wrote is robust and won't break when discord pushes an update

#

it's also incredibly useful to have multiple sets of eyes to go over code to make sure there's not any issues that didn't get caught

granite vault
green vessel
#

sorry if i'm being annoying, but here there was only a "suggestion" yet the plugin didn't get merged?

grim hare
#

the pr author said in the comment above that an "embed would be even cooler!"

#

if the author doesn't want to implement an embed in that pr they can say that, but they made it seem like they want there to be a pr there, so ven said how to get an embed

green vessel
#

14 days, still haven't been accepted, i still kinda don't like how this works tbf, but thanks for elaborating on the topic

granite vault
#

18 days* trolley

#

Blame ven for being doodoo

green vessel
grim hare
#

I don't have a direct answer for that one but I know that ven has seen the PR since there's been response to the PR author in this server

#

I don't know for sure if there's been other discussion about it in the server as well

granite vault
#

Make PR that allows loading plugins from folder trolley

grim hare
#

use the manual installation process

granite vault
#

Guhh

#

That doesn't solve the issue of distributing it without needing the person to install bunch of other shit trolley

green vessel
#

i don't wanna teach every single one of my friends how to build something they know nothing about

granite vault
#

^

grim hare
#

ven's been working on a way to have redistributable third party plugins

#

I don't know off the top of my head if there's anything on github for it yet but it's still wip

green vessel
#

hope that's gonna be done soon

potent fox
#

I dmed him at least 50-60 times to merge my pr

grim hare
#

there's additional context to that where ven made changes to your pr as well

dull magnet
#

no one's gonna bite your head off xD

#

you can just pr and it'll likely get some feedback then once addressed will be merged

opal fern
#

Vendy merge my blocked message pr

#

Crack rock

dull magnet
#

I mean i didn't merge that cause u urself said it was really bad

#

and smth along the lines of it won't work if you switch channel or whatever it was

opal fern
dull magnet
#

how so?

#

it just fetches 50 messages

opal fern
#

1 sec at school

dull magnet
#

all you'd have to do is filter that unless I'm missing something

green vessel
#

uh

#

so

#

i wanted something to make some sort of a "dynamic" patch

#

i wanna have different plugins push this here

#

in the commented line i tried to populate some array and use it from different plugins to add them in there

#

but that doesn't quite work since dependencies are fired before the plugin is able to push itself to the patched array, though that patch works fine even it does call the component function before the plugin itself is initialized but that's not a big of an issue imo

#

any idea?

#

@dull magnet pls help 😫

dull magnet
#

wha

#

make the patch call a method on ur plugin

#
replace: "foo bar ...Vencord.Plugins.plugins.ServerListAPI.buildItems(whateverParamsUNeed)"```
green vessel
#

wut

#

im not sure if u didn’t get what i mean or the opposite

#

ill re-explain jic, so i have two plugins that should patch same location so i figured i wanna do an api plugin for that patch but i can’t really find a good way to push stuff to the patcher from another plugins before it does the patch

dull magnet
#

exactly the way I just said

#

make ur patch call a method on your plugin

#

then your plugin builds the items later with enough time for plugins to add their stuff

#

see how the other api plugins work

green vessel
#

i checked but i don’t quite get how they do it sobby

#

aight ill check again when i can thx

dull magnet
#

like this

#

the patch just adds code that calls a method on the api

#

then that method can do whatever u want

green vessel
#

ughhhhhhhhhhhhh

#

i still don't get when this will be initalized

#

the place im patched is called once discord starts up and if i even add something to it how will it detect the change

#

it has to be added before it's patched

#

im so confused sobby

dull magnet
#

wha

#

you just insert code that calls ur method

#

and its only called once that part of code i scalled

green vessel
#

so something like this?

#

im so fucking confused dude tf

#

i mean even if i do what i sent, how can i make other plugins push to that init function before it's called

dull magnet
#

you have to return what you want from the function

green vessel
#

but lets say

#

i wanna make it

#

like

#
Init()
{
  return Elements;
}
#

and then from another plugin

#

somehow do

dull magnet
#

look how the apis do it

green vessel
#

Elements.push(...)

dull magnet
#

they have a method that's called by the patch that renders the elements and a method to add stuff for plugins

#

I think you're overthinking this xd

#

your method won't be called until way later

#

plugins have more than enough time to push things

green vessel
#

i tried it but it never got pushed before it's rendered

#

💀

dull magnet
#

then you're doing something wrong

green vessel
#

my brain is commiting suicide

fickle plinth
green vessel
#

i already figure it out

fickle plinth
#

Go back to easy and simple languages like C++

#

Oh

green vessel
green vessel
#

c++ is easier thant his shit

#

on god

#

thought i don't quite get how do you find those attrs

#

like Looks.LINK or the other one

fickle plinth
#

what

green vessel
#

i tried logging button but it just logs a function 💀

#

Button is any

#

so i don't really know what can be edited on it or not

fickle plinth
#

Are you talking about react

green vessel
#

but i wanna know that

#

do you get what i mean

#

yeah

dull magnet
#

everything is an object in js

green vessel
#

i know

fickle plinth
green vessel
#

but i wanna get the properties of that function not the function

dull magnet
green vessel
#

how

#

i did console.log(Button)

#

tf

fickle plinth
#

you have to use the brackets and dots

dull magnet
#

that just logs the function

#

you can either do func. and look at autocomplete or spread it into a new object { ...func }

green vessel
#

why the fuck would a function have properties bro

fickle plinth
#

It's JavaScript bro

#

Deal with it

dull magnet
#

why wouldn't it

green vessel
#

how am i supposed to logically have that as a possiblity

dull magnet
#

theyre likely classes

#
class Button {
  static Types = {}
}```
#

as to how youre supposed to think of it, its just about looking at Discords code

#

for how they use those components

#

funny classes transform

viral roost
#

i love javascript

fickle plinth
#

Such a beautiful language

#

People who think french is beautiful are absolutely insane

green vessel
#

nah that still doesn't fully answer my question dude

fickle plinth
#

JavaScript is miles ahead

green vessel
#

how do i get all the FIELDS on that thing

#

ong

#

how do you know there's a "look" property

#

ok listen here's what i wanna do

green vessel
#

there's the props of the button i create

#

this thing somewhere has the fill color

#

and i can't find any way to change that color

#

i can change the color on the svg icon

#

but there's no property for the color

#

which is confusing the fuck out of me

viral roost
#

style={{ color: "#ffffff" }} trolley
(i hope that is now how you are supposed to do it)

fickle plinth
#

fill should just be the css style innit

green vessel
#

i wanna add an option to change it's color though

#

i did try something like this but no luck

cinder wigeon
viral roost
#

anyway @dull magnet can you check #68 later

granite wharf
#

they're fundamentally different in es5 vs es6

cinder wigeon
#

well they didn't exist before es6 right
People just did fake classes by adding properties to functions

dull magnet
#

no

#

you can do classes even before es6

#

its just without the synthethic sugar

#

js is prototype based object oriented

#
function Foo() {}

// Instance member
Foo.prototype.bar = 42
// Static member
Foo.baz = 42

new Foo().bar // 42
Foo().bar // cannot read properties of undefined - reading "bar"
#

this is still a class, though not as pretty xd

cinder wigeon
grim hare
#

well it's not a fake class

#

the class {} syntax does the exact thing under the hood

#

they're essentially the same

dull magnet
#

classes don't exist in js

#

you're just dealing with functions that are also objects and they inherit properties via prototypes

cinder wigeon
#

yes and that's my entire point
anyways it doesn't matter

dull magnet
#

classes are fake, you can literally return different class from constructor or change the prototype trolley

cinder wigeon
#

aaaaaa I have to patch this

#

uh what would the best way to do that be

#

I could just go the easy way and just wrap the entire context menu component and manipulate it from js
that would probably be simplest

dull magnet
#

it depends

#

I had a similar situation and the way I did it was that I captured the variable name then used a back reference

#

like match js var (.{1,3})=foo.bar

#

then you can refer to the variable name via a backrefefencd

#

epic irregular expression!!!!

#

so if the code is var se=foo.bar.....&&se, something like

(?<=var (.{1,3})=foo.bar.+?children:)\[[^\]]+&&\1,+?\]
#

why husk

potent fox
#

regex

silver cave
#

regex epdxlodode

near aurora
#

ven the spotifycontrols are so good

#

thanks for doing the heavy lifting on it

#

because now i can have spotify playing in the bg, the electron app is killed, and i can control it through discord

#

one less electron app that needs to run/be handled by the gpu

#

so good

#

that song is a banger btw

#

"i'll stay sane to fake it, but i'm deadpilled" lol

#

moved this button here lol

#

looks pretty good

#

but the code is horror

#

they hardcode so much stuff into style i had to use !important for everything ffs

#

did this to save vertical space in the already long userpopouts

#

here it still looks fine

thorny vector
#

poggers

dense forge
#

hello good evening, where is the plugins folder that is already installed?

granite wharf
#

%appdata%/Vencord

granite vault
dense forge
granite wharf
#

oh

grim hare
#

if you used the installer there is no dedicated plugins folder, all the plugins are bundled into one file

granite vault
#

Yop

grim hare
#

all vencord plugins are installed by default though, you just go into settings and enable the ones you want

dense forge
granite vault
#

Noptrolley

grim hare
#

if you follow the manual installation instructions you will have a separate folder for plugins, yes, but you shouldn't do that unless you want to develop your own plugin

#

what are you trying to do that you need to access the plugins folder?

dense forge
granite vault
#

Clone the github repo trolley

grim hare
granite vault
#

Existing plugins are there

dense forge
#

Ok, thx!

dull magnet
dense forge
#

about lazyWebpack, what are the existing filters? and where can i find out about them?

plucky ginkgo
proud parrotBOT
# plucky ginkgo If I'm understanding correctly, these: https://github.com/Vendicated/Vencord/blo...

**webpack.ts: **Lines 39-55

export const filters = {
    byProps: (...props: string[]): FilterFn =>
        props.length === 1
            ? m => m[props[0]] !== void 0
            : m => props.every(p => m[p] !== void 0),

    byDisplayName: (deezNuts: string): FilterFn => m => m.default?.displayName === deezNuts,

    byCode: (...code: string[]): FilterFn => m => {
        if (typeof m !== "function") return false;
        const s = Function.prototype.toString.call(m);
        for (const c of code) {
            if (!s.includes(c)) return false;
        }
        return true;
    },
};
dull magnet
#

byDisplayName is kill

#

i should probably remove it

dense forge
grim hare
#

the byProps filter looks for any webpack modules that have the provided properties

#

you'll find those values yourself within discord's source usually, or someone will have already found some of the modules that are useful for common things

dense forge
grim hare
#

well

dull magnet
#

you find these things by reading discords code

#

think of the action u wanna do and search the sources (ctrl shift f) for key words related to it until you find something promising

dense forge
#

ok, thx!

dense forge
#

is the byProps of adding reaction in the message "addReaction"?

dull magnet
#

try it!

plucky ginkgo
#

@dull magnet does the find part of the patches use like filters.byCode or?

dull magnet
#

yes

plucky ginkgo
#

does it also use byProps or no?

dull magnet
#

it searches code anwhere in the file

#

no

plucky ginkgo
#

okay

dull magnet
#
  1. webpack.search does the same as patch find
  2. you can use PatchHelper to test patches
plucky ginkgo
#

Where's PatchHelper? Vencord.PatchHelper?

dull magnet
#

build devbuild

#

with pnpm watch

#

then it will be a settings category

plucky ginkgo
#

Got it okay, and stupid question can I pnpm watch from WSL or does that have to be on Windows?

#

I assume not, but prefer to work on WSL if possible so figured I'd ask

simple folio
#

it works in any command line

plucky ginkgo
#

Ah I'd probably just have to path it manually then, might do that later...

dense forge
#

it looks like adding reaction to message doesn't work anymore, sad

green vessel
green vessel
proud parrotBOT
errant pike
green vessel
#

update

errant pike
#

still same error

green vessel
#

how does one invite this bot

#

@vapid latch yo since i can't dm

#

i want that shti on my serve pls

opal fern
wraith carbon
#

uhm

#

Disabling -> Enabling a plugin with commands doesn't work

#

Because disabling plugin with commands doesn't un-register it

dull magnet
#

ye

wraith carbon
#

This is blocking the stopPlugin() function from running

#

and unregistering commands

wraith carbon
#

idfk

dull magnet
#

uhm

#

started should be set to true on any plugin that registered commands

#

I think it's something else causing it

wraith carbon
#

well it wasn't

dull magnet
#

🤔

#

then that's a bug

#

oh I see now

proud parrotBOT
# dull magnet https://github.com/Vendicated/Vencord/blob/main/src/plugins/index.ts#L99-L115

**index.ts: **Lines 99-115

export const startPlugin = traceFunction("startPlugin", function startPlugin(p: Plugin) {
    if (p.start) {
        logger.info("Starting plugin", p.name);
        if (p.started) {
            logger.warn(`${p.name} already started`);
            return false;
        }
        try {
            p.start();
            p.started = true;
        } catch (e) {
            logger.error(`Failed to start ${p.name}\n`, e);
            return false;
        }
    }

    if (p.commands?.length) {
dull magnet
#

if the plugin has commands but no start method then it won't be marked as started

#

see how it's marked only under plugin.start

wraith carbon
#

ah

#

yeah

#

ic

little relic
#

are any types allowed? thinking about PRing a userscript i made a few weeks ago but it uses a bunch of untyped react stuff

#

namely c.__reactFiber$.return.memoizedState.memoizedState[0] and scope.__reactFiber$.key

cinder wigeon
cinder wigeon
# little relic

There is a difference between patching discord and user scripts too

little relic
#

is that not what the start() function for?

cinder wigeon
#

So you shouldnt use that compiled react stuff and a mutation observer

#

You should probably use patches to replace a react element with your own

cinder wigeon
little relic
#

i'll be honest I have no idea how to do that kek idk the first thing about react

cinder wigeon
#

Most is meant to be done with patches

cinder wigeon
little relic
#

it's so painful kek

dull magnet
#

is that script supposed to let you allow to change permissions in bot authorisation modal?

little relic
#

yeah

dull magnet
#

you can probably do it way better with vencord then

#

without the cursed react fuckery

little relic
#

i'm sure you can kek i don't know the first thing about react but I can give it a shot this evening

cinder wigeon
#

I don't know anything about react either

#

You don't need to

dull magnet
#

it does help a lot

#

but not fully needed

elfin latch
#

@dull magnet does it have to be actually typescript

dull magnet
#

yes

#

there's like almost no difference though

#

if u need help with typescript just let me know

elfin latch
#

yea ik but some structure whatever

#

also context menus? uwu_bread

olive osprey
#

Steal others code check

elfin latch
#

i tried 😭

#

nobody has used context menu yet

granite wharf
green vessel
#

are you referring to discord’s context menus?

elfin latch
#

yes

#

i want to make translate button

granite wharf
#

look at the patch that disables the first section of menu for message logger

green vessel
#

or you can also do the same thing done in reverse image search

elfin latch
#

:o

#

i see

#

thank you very much

#

my eyes arent very good ig

green vessel
#

though i think reverse image search is not the best imo this should be moved to an api

#

so all plugins can append to that context menu

elfin latch
#

well i wish change when it is added

#

:]

green vessel
#

i also think adding it to the message accessories would be cool

elfin latch
#

what's that

green vessel
elfin latch
#

is there api?

green vessel
#

yup

elfin latch
#

oh im using that then

#

kekw

green vessel
elfin latch
#

this is like my 2nd plugin ok i am not very smart

#

and i dont know ts aa_grin

green vessel
#

it's okay i started ts two days ago XD

elfin latch
#

i have no idea how to use this

#

the patch would prob be easier

green vessel
#

just make the api a dependency in ur plugin

elfin latch
#

yea ik

green vessel
#

and then call addAccessories

#

well i think this is wrongly named actually

#

because to the things under a message

elfin latch
#

oh

#

lmao

#

so this is bot buttons

#

yea i dont wanna use that

green vessel
#

yeah this api adds to stuff under messages

elfin latch
#

guess i am back to the patch then

green vessel
#

it's missnamed

#

@dull magnet @vapid latch ^^

#

well

#

actually maybe not

#

yeah mb

#

the other thing is called message actions not message accessories

#

i'm making a message actions api then PeepoGlad

elfin latch
#

then why would i make this now

#

do i have to maintain my plugin

green vessel
#

one of my friends wants quick mention

#

and since there's no api for message actions

elfin latch
#

its uh

#

role article right

#

for text

green vessel
#

wut

elfin latch
#

nvm

#

how change text

green vessel
#

of what exactly

elfin latch
#

the message

#

i am translating text

green vessel
#

oh

#

uhhh hmm

#

lemme see

#

messagelogger has pretty much all patches you need for this

#

you can temporarly disable message logger and use those patches

elfin latch
#

so you cant have both at same time

green vessel
#

you can patch the same thing twice

elfin latch
#

but it breaks one?

green vessel
#

no, one of the patches won't work

elfin latch
#

yes

#

it breaks one

green vessel
#

ye

#

im not sure how to go about this tbh

elfin latch
#

i am relying on you

#

you got this

green vessel
#

for what

#

💀

elfin latch
#

the api

#

i'm not gonna break ML

green vessel
#

oh u wanna make a button in the actions?

elfin latch
#

sure

#

yes

green vessel
#

oh alright yeah i mean that's gonna take ages becuase ven accepts pr every two years

elfin latch
#

i wrote all the decoding stuff already

#

smh

#

time to delete it all

green vessel
#

what decode

elfin latch
#

decode function

#

for plugin

green vessel
#

decode what

elfin latch
#

this

#

💖💖✨🥺,,👉👈💖💖✨🥺,,,,👉👈💖💖✨🥺,,👉👈

green vessel
#

oh

elfin latch
green vessel
#

ye dw im making the api rn

#

i mean i can share the files with you when it's done so your plugin gets progress too ig

elfin latch
#

should i post the one without decode

#

i need contributor badge

#

or else i will explod

green vessel
#

i should've got it already if ven fucking accepts prs

elfin latch
#

its ok i will add you to my constants

green vessel
#

😂

elfin latch
#

you want donor badge too?

green vessel
#

too poor to have that 🥺

elfin latch
#

yea but i will change on my client

#

so you can be rich on my pc

green vessel
#

give all badges then

elfin latch
#

staff?

green vessel
#

fr

#

"vencord owner"

elfin latch
#

last time i submitted a pr was like

#

a year ago

green vessel
#

the repo was created in aug

#

💀

elfin latch
#

what repo

green vessel
#

vencord

elfin latch
#

there we go

green vessel
dull magnet
#

that's pretty cool

#

feel free to pr

#

I'm a bit confused though

proud parrotBOT
dull magnet
#

does ws here not stand for websocket?

#

what does it stand for

#

lastfm is odd m

green vessel
#

the proto is https

#

probably just a miss name

dull magnet
#

After googling a bit it doesn't seem like they have a websocket api

#

shame, ig polling is the only way

elfin latch
#

yeah

#

silly

dull magnet
#

does last.fm not give you the duration & position in the song?

#

i dont see that plugin using timestamps

elfin latch
#

lastfm is more about counting the songs you play instead of tracking how long you were listening

#

i'm pretty sure you can only get when they pause/play song and itll run till the song changes

slow charm
#

some songs have duration

#

like sometimes they add it to their database

#

if it's a popular song

#

but not every song

#

and it could be wrong v often

elfin latch
#

it is because it is based on user data

slow charm
#

it's based on user data as well as their own data on popular stuff

elfin latch
#

yeah

#

but again it is more for like

#

counting songs

#

but that is spotify only for the time being

slow charm
#

there are millions of websites that have the duration but that's irrelevant...

elfin latch
#

millions?

green vessel
#

and yeah the api is pretty silly

#

I'll try polishing some stuff on it later today and make a pr

wraith carbon
dull magnet
#

nah i didnt fix that

wraith carbon
#

hm

#

plugins with commands don't error when you disable -> enable

chrome folio
#

@dull magnet Discord is now a sponsor of you.

dull magnet
#

real

#

i love discord

#

thank u discord

chrome folio
#

I shouldn't try to cancel GitHub sponsors tough Paypal but rather through GitHub, else it breaks.

chrome folio
# dull magnet thank u discord

Hello,

Thank you for bringing this issue to our attention. We've initiated an investigation based on the information that you provided and we'll take appropriate action based on our findings. Please note that for privacy reasons, we're not able to share the specifics of the action taken, if any.

We truly appreciate your efforts in helping us to keep Discord a safe and friendly environment.

Sincerely,
Discord Trust & Safety

wraith carbon
#

🧐

opal fern
#

@green vessel bro how did you get the thumbnails to show????

#

That is impressive as all fuck

#

Unless you are registering each thumbnail and deleting after use...

green vessel
#

so it just works

opal fern
#

what the actual fuck

#

That is horrifying

#

But allows for so much cool shit

#

I assume thats there for spotify?

green vessel
#

I have no idea

#

maybe

opal fern
#

bruh 🪦

#

Whatever, I will probably make an icecast rpc

green vessel
#

its the same proxy embed images use

opal fern
#

gonna 100% use that trick/maybe ask you for help with it 👉👈

green vessel
#

feel free to

opal fern
#

Did your friend discover it in their original plugin or what

green vessel
#

they did but I had to go a little further to get it to work

#

since LOCAL_ACTIVITY_UPDATE already expects the asset id

opal fern
#

Right

#

Thats actually stupid

#

but so fucking cool

#

Vencord ecosystem > Betterdiscord ecosystem

green vessel
#

this plugin took me too long to make because I was trying to do it the same way it was originally

#

and then I stopped and tried again

#

I figured out what event to dispatch and now it works

opal fern
#

Right

dull magnet
#

i knew that but

#

can't we abuse that to proxy arbitrary images??

green vessel
#

probably

#

hmm

granite vault
#

can't see why not trolley

potent fox
#

oh god

dull magnet
potent fox
dull magnet
#

it told me to make goal 3 million euro bu i said no github!! i dont need that much!!

potent fox
#

@dull magnet PLEASE HELP ME

#

HOW DO I CREATE A POST

#

I DONT SEE ANY BUTTON

green vessel
#

you send a fax

potent fox
#

I unironically couldnt find a way to create a post

#

horrifying

#

after messing and changing variables of url

#

I finally found it

#

YAY

#

yop

#

gaming browser

#

opera gx

#

😎

#

how

#

horror now I have another challenge

#

change this username

#

it wants you to put a real name

#

and I cant find where to change the username

#

oh my god posting a question in oracle forums is hardest shit ever

#

first you need to figure out how to create a post

#

then you need to change the autogenerated username which you cant

granite vault
#

oracle moment trolley

#

my beloved

potent fox
#

ok I managed to change my username after few minutes of trying now I need to select this but all of these are disabled

#

only 2 of them are enabled

#

I wonder if I can just edit html and select it

#

horror

#

now time to hack into oracle servers and give myself permission

dull magnet
#

oracle my love

potent fox
#

@dull magnet PLEASE HELP ME

#

I AM GOING INSANE

#

holy shit

#

I discovered old oracle error page

#

HUSKK

dull magnet
#

nightmare

silver cave
#

@potent foxtimezonedb up

#

plugin NOW

potent fox
#

LOV

dull magnet
#

now fix reviewdb

regal rune
#

it also steals and logs data

#

surfeasy

#

sells user data for analytics

#

yeah??

#

i have a screenshot

#

ye

#

@graceful garden italian?

#

your about me

#

the creature

#

what's your pfp

oblique lark
#

baba is you skull my beloved

regal rune
#

wat

oblique lark
#

i meant to reply

regal rune
#

meow

#

17

#

wat

#

meow

dull magnet
#

let people use what they want MenheraSmile1

regal rune
#

but

#

what they use is malicious

dull magnet
#

do u smoke

#

drink alcohol

#

eat chocolate, fastfood or similar

#

(yes)

opal fern
#

KonkMachine

dull magnet
#

we humans love being self destructive

opal fern
#

Not really about humans love being self destructive

#

There is probably a lot more than "haha humans suicide bomb"

slow charm
#

it's really annoying when all u do is tell other people to use this and not use that

opal fern
slow charm
#

matrix is bloat use xmpp + jabber but ejabberd not prosody prosody is in lua lua is bad use rust

opal fern
cedar olive
#

🇧🇷 ?

opal fern
#

🇵🇹

cedar olive
#

yeah but some people say portuguese when they are brazillian

#

lol

opal fern
#

spain and portugal shake tips

cedar olive
#

😂

opal fern
#

my school actually is gonna go to portugal this summer

cedar olive
#

🗿

opal fern
#

but i dont wanan go

#

because i need the money to go to germany

#

@dull magnet im going to break into your home

elfin latch
#

when message quick actions API

#

need to finish plugin

elfin latch
#

@dull magnet when api

green vessel
#

never

lilac cipher
#

how do you style embed text

young aspen
#

i don't think you can style the description

young aspen
#

you can style field's value

chrome folio
#

why wouldn’t you be able to style the description? lol

green vessel
#

how does one add the tooltip to element

#

seems like everything i tired crashes 💀

dull magnet
#

see how other things use tooltips

green vessel
#

ofc i did

dull magnet
#

Also wrap your components in error boundaries so u don't get crashes

dull magnet
green vessel
dull magnet
#

now what's Icon

#

it's probably undefined

#

cause search failed

granite vault
dull magnet
#

and as I said wrap in erorr boundary to avoid crashes

#

like jsx return ( <ErrorBoundary noop> <Tooltip>.......</Tooltip> <ErrorBoundary> )

green vessel
#

i did

#

💀

granite vault
#

Insanity

green vessel
#

return <Icon... works perfectly fine

dull magnet
green vessel
#

but with tooltip it just doens't work

dull magnet
green vessel
#

lol

#

yeah i did message=

#

change it now

#

just wanted to see what will happen

dull magnet
#

message= makes it render the default erorr code block like in settings pages

#

noop makes it render nothing

#

you can also specify a custom fallback component

green vessel
#

i know

dull magnet
green vessel
#

it crashes if i remove onMouseEnter shit

#

so i assume im not supposed to remove that

#

but even with it, it doesn't crash but there's no tooltip

dull magnet
#

you need to actually use those functions btw

#

as in put those into the icon

green vessel
#

bruh

#

that might be why

#

i’d try that rn if my internet didn’t decide to die 💀

dull magnet
#

I mean technically I don't think that should be causing crashes

#

but MadoShrug_MM

green vessel
#

not crashing but not showing

dull magnet
#

Also again check the error it'll tell u what u need to know

green vessel
#

it must be cuz im not using on mouse enter

dull magnet
dull magnet
green vessel
#

okay so i need an opinion too in the meanwhile

#

so i added platform indicators on member list

#

and on dm list

#

adding them to the profile is extremely ugly and weird so i added them as the first badge

#

is this good enough

#

or

#

like right before the badges there’s ur platforms

#

it’s not an actual badge i just added it in the badges group so it looks in context

dull magnet
#

just do it like the other plugins do

elfin latch
#

do it after the discriminator

granite vault
#

how dare you discriminate me

green vessel
elfin latch
#

?

green vessel
#

so u shur this is bad

dull magnet
#

what happens if both desktop and web

#

but I would just do it like how the other plugins do it

green vessel
dull magnet
#

aka one of them in the pfp bottom right where dnd is

#

and the rest after the username

#

I think badges works too

#

but kinda odd lmao

green vessel
#

ig ill move it to after the discriminator and call it a day

#

but u finna accept typing indicator first 😩

dull magnet
#

oh yeah u made that

#

sorry I forgot

#

gonna have a look after I finished breakfast

green vessel
#

np tyt we gotta finish that then move on platform icons Okayge

opal fern
#

Ven eating breakfast at 1pm wtf

granite vault
#

You don't?trolley

slow charm
#

i just ate breakfast it's 3pm

potent fox
#

imo

green vessel
#

the other way looks absolutely horrible and randomly aligned

#

it's just dm list - server list and optionally in badges

dull magnet
#

btw are u also doing them in chat

green vessel
#

i'm thinking

#

but im not sure

#

this is the last thing

#

ig if people want it ill add it

fickle plinth
#

i can't tell

dull magnet
#

Aliucord

#

native

green vessel
#

kyiro praises native aliucord

#

he is a rn hater

#

🕵️

fickle plinth
#

ah, the font looks small it looks like rn

dull magnet
#

cause I use low font scale

fickle plinth
#

and the stuff like the chatbox could've been ported to rn idk

dull magnet
#

btw @cedar olive r u gonna pr ur changes to who reacted

green vessel
#

i wish there's a plugin for enimty to replace system emoji with twmojis

fickle plinth
#

Common iOS L

dull magnet
#

average ios L

green vessel
#

bro

regal rune
cedar olive
#

I still haven't fixed that other issue

green vessel
#

this is the first time i even remember this thing exists 💀

cedar olive
#

and today I'm gonna be busy all day

dull magnet
green vessel
#

LMAO

green vessel
#

HAHAHAHA

dull magnet
#

publicly shamed

green vessel
#

no way

#

naaah

fickle plinth
#

lmfao

green vessel
#

this actually brilliant

cedar olive
green vessel
#

opinions plsssssssss,
platform icons in the chat yes or no

#

the plugin is done but ill add that if someone wants it

dull magnet
#

the one with +0

#

or the one where it doesn't render users

dull magnet
#

it's very useful

cedar olive
green vessel
#

aight aight bet

#

i'll add toggles to all of them tho cuz i think it will be a mess if they're everywhere imo

cedar olive
#

or do you say the one that doesn't render users the black circle

granite vault
#

kindly commit self-homicide trolley

#

automod bypassed starehandshake

rapid verge
#

please initiate your self-destruction in a reasonable timespan

granite vault
#

yop

chrome folio
#

Does the last.fm presence even work lol.

dull magnet
#

ye

chrome folio
slow charm
green vessel
chrome folio
green vessel
#

uhh no idea then

wraith carbon
#

I'm dumb, how do I get the promise to resolve before continuing, is it even possible lost

dull magnet
#

await

opal fern
#

bruh????

wraith carbon
#

it's inside a synchronus function though

slow charm
#

make it async tonguecat

wraith carbon
#

I can't I think

dull magnet
#

use useAwaiter

#
const [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("existingPlugins").then(plugins => ...))```
wraith carbon
#

o

#

alright

tall kiln
#

who do i have to beg for pr to be merged 🚎

cinder wigeon
#

smh my head

dull magnet
#

what issues

cinder wigeon
#

(not found in marketplace)

#

openvsx moment

tall kiln
cinder wigeon
#

beg harder then
or better yet just ping multiple times in the same message
bonus points if its 3+ pings so it gets automodded and then you get ghost pings

granite vault
cinder wigeon
#

anyways time to figure out how to patch that mess of a context menu code

granite vault
#

hf

#

plenty of braindamage to come

cinder wigeon
#

wtf is this

#

thats different

granite vault
cinder wigeon
#

time to log that component and see how cancer it is

#

and then ill fix the force experiment enable because dum

dull magnet
#

openvsx so bad lmao

#

it has like nothing

cinder wigeon
#

openvsx is fine

#

not missing anything important that I need

dull magnet
#

really

#

for me theres plenty missing

#

i use this lmao

cinder wigeon
dull magnet
#

like the ones u just said

#

C# iirc

#

copilot

granite vault
#

U pay for copilot?trolley

dull magnet
#

free

#

github edu

granite vault
#

Lucky trolley

#

I'd pay for it but I doubt I'd use it that much to warrant the $100/year

cinder wigeon
#

And you can always install from file if needed

dull magnet
#

okay i fixed armcord csp

#

epix

chrome folio
slow charm
#

cope

chrome folio
#

also count is always too lower by 1, as the last bubble is not a user

dull magnet