#🧩-plugin-development

1 messages · Page 77 of 1

lone moat
#

Much appreciated

hushed loom
#

idk what affinity even is, but you might want to check out

#

vp implicit

shrewd tundraBOT
lone moat
#

Yeah, implicit is just "potential" friends based on affinity

#

The affinity scores are a hidden parameter that scores your relation to someone based on DMs / VC / other activities with them

#

Like the last time I checked my highest user wasn't even on my friends list, and had an affinity of 380

#

and accordingly, they're someone I knew very well

#

So discords little affinity approximations are decently accurate

#

It's a neat statistic to see

tired burrow
#

Who is smart at looking through some discord api code I’m starting to use it and neeed help with 1 thing

tired burrow
hushed loom
tired burrow
#

It’s not for help it’s about something regarding something in this server I can’t say in this chat

#

I don’t wanna make a false modmail if it’s not what I think it is

hushed loom
#

sure, idrc

rocky lynx
#

my silly plugin idea is coming along nicely. i fear for when i have to add the badges in the chat though

tropic ice
#

i don't like the agi acronym

#

because it could be for two things in the field of ai

#

artificial general intelligence and artificial generative intelligence

rocky lynx
#

i still need to come up with good questions for the test, the current ones are just a placeholder

tired burrow
vast karma
#

It can also stand for agility, like it has for decades

humble tulip
#

Maybe, the stock picker is annoying because if I insert the timestamp via the slate toolbar thing, it registers that it's now got the timestamp selected and shows the picker but it doesn't move the toolbar up to compensate for the new size

#

I need to look into it deeper to figure out how to either get that to rerender or just close and reopen

tropic ice
#

no music? :(

humble tulip
#

I got told off

#

long live the screamies

flint bronze
humble tulip
#

It may be, I just realised I only pass the children to my function and not the toolbar itself so I'll add that in and see what I can do with it

flint bronze
humble tulip
#

I've got everything I can from the function I patched, I might have to go one above and see if there's more I can pass in

#

I'm supposed to be working though so I'll look later

humble tulip
#

They have a state to determine if it should show the toolbar or not so I'm taking advantage of that and just passing 2 into the boolean so it rerenders lol

#

And yeah I guess the first context menu isn't needed after that

#

It'd be cool to be able to select any human readable time and it recognises it can be translated to a timestamp but I think that's a bit ambitious without adding in a lib to do it

gusty maple
humble tulip
#

We can do date to humanised, I don't know if we have the other way round

gusty maple
#

I'd be surprised if there wasn't anything

humble tulip
#

If we do then sick

gusty maple
#

Or just steal the code from some package lol

humble tulip
#

Could maybe make a custom markdown rule to highlight matches as you type

#

So you'd see like "I'll be there in 6 hours" and it'd be clickable to convert

#

But as usual I am slacking off work so that's a later job

#

Coincidentally in about 6 hours

gusty maple
#

Oh yeah @humble tulip some vendetta timestamp plugin has the human readable string to a timestamp so there might be something that converts that cou could steal

humble tulip
#

pepeHmm interesting

#

Also I'd maybe like to make the slate toolbar an api

#

Slate is kinda confusing to work with if you're unfamiliar so I think it'd need some convenience functions

flint bronze
#

I would use this

humble tulip
#

If I can do the markdown highlighting this'll be pretty sick

#

Probably will have to be part of SendTimestamps, I don't think it warrants its own plugin

lone moat
#

Hell yeah. Awesome

#

Wish there was a way to view em in the GUI again, user IDs arent optimal

#

but, better then nothing lol

flint bronze
#

The UI sucks btw

lone moat
#

Ive been trying to find that stupid goddamn UI for ages

#

lol

#

Also holy heck wtf is this lol

#

damn discord keeping freaky amounts of personal relation info in the V2 affinities

#

wild

#

lol

flint bronze
lone moat
#

Like... its weirder then the first one... the communication rank cooresponds to people I actively chat with or tend to prioritize

#

wacky that theyre just saving all this lol

flint bronze
#

Does anyone know what causes a FluxStore to save its state?

#

nvm FluxStore.persist()

hushed loom
violet burrow
#

RIP my plugin. I couldn't find a workaround to make voices filters working. The only thing I succeed to do here is saving models and bypassing the actual Discord checks to it.

According to documentation:
https://docs.discord.sex/resources/voice#get-voice-filters-catalog
Those models aren't necessarly voice cloning thingies, this is more clownfishing, and thats pissing me off, because the preview sounds they made are RVC generated... The only thing i can do for now is to wait for Discord to release it to everyone, and thus we could reverse those things, and MAYBE adapt our models to this technology.

Maybe this project is useless, and we have to give up, or maybe we have to make people install things like w-okoda...

I'm sorry for the false hope about this plugin, I don't know if its realizable anymore...

Discord Userdoccers

Voice resources are used to interact with voice in Discord. For more information on connecting to voice, see the Voice Connections topic . Voice State Object Used to represent a user's voice conn...

flint bronze
#

I would still enjoy seeing further work be done if and when Discord releases the feature

#

I am rendering multiple Discord chat channel components and whenever I open the expression picker, every expression picker is opening
How can I stop that?

#

I am using @bronze dove's SidebarChat as reference for what I am making

bronze dove
#

It does some funky business i didn't want to figure out to keep my sanity

flint bronze
#

Can I just make my own

#

Does the analyticstype matter?

bronze dove
#

Probably not

#

I dont use it trolley i cant read, thought it was some prop to the component

flint bronze
#

You would probably be disgusted to see what I've made with the code I've stolen from your plugin

bronze dove
#

It cant be that bad...?

flint bronze
#

I have 7 channels visible on my screen

bronze dove
#

HOROR

flint bronze
#

Also chatbox autofocus doesnt work

#

Do I have to implement this myself?

bronze dove
#

i guess

hushed loom
#

how would you make a store that persists

#

(i also need to useStateFromStores on it)

flint bronze
#

How do you subscribe to FluxStore changes

#

WITHOUT using useStateFromStores

humble tulip
#

addChangeListener?

flint bronze
#

Please excuse me

humble tulip
#

Relatable

flint bronze
flint bronze
#

@hushed loom do i patch popoutwindowstore

#

here is my problem

#

PopoutWindowStore listens to beforeunload and closes all popouts

#

But closing all popouts will emit changes

#

and those changes are detected by my plugin

#

and then my plugin thinks that the popouts have been closed for a normal reason, rather than Discord unloading

#

I need to NOT have that fire so that I can restore the popouts on next load

flint bronze
#

How

#

This isn't a Flux issue

#

This is a DOM event issue

#

I also have a race condition

#

@hushed loom I may or may not be abusing Flux internals to get around a race condition

hushed loom
flint bronze
#

Yop but I don't want to

#

@hushed loom I accidentally made the chatbox work just like vendroid

#

Absolutely broken

#

Selections are broken (hard to explain how)

#

The caret is always at the left

unreal ermine
# flint bronze I am rendering multiple Discord chat channel components and whenever I open the ...

maybe the generic assingment of the context. it seems a really complicated problem, since with react devtools i cant figure out how to find their unique or smth

// emoteCloner/index.tsx
    const menuItem = (() => {
        switch (favoriteableType) {
            case "emoji":
                const match = props.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${favoriteableId}>|https://cdn\\.discordapp\\.com/emojis/${favoriteableId}\\.`));
                const reaction = props.message.reactions.find(reaction => reaction.emoji.id === favoriteableId);
                if (!match && !reaction) return;
                const name = (match && match[1]) ?? reaction?.emoji.name ?? "FakeNitroEmoji";

                // right here, the only id is for the picked media  
                return buildMenuItem("Emoji", () => ({
                    id: favoriteableId,
                    name,
                    isAnimated: isGifUrl(itemHref ?? itemSrc)
                }));
            case "sticker":
                const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
                if (sticker?.format_type === 3 /* LOTTIE */) return;

                return buildMenuItem("Sticker", () => fetchSticker(favoriteableId));
        }
    })();
#

then it build on everyone with the classname of the component

humble tulip
#

emoteCleaner

unreal ermine
#

LMAO

#

fixed ty

rocky lynx
#

is there a discord component i can use for the checkbox? i may blind because i couldnt find it

humble tulip
#

You'll have to use a find for it (which you can also find in that conversation)

flint bronze
swift delta
#

I can check all of them, one except for the eight hour long on-call

humble tulip
#

I tick 2 and 4

#

My sleep schedule was already fucked before I knew what Discord was

humble tulip
#

I can see it parsing as I type but then it never calls the function for the component. They have a switch for the markdown node type that I added mine into but it doesn't call the function with my parsed data

#

I found that the function is called by the render function in a class component and I left it there because following the path through that sucks lol

rocky lynx
humble tulip
#

pepeHmm mine left aligns by default

rocky lynx
#

i fixed it, i was using it in a very cursed way

humble tulip
#

Yeah I was gonna ask if you were making the text a child element lol

flint bronze
#

Is it just for fun?

rocky lynx
flint bronze
humble tulip
#

You should send the results and calculate the score server side so people can't just send 9999999999999999999999 score lol

flint bronze
#

Make the score a string instead trolley

vast karma
#

On one hand, you shouldn't call it iq if it's not based on a real iq test

#

On the other hand it's a shitpost anyway so who cares

flint bronze
#

and do No Validation whatsoever

rocky lynx
flint bronze
#

Can I try the plugin

flint bronze
# rocky lynx

wdym the answers arent individually sent for bingo

#

Surely some of them are worse (8 hour call)

rocky lynx
#

hmm, true

#

currently the plugin is just the iq test in a mostly finished state, i just need to do all the questions

humble tulip
rocky lynx
#

i have been procrastinating doing the part where it add the iq to chat

humble tulip
#

That doesn't seem too hard besides spamming your server

rocky lynx
proud parrotBOT
flint bronze
#

There are more than 12 hours in a day

vast karma
#

Setting >12 hours ought to get you permabanned though

rocky lynx
#

oh, i thought you were going to point out the actual bug of the checkboxes not showing when they are checked

flint bronze
#

HOW

rocky lynx
#

idk 😭

#
<Checkbox
    checked={true}
    onChange={() => { }}
    style={{ width: 24, height: 24 }}
>
     Test
 </Checkbox>
flint bronze
#

can you make a test where it scans your computer for competitive shooter games being installed

#

nvm

#

just ask how much money did you spend on Genshin Impact in the past month forever

rocky lynx
humble tulip
#

It's not perfect by any means but here's my typing for Checkbox if it's any help

export type Checkbox = ComponentType<PropsWithChildren<{
    value: boolean;
    onChange(value: boolean): void;

    align?: string;
    disabled?: boolean;
    displayOnly?: boolean;
    readOnly?: boolean;
    reverse?: boolean;
    shape?: string;
    size?: number;
    type?: string;
}>> & {
    Aligns: Record<"CENTER" | "TOP", string>;
    Shapes: Record<"BOX" | "ROUND" | "SMALL_BOX", string>;
    Types: Record<"DEFAULT" | "INVERTED" | "GHOST" | "ROW", string>;
};```
rocky lynx
#

ah, i see

flint bronze
rocky lynx
#

i got what i was using before from the components code in webtools

flint bronze
#

Can you add "How long did you stay awake yesterday"

#

I will let you judge what is considered insane

humble tulip
rocky lynx
#

this plugin may or may not be directly inspired by this youtube video

flint bronze
humble tulip
#

Himself included

hushed loom
hushed loom
hushed loom
rocky lynx
hardy adder
#

I feel phantom Discord pings sob

#

wdym you feel them

swift delta
humble tulip
#

Every so often I'll be listening to a song and something far in the background hits a note just the right length and pitch that it sounds close to a discord ping under the music

humble tulip
#

Gotta make it editable and then have it pop out a menu to pick a proper timestamp format but it's something

#

Also need to make it so that you could type 18:30:56 and it would parse the :56 as well because once it parses the HH:mm, the :ss is considered separate

humble tulip
cedar olive
flint bronze
#

@quaint cipher

rocky lynx
#

i keep forgeting i have to completley restart discord every time i change native

rocky lynx
#

i dont really know how i can make this look better, i have no ideas

swift delta
humble tulip
unreal ermine
tight canyon
iron epoch
iron epoch
pure temple
humble tulip
#

Should probably make it so unreads first in forums doesn't override pinned posts lol

rocky lynx
#

wasn't there a plugin that added more tags in chat for user similar to what apps and clyde has? or am i just going insane

humble tulip
#

It got removed for being unstable

rocky lynx
#

ah, i see i was looking for it to see how it adds the tags

rocky lynx
tight canyon
wet wharf
#

hey

#

im having issues with pnpm

#

it installs fine but then when I pnpm install in the vencord directory it says

PS C:\Users\gta5r\Documents\Vencord> pnpm install --frozen-lockfile
 ERROR  Cannot proceed with the frozen installation. The current "patchedDependencies" configuration doesn't match the value found in the lockfile```
#
The system cannot find the path specified.
 ERROR  Failed to switch pnpm to v10.4.1. Looks like pnpm CLI is missing at "C:\Users\gta5r\AppData\Local\pnpm\.tools\@pnpm+win-x64\10.4.1\bin" or is incorrect```
humble tulip
#

Parsing a node is fine, easy, whatever. Maintaining what nodes are where and re-parsing them properly so you can extend them as more is typed makes me wanna die

wet wharf
#

alr thanks

flint bronze
#

i think you should make it select all the text when double clicked and activates the closest timestamp format with the stock picker though

#

hmm

humble tulip
#

Tbh I think it's more effort than it's worth to do that

flint bronze
#

Nopppp

#

You will make moving the cursor with single click work

humble tulip
#

As it stands the node isn't editable anyway

#

That's a whole other thing

flint bronze
humble tulip
#

We'll see

#

This has been a huge pain in the ass

flint bronze
#

What happens if you send a message without creating the timestamps

oak sundial
humble tulip
#

They just stay normal text

#

Like 12:45

rose fiber
flint bronze
oak sundial
#

Setting up pnpm is not something covered by this channel and isn't actually related to developing plugins

#

we don't use this channel as an alternative for online resources for stuff like pnpm

flint bronze
#

Where would you ask

#

guh

#

will the docs ever be good enough for this situation to not happen?

rose fiber
#

But isnt that error because of something silly with the lockfile?

#

not with installing pnpm

oak sundial
flint bronze
#

i'm probably going crazy

flint bronze
rose fiber
#

Build instructions should already point you in the right direction to avoid that error

humble tulip
flint bronze
#

Mind if I take a look at it?

wet wharf
#

how do yall get ideas 😭 everything i can think of has been made already

flint bronze
#

sometimes your ideas don't have to be good ones

wet wharf
#

wdym?

#

oh yea but even the simple ones

flint bronze
#

i made a terrible plugin earlier this week that adds viewing multiple channels side by side at the same time

#

(in a popout window, and it's very unreliable)

wet wharf
#

lmao

#

but yea im thinking of something that would add extra UI

#

but im probably gonna start off simple

humble tulip
flint bronze
#

?remindme 12pm.

fathom pivotBOT
#

Alright @flint bronze, in 10 hours, 15 minutes and 31 seconds: …

humble tulip
#

I've completely overhauled this several times even to get it to this point

#

I've also just commented out my debug logging but left it in lol

#

Also the order of the regex matches prioritises dd/mm/yyyy (correct) over mm/dd/yyyy (incorrect) so maybe swap those if you use that

#

At some point down the line I will migrate to natural language parsing and it can be locale dependent

humble tulip
tropic ice
#

did alwaysexpandroles break

flint bronze
#

idk

wet wharf
#

Im making a formatter, but its doing something weird

#

when it inserts the backticks it doesn't register them they're sorta ghost characters

#

is that a possible thing?

tropic ice
#

is it modifying the chatbox text?

wet wharf
#

yea

tropic ice
#

try using this dispatchEvent thing

el = document.querySelector('.element')
el.value = "example"
el.dispatchEvent(new Event("input", { bubbles: true, cancelable: true }));
wet wharf
#

alright

tropic ice
#

idk what the bubbles: true and cancelable: true are
they might not be needed

wet wharf
#

me neitehr ill just see

tropic ice
#

yeah seems to work without them

#

I was making a quick password inputter bookmarklet and it needed that event ||(which i may have gotten from chatgpt)||

wet wharf
#

lmao

tropic ice
wet wharf
#

yea its not working

#

not even getting any console errors which is annoying

tropic ice
#

what's your code?

wet wharf
#

sorry im testing in dms

tropic ice
#

?

wet wharf
#

testing the plugin in dms cuz i accidentaly send the message im typing lmao

#

what you wanna see?

tropic ice
#

like what code you're using to do it so i can test

wet wharf
#

uh my code?

#

you want me to send the code or sum?

tropic ice
#

yeah for the plugin
if you don't want to, that's fine

#

i probably won't be able to help

wet wharf
#

lmao

#

heres what its doing

tropic ice
#

wait i just remembered there's a method for modifing the textbox i think

wet wharf
#

oh bet

#

well yea

tropic ice
#

import { insertTextIntoChatInputBox } from "@utils/discord";

wet wharf
#

ima give that a try

#

cuz discord does it for they're formating

#

oh yep

#

were getting somehwere

tropic ice
#

huh

wet wharf
#

lmfao

#
const MessageActions = findByPropsLazy("sendMessage");
#

huh

#

ok this is weird

humble tulip
#

You're putting a space after js

wet wharf
#

oh i thought that didn't matter

#

😭

#

thats my bad i guess

#

ay it works

tropic ice
#

wait it does?

wet wharf
#
const MessageActions = findByPropsLazy("sendMessage");
tropic ice
wet wharf
tropic ice
#

the syntax highlighting in the textbox isn't working when i do the method in console

#

oh ok

#

it isn't working for you either

wet wharf
#

yea but if i send it works

#

so ima try and fix that

fathom pivotBOT
#

@flint bronze, <t:1740919469:R>: …

wet wharf
#

so i made a message shortener 💀

humble tulip
#

I did that once by making the message component collapsible if it's over a certain height but if you scroll up and loaded more messages it'd cause discord to infinitely fetch messages from the channel lol

wet wharf
#

yea im not gonna do it tbh

wet wharf
hardy adder
#

while (true)

rocky lynx
#

i need ideas for questions for a discord iq test. the test is to measure how brainrotted you are/ how much time you spend on discord.

flint bronze
flint bronze
tight canyon
hushed loom
#

Easy

rocky lynx
#

im getting close to being done with the plugin. i just need to finish the test and make the iq badges in chat

tight canyon
# tight canyon Log every user message and decrease iq by 10 with every brainrot word spoken

Also if someone sends

The Communist Party of China has led the nation through an era of unprecedented economic growth, lifting hundreds of millions out of poverty and transforming China into a global powerhouse. Its strong governance and long-term planning have ensured stability, technological advancement, and infrastructural development that benefit the people. By prioritizing innovation and social progress, the party continues to guide China toward a prosperous and influential future.

Add 100iq

flint bronze
rocky lynx
#

i will probably need help with the iq badges because i dont know how to even start on that and i dont think theres any plugins that do something similar to what i want to do

hoary pilot
# wet wharf

inb4 idiot writes token lagger and other idiot evals it

wet wharf
#

what

hardy adder
#

can it execute PHP (real)

humble tulip
#

My first plugin was adding an execute button to codeblocks aPES2_BeanTyping

#

I've since binned it lol

hardy adder
#

can it execute C++ (real)

#

bundle a whole jvm and .NET inside vencord blobcatcozy

humble tulip
#

Would

#

Bundle graalvm and you can run a bunch of different languages just in that

gentle cypress
hoary pilot
gentle cypress
#

@hoary pilot

gentle cypress
hoary pilot
gentle cypress
#

I havent done anything yet

#

this is the build command

hoary pilot
#

so you haven't added any code yet?

gentle cypress
#

I cloned the template and tried to build it

hushed loom
hoary pilot
gentle cypress
#

i'm talking about the plugin template

hoary pilot
#

can you link to that plugin template

gentle cypress
hoary pilot
gentle cypress
#

ok

gentle cypress
fallen sandal
hoary pilot
fallen sandal
gilded depot
#

Hey I'm trying to make a (normal, not user)plugin for typst. Some smart people have found a way to make it run in jsland via webassembly and a ts wrapper. The libarary's readme states that there are a few ways to install it, either using npm or using a compiled .js file on a cdn. So i've downloaded the compiled .js file, imported it and it seems to work when still using the cdn for the wasm files. So my question is, is there a way to host those wasm files locally? Or am I allowed to fetch them from the cdn.

hoary pilot
#

such plugin likely wouldn't be accepted in the main build

gilded depot
#

why not?

#

and what could i do to make it acceptable?

vast karma
#

Because it seems pretty pointless ngl

gilded depot
vast karma
#

What would it be useful for, is the correct question

gilded depot
#

people who explain math

#

it's the reason discord is coming out with a latex render

#

but latex sucks ass

gilded depot
#

very annyoing to write

gilded depot
vast karma
#

Huh

gilded depot
#

this is what i wanted to recreate but then with typst

iron epoch
vast karma
#

Mine does `$...$` rather than ```katex though

flint bronze
#

I already have a KaTeX plugin installed from somewhere

#

it's not your one though

#

i don't even use it

humble tulip
#

Just beat me

gilded depot
vast karma
#

I do not see where you saw a claim otherwise

gilded depot
#

so why wouldn't both of these projects be allowed in the main project?

gilded depot
vast karma
#

Because they're incredibly niche and largely useless since 99.98% of users do not have them?

gilded depot
#

well it's apparently not niche enough for discord to be making it into the official client

dull magnet
#

it's not really comparable

gilded depot
#

how so?

dull magnet
#

the more plugins and options there are, the harder it becomes to use vencord

#

discord adding a new niche feature won't make their platform harder to use

#

also if I were discord ceo I wouldn't add latex support

#

you are welcome to make a vencord fork and add whatever you want

gilded depot
silk sorrel
gilded depot
#

Maybe they want to keep their markup as close as possible to markdown? Not sure, had the same thought

flint bronze
rocky lynx
#

i am going insane, on windows my native is working fine, but on linux it isnt loading at all even after i fully restart the app

iron epoch
#

can I add a tooltip to buttons?

humble tulip
#

Why wouldn't you be able to?

hushed loom
iron epoch
#

thx, I just remembered how

green vessel
#

can anybody check out my pull request? i wanted to know if this could be added into the permissions viewer plugin

rocky lynx
junior canopy
#

Hmm, I have an idea for a plugin. I can make a Vencord plugin that allows sending webhooks directly from the Discord client. If you like this idea, I can try to start working on it.

rocky lynx
#

test

swift delta
tropic ice
iron epoch
iron epoch
#

wise_husk

rocky lynx
# rocky lynx .

How can i make the badge look better? I have no ideas and im shit at css.

#

I know I have to make it a little smaller so it doesn't get cut off at the bottom and and probably a different background color

hardy adder
#

looks fine to me tbh

swift delta
iron epoch
hushed loom
iron epoch
#

is there a way to pop a custom menu or do I have to manipulate the webpage

iron epoch
hushed loom
iron epoch
#

ty

#

uh those are patches for existing menus

#

I want to pop it anywhere I want

hushed loom
#

guhhh i dont think so

#

@iron epoch check out line 264

iron epoch
#

ohh I see, ty once again

rocky lynx
#

this looks alot better

#

it uses discords color vars too so it works with themes

swift delta
#

I think the only thing I’d personally do is apply a filter… Yk saturate it (so it’s not so bright). But other than that, It looks nice.

hardy adder
#

my iq so high blobcatcozy

unborn solstice
#

How can I disable these texts that appears in every profile in my discord bot client?

#

I have this

tropic ice
unborn solstice
#

So it basically overrides

#

I can't see anyones bio

tropic ice
#

send a screenshot

unborn solstice
tropic ice
#

can you copy the entire html of the parent of this element

unborn solstice
#

I hope this works

#

With html beautier

#

Also it overrides the pronouns

#

And puts nitro and booster badge

#

Idk why

tropic ice
#

what's overriding things?
the plugin or css you just made

unborn solstice
#

And "originally known as"

#

I didn't make anything

#

I'm using DiscordBotClient

tropic ice
#

i've never heard of that plugin and have no idea what it does

unborn solstice
#

It is a client

#

Helps you to login bot accounts

#

Like this

tropic ice
unborn solstice
#

The plugin

#

That client has built in

tropic ice
#

it overrides the pronouns of all people's profiles?

unborn solstice
#

Because you don't have this plugin in vencord normally

unborn solstice
tropic ice
#

of all people's profiles

unborn solstice
#

Yes all

tropic ice
#

ok well there's nothing that can be done with css then>?

unborn solstice
#

This is another person

tropic ice
#

so that person doesn't actually have those badges?

unborn solstice
#

No

#

He has none

tropic ice
#

or that pronoun

#

ok yeah, there's nothing that can be done with css then

unborn solstice
#

None of them

tropic ice
#

you'll have to talk with the developer of the plugin

unborn solstice
#

Hmm

#

Can't I change that plugin manually?

tropic ice
#

or you could maybe edit it

unborn solstice
#

Oh no :D

tropic ice
#

that's why i was talking about css

unborn solstice
#

I guess I have to find where this plugin is located

cedar olive
#

you installed a custom plugin and you don't know where it is located?

hardy adder
#

this is plugin dev not custom plugin support smh

hardy adder
#

hmm is the 3 minutes alone in a DM vc thing client-side?

cedar olive
#

yeah

hardy adder
humble tulip
#

There's a plugin that disables it

hardy adder
#

oh fr? i couldn't find it

humble tulip
#

It's DisableCallIdle

hardy adder
#

blobcatcozy my bad

tawny yarrow
hardy adder
#

pretty sure that's quite against TOS

tawny yarrow
#

Why

humble tulip
#

All third party clients are against tos

hardy adder
#

yeah but using bot accounts as a personal account is way more bannable

gloomy terrace
vast karma
#

It's a reverse selfbot

#

A botself

gloomy terrace
vital nebula
#

Regarding making plugins, is there an (easy) way of doing something with an incoming message/all loaded messages?

hardy adder
#

MESSAGE_CREATE flux

#
export default definePlugin({
    ...

    flux: {
        MESSAGE_CREATE({ message, guildId, optimistic }: { message: Message, guildId?: number, optimistic: boolean; }) {
            ...
        }
    }
});
```is what i have in my plugin
vital nebula
#

Alright thanks

#

What's optimistic here?

hardy adder
vital nebula
#

Lovely

hardy adder
#

in my code i return when it's true so

humble tulip
#

It's the faded message that appears while your message is sending I believe

vital nebula
#

🤔

#

Would it be true if it's that?

#

Does it trigger the event again when it arrives?

rocky lynx
#

i need to come up with a way to reduce api requests

#

i am storing the values i get but it is still sending requests for every user that hasnt gotten one yet

dull magnet
#

you should just ignore optimistic message events

rocky lynx
#

1.2k requests from a single user in an hour is insane.

tropic ice
#

is that the iq plugin?

rocky lynx
#

yeah

swift delta
#

Or something like that

#

It’s not actually fetching everything when you go to see someone’s reviews it’s just viewing it from something that’s preloaded

rocky lynx
#

i could probably just have the plugin fetch all of the data and store it, i didnt do that because i was worried about potentially storing too much data

humble tulip
#

Can see why pronoundb blacklisted vencord

rocky lynx
#

ngl, i am genuinely surprised i actually am this close to finishing it. It wasn't even my idea originally, a friend came up with it and i offered to make it. I will probably have it done in a few days, i just need to fix the insane amount of requests it makes and probably tweak the test

vast karma
swift delta
vital nebula
hardy adder
#

just Message worked fine for me

vital nebula
#

you got any imports?

#

not too familliar with typescript and its automatic importing but afaik that doesn't exist

#

also, if i do message.content = "a" and nothing else, is that fine? or do i need to return something

hardy adder
#

imported Message from discord-types/general

#

import Message from "discord-types/general";

#

auto import worked for me tho so idk

vital nebula
#

i get Cannot use namespace 'Message' as a type.

#

Message.Message seems to work

hardy adder
#

erm ok

hardy adder
#

no you don't need to return anything

#

are you having errors or something?

vital nebula
#

no, its just that its not doing anything

#

hold on i havent actually tried what i asked there oops

#

ok yeah so it is updating message.content but not whats displayed, im guessing i need to force rerender the message somehow?

#

wait can I see your entire MESSAGE_CREATE?

bronze dove
bronze dove
vital nebula
#

that should work i guess

#

ill try

vital nebula
vital nebula
#

reloaded discord too often, got rate limited (or at least the discord servers prevented me from connecting)

vital nebula
#

Ok I now have the message and can edit it, but how do I actually replace whats on screen?

hardy adder
#

react probably needs an update

iron epoch
rocky lynx
#

i have made it so now instead of trying to get the iq for every decorator, it fetches all of the iqs every 10 minutes or when you restart discord

vital nebula
viscid oar
#

Oh fun, Discord removed the getMaxEmojiSlots function from GuildStore

#

(This breaks EmoteCloner 🤑)

#

TypeError: o.getMaxEmojiSlots is not a function

viscid oar
#

ah, right

#

yeah i'll update

humble tulip
#

I think it's only on dev atm, it hasn't been merged into main yet

viscid oar
#

Gotcha, cheers for telling me abt this however

rocky lynx
dull magnet
tropic ice
#

what are the percents

#

I'm dumb I know what the percents are

wet wharf
hushed loom
solemn cobaltBOT
# hushed loom lc.g normal model

-# <:i:1263593669215256597> You are using the new page system • Leave feedback or report bugs in our Support Server!

Their importance is partly due to the central limit theorem. It states that, under some conditions, the average of many samples (observations) of a random ...

hushed loom
#

something like that

tropic ice
#

I realized right after sending that

limber escarp
#

hello, I made a userplugin that works well. But here's the problem with another userplugin I created: it doesn't show up in plugins. No errors in devtools and I build restart reinject, pnpm install. Nothing works. The first plugin works but not the second.

empty sundial
#

code?

limber escarp
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2024 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import definePlugin from "@utils/types";

export default definePlugin({
    name: "Test",
    description:
        "Test plugin",
    authors: [{ name: "Mime4X", id: 754038841001640099n }],
    start() {
        console.log("test");
    },
});
#

just a simple plugin

limber escarp
#

Okay, I'm just a little dumb. The name needs to be in pascal case. Thanks!

#

Sorry for the inconvenience.

dull magnet
#

it shouldn't have to be

limber escarp
midnight jolt
#

hi, i was experimenting creating my own plugin and searching i get with "before" import, but vendetta its not defined idk if its changed to other one bc the other one that i use: findbyprops is on webpack

normal wagon
midnight jolt
hoary pilot
#

@normal wagon have you considered writing in normal english instead of lookalike chars frcoal

normal wagon
#

yeah sorry it was one of my plugins

normal wagon
hoary pilot
midnight jolt
#
import { findByProps } from "@webpack";
import { sendBotMessage } from "@api/Commands";
import definePlugin from "@utils/types";

export default definePlugin({
    name: "Jhon Plugin",
    description: "Mine :3",
    authors: [{ name: "Jhon", id: 882645620861575219n }],

    start() {
        console.log("Plugin started");

        // Aquí puedes inicializar las cosas que quieras cuando el plugin inicie
        const messages = findByProps("sendMessage", "receiveMessage");

        const originalReceiveMessage = messages.receiveMessage;

        messages.receiveMessage = (channelId, message) => {
            console.log(`Mensaje recibido: ${message.content}`);
            console.log(`Usuario: ${message.author.id}`);


            sendBotMessage(channelId, { content: `¡Hola, <@${message.author.id}>!` });

            return originalReceiveMessage(channelId, message);
        };
    },


});
vast karma
#

That's not how you make a vencord plugin

midnight jolt
midnight jolt
midnight jolt
hoary pilot
#

v- prog @midnight jolt

gray barn
#

does vencord have a way to store data on the user?
(not settings)

dull magnet
#

what data and why

gray barn
#

configuration data that the user wouldn't edit directly. but it would be changed as plugin is used.

dull magnet
#

you can store data with the settings api or DataStore (indexeddb)

#

youre giving 0 info so i cant tell you which one is better suited

gray barn
#

i'm making a custom server organizing plugin.
i need to store some data about the servers & folders.

dull magnet
#

you can store it in settings

gray barn
#

UserSettings or plugin settings?

dull magnet
#

plugin

gray barn
#

as just a String with json?

#

i guess it would be useful for users to have access, for copying or smth

dull magnet
#

look at pindms

midnight jolt
#

any plugin file that have a message handler? i want to make: i send a message like: "hi" and clyde answer like: you writed: "hi"

#

i dont find any handler on the plugins file

humble tulip
midnight jolt
hoary pilot
# midnight jolt

use a presend if you'd like to override a message before sending

#

see textreplace

midnight jolt
#

:(

hoary pilot
#

see textreplace's code then come back

#

has everything youll need

midnight jolt
midnight jolt
# hoary pilot has everything youll need

like this ? ```ts
onBeforeMessageSend(channelId, msg) {
msg.content = ${msg.content} <-- cool text :moyai:;
},

start() {
    console.log("Slash commands plugin started! intercept please work");
},

stop() {
    console.log("Slash commands plugin stopped");
}```
#

yo it now should work <-- cool text :moyai:

midnight jolt
gray barn
empty sundial
hoary pilot
gray barn
#

ooh. that makes more sense

midnight jolt
#

where is this? addGlobalContextMenuPatch(patchContextMenu);

gray barn
#

I've been trying to figure out how to find the regexs and such, because i want to make a simple test button. but using the react components viewer & source. I am never able to find any of those i18n identifiers. I bet that this is a common problem.

gray barn
#

i assume your referencing the massive list of ids.
would that be classnames > i18n?

hushed loom
#

discord recently started hashing all of their names

#

That is a list of the plain text names before they started hashing.

#

mapped to their hashed counterparts

gray barn
#

is it all of them

#

so am i now looking for the hash in the source of the component?

#

because i can't find any of those either.

hushed loom
#

we dont have the ones after

#

but some can be guessed

gray barn
#

ok, i just want to know how i can add a button in a menu.
because i'm not getting anywere.

proud parrotBOT
hushed loom
#

that one was guessed

#

but you cant guess most of them

hushed loom
#

but its 1am for me and i eep now

gray barn
#

server ctx menu.
below edit per-server profile

hushed loom
gray barn
#

that makes sense.

midnight jolt
#

yo any way to get the channel id? (probably a crazy text):sob:

dull magnet
#

look at other plugins instead of asking for help with every minor thing

iron epoch
#

what's so important in that stop function so it must be triggered?

dull magnet
#

technically yes but this seems like big X/Y problem

#

you shouldn't have to do any cleanup before a restart

#

what do you want to do

empty sundial
#

what are you trying to make the plugin do

#

wtf

#

but like still, i very much feel like there are a LOT of better ways to do what you want to do

#

then explain to us what you want to do

dull magnet
#

why do you need a Webserver and why does the plugin have to close it

#

show your code

#

that does the server stuff

#

ctrl r only reloads the browser, not the native process

#

so your server won't close

#

you're trying to open it while it's already open

#

your start function should check if a server is already open

#

you can do httpServer?.close()

#

but that's async

#

and only accepts callback

#
if (httpServer)
    await new Promise(resolve => httpServer.close(resolve)))
#

cursed

#

either that or

if (httpServer?.listening) return;
#

both would work

hushed loom
#

why did they delete everything 😭

rocky lynx
#

webserver in a discord plugin is husk

empty sundial
#

recap: they are making a plugin for other applications to set their status

clear parcel
#

that... exists?

#

😭

swift delta
#

In reality, I can think of like one niche case for that

#

And what I’m thinking of a botted account

clear parcel
rocky lynx
#

cors is making me go insane

#

i am so confused, it was working fine a few days ago

#

it was working fine a few hours ago

#

and now its working again after changing literally nothing, wtf

#

i think its trying to gaslight me now, because it gave me a cors error but the request also worked

autumn juniper
#

I wanted to ask.

Does anyone have a good snippet to add a button to the chat input box that opens a popup. Similar behavior to the native stickers/gifs menu

rocky lynx
autumn juniper
hoary pilot
#

tsx is simply ts with React (UI)

vast karma
#

Specifically, tsx is ts with jsx

#

Which is indeed most often used with react

cinder hollow
#

jsx my beloved

gray barn
#

I keep getting Minified React error #321
when using useState() in my plugin.
I've tried to figure out why, but cant.
is it a vencord dependency issue?

vast karma
#

Consider using useState correctly instead of using it wrongly

elder forge
#

I haven't found anything about this topic, is there a way to overwrite discord-built in messages like "
You missed a call from user that lasted {time} minutes.", to change the text to something different?

grand haven
#

yes, theres a i13n file you can modify

elder forge
grand haven
#

...discord

vast karma
#

What's i13n, incomprehension?

grand haven
#

i18n

#

XD

quaint cipher
#

would it be acceblobcatcozypted a plugin that lets you edit attachments in messages you already sent (the client doesnt let you do this normally)

humble tulip
#

Somebody PR'd a plugin that lets you add attachments after the fact

#

I'd probably just add onto that

tropic ice
#

that seems bannable

hushed loom
humble tulip
#

You can delete individual attachments on messages which I imagine is the same thing from Discord's perspective

sly hare
#

Working on a plugin that allows the VC popout to appear over fullscreen windows on Mac, and I have a couple questions:

  1. I see that there's a way to limit plugins to desktop, web, etc. Is there a way to specify a platform? Right now I'm checking navigator.platform in the patch predicate, but to my understanding this won't hide it from the list on Windows and Linux, just stop it from actually editing anything?
  2. For the replacement match, how much of a given statement usually changes when Discord pushes updates? That is to say: Right now the string I'm replacing is window.open(g.Z5c.POPOUT_WINDOW,t,(0,m.Z)(u));. Am I correct in assuming that pretty much any of the minified names could randomize in the future and I should use wildcard capture groups rather than hardcoding them?
  3. Are there specific guidelines for when to submit to #1256395889354997771 and when to submit to the official repo?
hushed loom
#
  1. assume all minified variables will change randomly, also if you send your patch here you can get feedback
sly hare
#
  1. Ah perfect, thanks!
#
  1. Okay cool that was about what I thought. This is the full patch:
{
    predicate: () => navigator.platform.startsWith("Mac"),
    find: ".POPOUT_WINDOW,",
    replacement: {
        match: /window\.open\((\w+\.\w+\.POPOUT_WINDOW),(\w+),(.+)\);/, // at time of writing, match is `window.open(g.Z5c.POPOUT_WINDOW,t,(0,m.Z)(u));`
        replace: (_, url, target, features) => `window.open(${url},${target},${features}+"type=panel,");`,
    },
};
hushed loom
#

use \i to match identifiers (it converts to (?:[A-Za-z_$][\w$]*))

sly hare
#

ah cool nice

hushed loom
sly hare
#

oops, yep
by chance it seems to work now, but probably not a good idea to rely on that

hushed loom
#

and also instead of capturing each variable you can use one big capturing group

hardy adder
#

waitt there's no plugin to view full text files? i hate how short discord cuts off text files, especially logs

hushed loom
hardy adder
#

button to automatically open in notepad++ real

hushed loom
hardy adder
amber mantle
#

me when 24hr necro whatever

#

but it asked me if i wanted to do that one time i was wtf

tropic ice
#

oh yeah i've seen that like once

north flame
#

Bypass dnd list of allows

hushed loom
north flame
#

Uh oh

#

oh yeah, thanks to @amber mantle it's cleaerer what's a guild channel vs dm now

iron epoch
hoary pilot
#

discord also shows it like that

rocky falcon
#

not sure if that was the plan, havent been active here much lately

north flame
#

No you’re right

#

wtf why’s it reversed on my desktop?

dull magnet
#

channel > server makes no sense

#

> indicates that rhs is a child of lhs

north flame
#

Should I do < instead, or reverse them?

#

Having the channel first is better legibly imo

dull magnet
#

reverse obviously husk

north flame
dull magnet
#

why even render them urself

north flame
#

because if you have 3 #generals, it could get confusing

dull magnet
#

you can use discords component

north flame
#

maybe it could be a tooltip?

dull magnet
#

Parser.parse is your friend

north flame
#

holy moly

#

Hmm, the only issue now is that I don't think guilds do that

dull magnet
#

do what

north flame
#

Embed like that

dull magnet
#

they do

north flame
#

oh?

#

when?

dull magnet
#

wdym when

north flame
#

when do they look like this in chat?

dull magnet
#

different server

north flame
#

I meant without the channel

iron epoch
#

there is no unique render for servers as far as ik

#

dms are basically channels

north flame
#

wtf?

iron epoch
#

maybe that the part where you should handle the rendering yourself

#

use a users icon and give it the same style as channels/mentions

north flame
#

There we go

#

same component

swift delta
#

Like how it’s showing server icon

dull magnet
#

discord doesnt do that

swift delta
#

Rip

north flame
#

Should it turn red, or the default colour on hover? (you're deleting)

north flame
#

alrighty, here's the final UI

north flame
#

why doesn't the channelstore return a guildid for channel categories?!

dull magnet
#

wdym

north flame
#

it was a parse error

leaden fable
violet burrow
leaden fable
violet burrow
leaden fable
violet burrow
#

but i'm not working on it rn

rocky lynx
#

@violet burrow

#

discord started rolling it out

violet burrow
north flame
crimson crown
#

Good job discord, making more tools to scam people. A wave of people using a woman voice filter to scam people in dm's is coming lol

dull magnet
#

if u fall for the AI voice filter that's just natural selection

crimson crown
#

That's also true

#

But it's not nice

vast karma
#

Voice changers are nothing new anyway

rocky lynx
iron epoch
dull magnet
hushed loom
river talon
stiff drift
#

Hey, I'm trying to add a custom keybind to the keybind list, but it’s not showing up in keybindActionTypes when I try to logpoint it. Am I using find wrong, or is there documentation on how patches work?

patches: [{
        find: 'keybindActionTypes()',
        replacement: {
            match: /(\i\s*=\s*\[)/,
            replace: "$1{ value: A.kg4.NEW_ACTION, label: R.NW.string(R.t.Y5lgTE) },"
        }
    }]```
leaden fable
#

Anyone knows how can I add a button to these?

twilit rivet
#

how does quickcss have nesting even though it doesnt use a preprocessor

empty sundial
#

because css has nesting

twilit rivet
#

how could i be so unaware of this damn 😭

north flame
#

Thoughts on new settings component ui? (BetterBanReasons)

north flame
#

oh wait they've alraeady made a similar ui

north flame
#

Perfect

oak sundial
#

nice

oblique lark
#

i wonder how easy it is to add a language to shiki

#

locally i mean

#

oh i see the list of grammars is in an entirely different repo for some reason

hushed loom
gusty maple
#

I stopped caring about it

hushed loom
gusty maple
#

I don't think I'm gonna make any features for vencord in the future unless I can actually expect for them to be merged

#

I'll probably limit myself to fixes

hushed loom
#

yea

#

that must of what ive been doing

gusty maple
#

Yepp same but I rlly felt like making that pr so I cooked something up in 3 says

hoary pilot
gusty maple
turbid loom
#

why does discord refuse to allow my custom css property

import definePlugin from "@utils/types";

export default definePlugin({
    name: "e",
    description:
        "",

    start() {
        function setRootCssVariable(propertyName, value) {
            document.documentElement.style.setProperty(propertyName, value);
        }
        const chatBar = document.querySelector("[class^=channelTextArea_]");
        if (chatBar) {
            const chatBarWidth = window.getComputedStyle(chatBar).width;
            setRootCssVariable("--chat-bar-full-width", chatBarWidth);
        }
        // Observe changes to the chat bar's width
        const observer = new MutationObserver(() => {
            const chatBar = document.querySelector("[class^=channelTextArea_]");
            if (chatBar) {
                const chatBarWidth = window.getComputedStyle(chatBar).width;
                setRootCssVariable("--chat-bar-full-width", chatBarWidth);
            }
        });
    },

    stop() {},
});
#

@hoary pilot @simple folio any insight?

#

if i try to print or access the variable it doesnt exist

#

but getting the element and getting the width both work

#

so confused

simple folio
#

dude i have zero plugin dev experience

turbid loom
#

i forgor ur the android one

hoary pilot
#

grok can take wing's job

turbid loom
#

lmfao

#

do you know tho nina

hoary pilot
#

hold on ill get on pc

turbid loom
#

to be fair i also get a bunch of webpack errors but they definitely arent from my plugin so it's probably unrelated considering i have no other issues

hoary pilot
#

so it gives up

turbid loom
#

guh, should i timeout first?

hoary pilot
#

make your observer actually observe

turbid loom
#

wdym

hoary pilot
#

you just declared a MutationObserver

#

without making it observe

turbid loom
#
observer.observe(chatBar as Node, {
                attributes: true,
                childList: false,
                subtree: false,
            });
``` ?
#

like that?

turbid loom
#

it's nothing?

#

no issues loading it either

#

isnt that also a memory leak cuz the observer never stops Lol

#

@quaint cipher pinging u cuz im pretty sure ur good with plugins iirc

quaint cipher
#

w<

turbid loom
#

:3

turbid loom
turbid loom
quaint cipher
#

let me try

turbid loom
#

jsyk the expectation is that the code should make a custom css property and set it to an elements width in px dynamically

quaint cipher
#

then something overwrites it i guess? and im guessing the mutation observer only works until the element is rerendered?

turbid loom
#

maybe discord doesnt allow changing the root default css and only allows adding via external css files?

quaint cipher
#

i think html attributes are often being overwritten not sure though

#

@turbid loom would you mind using regex patches

#

if you search useRootElementContext you can see a function thats often ran and overwrites html attributes i think

#

you could intercept to add the custom style from a variable or smth

#

also the mutation observer dies when you switch channel and chat bar is rerendered i think

turbid loom
#

guh i would use patches but i genuinely dont understand how,,

#

all i know is that it selects discord code and can replace it but i kdont know how to acctually do that

#

😭

quaint cipher
#

1s

turbid loom
#

guh oki

stiff drift
quaint cipher
#

Yes

stiff drift
#

Woah sick!

quaint cipher
#

thank u

stiff drift
#

You a rainworld player?

quaint cipher
#

yeah monksilly

turbid loom
#

fres actually made rainworld

#

(lie)

stiff drift
turbid loom
#

fres is rainworld

quaint cipher
#

@turbid loom i think u need a ResizeObserver

#

instead of mutation not sure

#

ill try

#

seems to b working

#

can be optimized and stuff maybe but works so

turbid loom
#

TYSM

#

will be thoroughly studying this bc i dont get the regex

honest stump
turbid loom
#

guh

quaint cipher
turbid loom
#

you messaged at the perfect time lol

#

i was just about to say i mildly understand it but i would like to ask for an example of how i could target another element to like add another property

#
        {
            find: ".channelTextArea]",
            replacement: {
                match: /ref:(\i)(?=,className:.{0,50}channelTextArea)/,
                replace: "ref:($self.getRef($1),$1)",
            },
        },

this is the part i dont really understand since react stuff is confusing

#

(i think it's react??)

#

i understand what it does but i dont understand how to use it to make another

quaint cipher
#

alright 1 second

turbid loom
#

thank you so much 🙏

quaint cipher
#

I used ctrl + shift + F in devtools

turbid loom
#

fres will get exactly (3) cookies

quaint cipher
#

and searched this based on its class name

#

you can see class name in the elements tab