#🧩-plugin-development

1 messages · Page 68 of 1

opal dock
#

could you point me towards some documentation on how to do that?
I'm not familiar with how stores work

dull magnet
#

patch the popout component and change the variable / react prop that contains the user object

#

you can use a react hook to properly handle the promise

cedar olive
#

so this right

opal dock
opal dock
cedar olive
cedar olive
# opal dock yes

okay so I have the exact component that handles that but it's your choice if you want me to just give to you or show you how to get to it

opal dock
#

I would like to learn how to find this information myself :3
please show me how to get it

cedar olive
#

luckily pronoundb already patched pronouns there so it was the same component lol

#

okay so

#

I selected the pronouns component

#

then I closed all of it's siblings and selected the parent of it

#

now if you click here it jumps into the code responsible for it

#

and as you can see from the props you have the user, pronouns, and nickname

#

which is all you need to change

opal dock
#

mk
I understand all of that
now the issue is
I have no reference to the MessageID that the user interacted with to create the popout
what would be the best way to get access to that?

cedar olive
#

well that component doesn't have it

#

so you can try to see if you can patch and add as a prop

cedar olive
#

lets see if we can sneak in the message too

opal dock
#

I see

cedar olive
#

nop

#

ngl I think you can't get the message id

opal dock
#

yeaah

cedar olive
#

not without patching a billion components to pass it down

#

the whole popout doesn't have that information since the beginning of it

opal dock
#

would it be stupid to set up my own global variable and store it earlier on in the process? Like somehow overriding the onClick event that starts the whole popout-ing process, grabbing the message ID from that, and then using that later on?

cedar olive
#

no lol

#

that's fine

#

and might be the easiest approach

opal dock
#

oki
so now the question is
how do I find the onClick event that starts the whole process
because I spent like 4 hours searching yesterday and kept going in circles, which is when I gave up and came here to ask for help

cedar olive
#

select your name

#

go up, you can see an onClick prop

#

right click it, go to definition

#

just code to paste the mention in the chat box, not what we want

#

ngl this is one is complicated

opal dock
#

yeaah

cedar olive
#

okay so the onClick here is handled by the Popout component

#

which basically calls renderPopout to create the bite size popout

#

so you need to patch the renderPopout

#

which for this case you need to go up like 3 or 4 components to finally find the source of it

#

if you wanna try to get to it feel free, but either way here's a find for it "renderUserGuildPopout: channel should never be null"

opal dock
cedar olive
#

nice

#

I'm glad you were able to find that

opal dock
#

ok so at least I was on the right track

cedar olive
#

now you can either modify the place I showed earlier or this

opal dock
#

I just need to combine the two approaches basically
use renderUserGuildPopout to get the message information, then modify the popout component and store a reference to the MessageID

cedar olive
#

this is where the component gets the nickname and pronouns for

#

.hasAvatarForGuild(null== for that

cedar olive
#

use renderUserGuildPopout to set a variable in your plugin with the latest message id

#

you are gonna need a lot of patches to get the messageId down there

#

not worth it

opal dock
#

fair

cedar olive
#

it's hacky but way easier

#

and should work fine for what you need

opal dock
#

it's not like there's gonna be multiple popouts open at once under normal circumstances anyways

cedar olive
#

yep

naive thicket
#

yay, got something usable

hushed loom
#

Not sure what you're trying to do tho

naive thicket
#

just for my own fun

hushed loom
naive thicket
#

and tbh i didn't know permissionview existed

opal dock
# cedar olive yep

tysm! purple_candyheart
the pronouns are now switching responsively
I just need to poke around more to figure out where to patch in the bio now, since it doesn't have an explicit "bio" section like it does for pronouns, but that shouldn't be too hard I don't think

cedar olive
#

ohh

#

i confused the nickname with the bio

opal dock
#

that's fair

#

I figured out how to set the bio :3
I just had to set v.bio right before the function returns

fallen sandal
vale anchor
#

I was looking at other plugins, but im not able to find something

When the plugin is enabled or disabled vencord should restart.

But i only find that option for settings, not for the plugin self

vast karma
#

If the plugin has patches, it requires restart

#

Dunno if there's any field to explicitly dictate that

vale anchor
#

okay, bcs i add the button to the serverlist, but when you turn the plugin in, it is not there, only when you refresh discord

hushed loom
vale anchor
#

thats what i was saying, i cant find what the tag is for that

#

I only find it for the settings

const settings = definePluginSettings({
    loop: {
        description: "",
        type: OptionType.BOOLEAN,
        default: true,
        restartNeeded: false
    }
});
vast karma
#

You can't add buttons in start/stop unless there's an existing api for it

#

For more creative button locations, you need patches

#

Which indeed require restart

vale anchor
#

atm this is my definePlugin

export default definePlugin({
    name: "BetterGuildList",
    description: "Adds an 'Expand' button to the bottom left corner to expend the width of the guild list.",
    authors: [Devs.kebab_420],
    dependencies: ["ServerListAPI"],

    renderExpandButton: ErrorBoundary.wrap(ExpandButton, { noop: true }),

    start() {
        addServerListElement(ServerListRenderPosition.Above, this.renderExpandButton);
    },

    stop() {
        removeServerListElement(ServerListRenderPosition.Above, this.renderExpandButton);
    }
});
vast karma
#

Oh, so there is a ServerList api

vale anchor
#

ye so im looking to all the other scripts and to the libs but I cant seem to find how i can say it needs to restart

iron epoch
#

or force the user

vale anchor
#

hmm that is a option maybe. Let me see if I can find the best way to do that, Thanks!

vast karma
#

Or figure out why it requires restart in the first place

vale anchor
#

well i have been looking the past 2 hours why the plugin needs a restart before working. I guess Discord may not dynamically render new components added by plugins unless the application is restarted. I found some other plugins that have the same issue.

So for now I solved it editing my start() function to this

    start() {
        if (!Vencord.Plugins.isPluginEnabled(this.name)) {
            onRestartNeeded();
        } else {
            addServerListElement(ServerListRenderPosition.Above, this.renderExpandButton);
        }
    },
vast karma
#

If addServerListElement does not rerender the list, that's a bug

vale anchor
#

Ye i found the readAll button plugin that was having the same issue when you enable it, it is not there, until you reload discord

opal dock
#

I've noticed some performance issues creeping in with my plugin, and I was wondering how I might be able to figure out the cause. The performance tab in the dev tools isn't showing all that much, and the react profiler says it's not supported
is there another way I might be able to profile it to figure out where the issue is?

hollow condor
#

can i take the source of an existing plugin (oneko) to modify it for mine by giving credits?

mental haven
#

for public or private use?

rocky falcon
hollow condor
mental haven
#

sure, append with yours

hollow condor
#

alright thanks

rocky falcon
mental haven
#

tbh plugins are GPL-3 unless mentioned or what? I'm kinda confused

rocky falcon
#

plugins are gpl-3 end of discussion im pretty sure

mental haven
#

what i refer is user-made ones are also right?

#

not the one on plugins folder

rocky falcon
#

wdym user-made ones?
users make the plugins

mental haven
#

not on vencord's repo

rocky falcon
#

?

dull magnet
#

all plugins are gpl3.0

mental haven
rocky falcon
#

yea they have to be gpl3

#

cuz they use Vencord, and vencord itself is gpl3

mental haven
rocky falcon
hollow condor
#

so i just tried making the plugin but with shiggy, why doesn't it work?

/*
 * 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: "ShiggyCursor",
    description: "cat follow mouse (real)",
    // Listing adryd here because this literally just evals her script
    authors: [{ name: "damima", id: 1001076524612603945n }],

    start() {
        fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js")
            .then(x => x.text())
            .then(s => s.replace("https://cdn.discordapp.com/stickers/1039992459209490513.png", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")
                .replace("(isReducedMotion)", "(false)"))
            .then(eval);
    },

    stop() {
        document.getElementById("oneko")?.remove();
    }
});

source: oneko plugin

humble tulip
#

s.replace("https://cdn.discordapp.com/stickers/1039992459209490513.png", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")
This replaces something that doesn't exist in the script, I think you filled in the wrong part of the replace for what you're doing

dull magnet
#

your replace is wrong way round

hollow condor
#

because of the content of the asset?

humble tulip
#

You wanna replace the ./oneko.gif with your sticker

hollow condor
humble tulip
#

As in, you want to replace the highlighted one with your url, you replaced the first string instead so it's not doing anything

hollow condor
#

like this?

humble tulip
#

The first string needs to go back as it was before as well, "./oneko.gif"

hollow condor
#

ok

#

let me see if it works

#

woah it works

#

the problem is

#

it looks like this

#

how can i fix it

humble flax
#

Seems like the scaling is wrong. You propably need to define the scale when fetching from github

hollow condor
#

i'm new to these things :)

humble tulip
#

Oh, oneko.gif doesn't seem to just be a regular gif

#

It's actually a png segmented into frames

hollow condor
humble tulip
#

You'd either need to do this for your shiggy gif or adapt their original script to use a regular gif

hollow condor
humble flax
# hollow condor an example?

Well gifs dont contain any sizing data on thier own (afaik), and the viewport on the image you shared seems to be to small to show the gif correctly. So either make the viewport bigger or downsize the gif.
(you can see the uper side of the hairbun on the image you shared)

humble tulip
#

I feel like the time you'd spend getting it to fit into the existing script could just be better spent rewriting it to work with a regular gif

hollow condor
#

lmao

humble tulip
#

But adapted to follow the mouse instead of bouncing

hollow condor
#

can someone help? i'm having trouble

hollow condor
# rose fiber https://dontasktoask.com/

so i'm trying to do a plugin that's like the oneko plugin, but with the shiggy gif
i did some attempts but failed, i think the problem is the scaling of the gif as when i tested it the gif was just pixelated and cropped

the source has been taken from the oneko plugin (#🧩-plugin-development message) and now I modified it a little bit and it doesn't even load anything

this is the current code:

/*
 * 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: "ShiggyCursor",
    description: "cat follow mouse (real)",
    // Listing adryd here because this literally just evals her script
    authors: [{ name: "damima", id: 1001076524612603945n }],

    start() {
        fetch("./shiggy.js")
            .then(x => x.text())
            .then(s => s.replace("https://cdn.discordapp.com/stickers/1039992459209490513.png", "https://cdn.discordapp.com/stickers/1039992459209490513.png")
                .replace("(isReducedMotion)", "(false)"))
            .then(eval);
    },

    stop() {
        document.getElementById("nyan-cat")?.remove();
    }
});

I also added to the plugin directory a file called shiggy.js (source taken from #📜-js-snippets message), and the code is the same as shown in the original code

humble tulip
#

I don't think you can fetch like that, I'm pretty sure that just fetches discord.com/shiggy.js or something

hollow condor
#

oh woah i made it work!!!!!

#

thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

humble tulip
#

fwiw you can also just put all the code directly into the start() function rather than fetching it from the gist or another file

unkempt hemlock
#

can TextReplace rules/settings also be stored in a file for easier editing? (instead of only being stored in IndexedDB)

swift delta
#

or the one below that made by ethan

normal wagon
#

how would i check permissions, for a specific user rather than myself

#

from their userid

cedar olive
#

take a look at more user tags

#

and computePermissions

normal wagon
#

thank you

acoustic nest
#

how do people get access to this channel again

cedar olive
#

modmail

mental haven
#

i thought mentioned flag is part of LOAD_MESSAGES_SUCCESS, but it isnt.

#

removing out mentions and preventing then to ping is fun

unkempt hemlock
#

NoScreensharePreview is deprecated now?

#

discord added native functionality

flint bronze
#

is this in stable?

junior cove
#

yepyep

formal hollow
#

Hey, so i'm looking to make a plugin that gives the ability to switch fonts within discord, without relying on external css. Where would i get started and where would i be able to look at plugins to get an idea of how they are structured?

formal hollow
#

thank you!

fallen sandal
iron epoch
#

how do you find a settings?

dull magnet
iron epoch
fathom pivotBOT
#

@hushed loom, <t:1726803053:R>: review #2161

hushed loom
#

is there regex for a valid emoji name

#

builitin and custom

normal wagon
#

import { findByCode } from "@webpack";

no module found

green vessel
#

Anyone else notice how people on this server seem to say you make a plug in that allows you to upload more than 10mb files but betterdiscord used to have a plug in for that, https://github.com/ImTheSquid/SplitLargeFiles anyone tried recreating this here yet?

normal wagon
#

where can i find the addreaction function

#

i tried using previous one but it stopped working

balmy sky
normal wagon
#

would i do

#

findStoreLazy?

#

i'm trying to access the function.

#

findByCode from @webpack/common?

#

would it be .userHasReactedWithEmoji?

green vessel
#

findByCode(".userHasReactedWithEmoji")(channelId, messageId, { name: "", })

normal wagon
#

yeah but how do would i import findByCode because whenever i import it from @webpack its like non existtent

green vessel
#

import { findByCode } from "@webpack";

#

Oh lol

#

It should be there lol

#

Go in your webpack.ts in src/webpack and ctrl f findByCode and verify its there

normal wagon
#

this here right?

cedar olive
#

findByCodeLazy

#

ur searching for a module before it's loaded

swift delta
#

isnt that the context menu api?

green vessel
signal pilot
#

Hey

#

I made a cuss word bypasser plugin for vencord and idk how to make it send the message

#

it doesn't send the message

vast karma
#

I think plugins for circumventing rules aren't usually appreciated

balmy sky
#

Lmaooo what

#

Cuss word bypasser 😈😈🔥🔥🙏🙏

signal pilot
#

ehh

#

any word bypasser

#

also I got timed out for posting my script

#

what am I doing wrong?

#

I couldn't send the script

#

it just timed me out for 10 mins

balmy sky
#

That is maybe the most whitename image i've ever seen in my life

vast karma
#

The bot doesn't like unicode bypasses, yes

signal pilot
vast karma
#

So since you included those in the code you were trying to send, whoopie

signal pilot
#

do you want the code without those?

vast karma
#

Frankly, I do not give a damn

signal pilot
#

bro I just need to know why it doesn't send bruh

cedar olive
#

did u make that using ai lol

balmy sky
signal pilot
balmy sky
#

LMAOO

signal pilot
#

thats why I am here

cedar olive
#

gotta love the AI explaining every single line

signal pilot
#

because i'm dumb

balmy sky
#

Peak

signal pilot
#

learning 🚫

#

using ai ✅

#

😭

swift delta
signal pilot
#

anyway can anyone help my bright skin ahh

swift delta
signal pilot
#

gosh

#

just at least help or smth

#

its the only reason I used ai

swift delta
#

here is your help

#

DONT USE AI

signal pilot
#

ok

formal charm
#

I would recommend not using ai for these type of things, the AI will 100% not know how to properly make a vencord plugin and in my opinion if you dont understand what its writing you shouldnt be trying to ask for help on it as its annoying to us and not really beneficial to you

signal pilot
#

km

#

besides ai

#

what am I doing wrong?

balmy sky
#

Ai is a one way ticket to either getting banned for selfbotting, or having a broken plugin blobcatcozy

swift delta
#

everything

balmy sky
#

Or both tbf

swift delta
signal pilot
formal charm
#

You should try to look at other plugins as reference so you can see what they do

#

The documentation isnt really that good I admit

signal pilot
cedar olive
#

look at any other plugin that uses command and sends text and see how it works

#

there are plenty

signal pilot
#

I already looked there

vast karma
#

There's a few hundred

cedar olive
#

who would have guessed the website has a filter for plugins with commands

#

and a button to view their source code

swift delta
signal pilot
#

fr

formal charm
#

anyways on one note someone should try making the docs better blobcatcozy

swift delta
fathom pivotBOT
#

Alright @swift delta, in 8 years and 4 months: make docs better

green vessel
cedar olive
#

const b = a + 1; // adds 1 to a

signal pilot
#

because chatgpt is dumb too

green vessel
#

Should work perfectly fine

safe glade
#

.1+.2 ain't .3

#

I blame IEEE754

green vessel
safe glade
#

yup

reef patrol
#

Is there a documentation for the Vencord plugin API?

#

I couldn't find one

empty sundial
reef patrol
# empty sundial Not really

I had a replugged plugin that I was trying to port to Vencord, so I wasn't sure how to work with the vencord API

#

I assume I just need to take a look at the plugins source code?

vast karma
#

Looking at how things are used is often a good way to learn how things are used

reef patrol
#

Yeah that's fair
I was just wondering if there was a doc

reef patrol
#

OK so I'm reading the source code from one of the plugins and there's a @api library apparently
I tried finding it by looking into the package.json for Vencord, but I don't see a name match
what is that called?

reef patrol
#

Ah I see, ty

iron epoch
hushed loom
iron epoch
#

searching {RULES: would show the module if you want to test it yourself

#

sorry if sounded somewhat rude

reef patrol
#

Just so that I understand correctly, using a dev Vencord is for when you're testing the plugin, correct?

woven lion
#

yes

normal wagon
#

Props = Properties right?

#

What’s the difference between FindByCode FindStoreLazy and all the others like they have names what’s their functionality

reef patrol
woven lion
#

PR

woven lion
#

the lazy ones however only do the action specifically when needed

#

so, when they're first accessed

#

rather than instantly

vast karma
#

Which is useful since they're often used at the top-level scope, which is run before discord has loaded

spiral monolith
#

Can I use a node module in my plugin?

dull magnet
#

yes but why

spiral monolith
#

I'm going to add svg and avif support

dull magnet
#

you don't need a module for that

spiral monolith
#

yes now that I think about it I don't

fathom pivotBOT
#

@hushed loom, <t:1727407876:R>: review #2161

hushed loom
#

I

#

I can send you the code if you want

iron epoch
#

@rocky falcon you type but you never say something

cedar olive
#

mystery

vast karma
#

Anyone here know morse code? Maybe they're trying to say something

spiral monolith
rocky falcon
unkempt dove
#

is there an API to add an icon to the toolbar (like the toolbox does)? i saw the toolbox, but it uses a patch, and i really don't want to conflict

vast karma
#

If there was an api, toolbox would be using that

unkempt dove
#

true

reef patrol
#

So uh
what was the plugin that existed for PR #2918 to be closed?
Cause I looked at the entire plugin list and never found that

shrewd tundraBOT
reef patrol
#

welp, ty

void ledge
#

Guys, how to write code when i click on menu option to open browser with link?
All things are done but cannot open browser by click menu option

bronze dove
#

double the brain rot intake plugin

normal wagon
fallen sandal
remote kestrel
#

Access to fetch at 'https://cdn.discordapp.com/attachments/1015060231060983891/1290003784839467063/QA3gPLF.mp4?ex=66fae125&is=66f98fa5&hm=c47e600f9bbcfb08331fa789789d71a631744ac1cc6f3d038ae600b5a960eaa7&' from origin 'https://discord.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. guh

#

how fix

remote kestrel
#

i dont get it

#
const res = await fetch(url, { mode: "no-cors" });
if (res.status !== 200) return;

return await res.blob();
#

url is the same as stock discord that it opens in the browser

#

wtf its literally not even calling the fetch

#

???

bronze dove
#

Use a native.ts file to fetch it

remote kestrel
#

idk what that is

cedar olive
#

it's the way of executing code in the electron (node js) environment

#

which means fetch wont have cors and is allowed to fetch anywhere

remote kestrel
#

how do i do that

cedar olive
#

native.ts file with exported functions

#

then VencordNative.nativeHelpers or something like that in your plugin

#

look at any other plugin that has a native.ts file

#

and see how it exports/invokes the methods

remote kestrel
#

cant i just remove the origin header or something

#

webcontextmenus uses fetch and it doesnt complain about cors

dull magnet
#

actually it does

remote kestrel
#

seee

dull magnet
#

funny

lilac gale
#

hey huh I'm making a plugin to compress video directly by uploading it on discord
The compression part works pretty well (made with ffmpeg lib), but have problem with discord itself for actually sending it, like I don't get the patch part
WHAT

remote kestrel
#

@dull magnet what do i doo

remote kestrel
#

oh

#

@hushed loom do you know

hushed loom
#

sometimes

remote kestrel
#

@hushed loom how make it download

hushed loom
#

native.ts

remote kestrel
#

also im having to like restart vesktop manually everytime i make a change

remote kestrel
hushed loom
remote kestrel
#

no like

#

any change

#

isnt it supposed to reload automatically

hushed loom
#

not reloads

remote kestrel
#

i hate pressing ctrl r 50000 times

#

i remember it automatically reloading/restarting upon changes

#

when i made my other plugins

hushed loom
#

theres prob a way to do it

#

but i wouldnt use it personally

flint bronze
#

make fs watcher like styles do

#

this will make you rage while in vc with your friends making a plugin btw

iron epoch
#

what if we made the vencord companion extension detect changes and force reload

#

not really what yall talking about but this would resolve the issue of reloading discord early before the vencord build is ready

flint bronze
#

vencord companion is too unreliable for this, and isn't the appropriate interface for doing so

#

like i already said

#

filesystem watcher, like styles use

hushed loom
flint bronze
#

no auto-reconnect

hushed loom
#

companion reconnects on each reload

#

it does auto reconnectr

flint bronze
#

that isn't auto reconnecting

#

that's connecting on startup

#

when i say auto reconnect

#

i really mean "reconnect on failure"

iron epoch
#

that easily solvable

#

but is it really needed?

flint bronze
#

yes, maybe

flint bronze
#

no, but i know it'd be annoying

#

also my friends hate it when i develop plugins in vc and have to reload so often

safe glade
#

just connect on a different client

#

like web

normal wagon
#

i’m pretty sure though that web doesn’t have good noise cancellation as desktop

azure crane
#

Hey, everyone! I'm developing a plugin that patches the expression picker search bar, but, when I attempted looking for the module for the emoji search bar, I got referred by the Patch Helper to a module that straight up isn't in my Sources tab- what could be happening here?

bronze dove
azure crane
bronze dove
#

yeah or wpexs(/\[\i\.EXPAND_OR_COLLAPSE_EMOJIS/) will extract the module

azure crane
azure crane
# dull magnet

Ooooh, thank you!! I'm not too well versed in this, so I assumed they needed to show up on my sources tab, separate from the js file :V
I'll save this image, it's really useful!

dull magnet
#

the id is essentially the file name

#

each module is one file

azure crane
# iron epoch why patching the search bar?

I'm trying to add a button (similar to the diversity surrogate) to the side of the search bar on the GIFs tab so you can spoiler sent GIFs, just as an exercise- so I'm looking to patch the search bar's element nodnod

#

I was asking this specific question because I wanted to look at how the diversity surrogate works on the emojis tab, for reference when I patch my own thing in

fervent hedge
#

So I'm trying to upgrade the moreUserTags arround the Threads

#

The main problem is that the badge is to big for the size of the members list, so the nicks start to being almost invisible because cutes with ...

#

Any ideias to how to solve, or any ideia of displayName for the Thread_Manager permission?

rose fiber
#

"Chat mod" exists and is longer

fervent hedge
#

Was I was thinking is to create apart of moreUserTags, an resizable members list and chats list

rose fiber
#

that's what I said?

fervent hedge
#

Is not a thing that can be fixed normally

fervent hedge
#

Imma try to dev it asw

humble tulip
#

Marquee member names suffoPeepoMischief

remote kestrel
#

ewww

#

do any of you know how to disable this autoscroll thing when hovering over the edges in dev tools

#

its so freaking annoying when trying to select code and it just starts scrolling up

hushed loom
#

like in react devtools

remote kestrel
#

@hushed loom you

#

no

hushed loom
#

where is the autoscroll

#

never had it happen to me

remote kestrel
#

i move mouse at bottom of the code view

#

it scrolls

#

😭 i hate this so much

hushed loom
#

never had that happen blobcatcozy

remote kestrel
#

:(

#

this is awful

#

OF COURSE i cant find a single mention of this behavior anywhere

hushed loom
#

send video of it blobcatcozy

#

i still dont know what you're talking about

remote kestrel
hushed loom
#

@remote kestrel do you use x11 or wayland?

remote kestrel
#

wayland

swift delta
#

Dont bully the third time ive made a plugin, but im a stupid?

#

Actually cant i just import { definePluginSettings, Settings } from "@api/Settings"; ?

vast karma
#

You can just tell eslint to fix it, and it'll change it to that

swift delta
#

Oh i forgot that extension could do that

#

Im stupid

swift seal
#

hi I've been following this guide and got stuck on the step that requires you to open the Components tab in React devtools. The thing is I can't find that in my devtools. Can someone enlighten me please? 🙏

Gist

GitHub Gist: instantly share code, notes, and snippets.

vast karma
#

Did you install react devtools

swift seal
#

Yeah I enabled it in Vencord settings and fully closed the discord app

dull magnet
#

it's often hidden behind overflow menu

vast karma
#

Are you certain you did a full restart?

swift seal
#

Yeah, well I can try again to see

#

oh god it appeared after I restarted, my bad

#

thank you

#

p sure I restarted the client that time tho

#

also that gist says it's superseded by official docs but uhhhh the docs are lacking most information said here or am I looking at the wrong docs or something

iron epoch
swift seal
iron epoch
#

is there a way to force update a plugin settings so it gets saved?

dull magnet
iron epoch
dull magnet
#

don't delete

iron epoch
#

should set it to undefined instead?

flint bronze
#

deleting doesn't even work to my knowledge

iron epoch
normal wagon
#

@flint bronze hey man can you dm me ?

flint bronze
#

my dms are open stop asking me to dm you

steep dirge
#

im trying to make a plugin that doesn't show desktop notifications unless it matches a criteria like sent by a specific user or contains a specific word. Is it possible to do this? im not sure where to start looking for information on this.

hushed loom
#

should be possible

#

idk where to look tho

steep dirge
#

on the userdocs the push notifications show only talk about ios and android, and i couldnt find anything for windows

hushed loom
#

you would find it in the desktop code

steep dirge
#

where do i find documentation on that

hushed loom
#

press ctrl+shift+i

hushed loom
#

there are some helpful pinned messages

steep dirge
#

the pinned comment mentions finding the function you want in the ui, but idk if there is a ui element that sends a notification

humble tulip
#

Isn't there a setting that turns push notifications on or off? Maybe you could look at what that toggles and where that setting is read

steep dirge
#

thank you

green vessel
#

How would I go about matching this in webpack chunk 766646? I'm trying to hook into the member role display, like this one.

#

Most of the guides I've seen have a much more descriptive name in the children attribute, which helps to match
but this takes in variable data and is just named s

#

even trying to match a()({ just to keep it simple still gives 117 matches

vast karma
#

="span",showOnFocus: would be the obvious one

#

But that component doesn't look very useful to patch, all it does is adding hiddenVisually xor showOnFocus classes

vast karma
#

According to the components module, it's simply called <HiddenVisually>

green vessel
#

I just checked again and yeah, I was actually looking for the upper component seemingly
i'm trying to make a plugin to allow someone to collapse the role list, so I'm just looking to append a button right next to the role list number

hushed loom
#

jus make it collapse on click

green vessel
#

oh yeah I could do that also

hushed loom
#

you could steal the channel category thing

green vessel
#

I was at least planning on stealing the down arrow from it

hushed loom
#

just steal the whole thing

#

or steal the pinned dms thing

green vessel
#

man im being reminded of how much I hate regex blobcatcozy

hushed loom
#

regex so good

#

i loved regex before i started writing a lot of patches

#

and patches have just made me love it even more

green vessel
#

and regex to me is just gibberish unless it's matching a raw string

vast karma
#

There's something oddly liberating in patching a complex context-free language with something as crude as regex

hushed loom
#

and the patch helper tab in vencord

green vessel
hushed loom
green vessel
#

no?

hushed loom
green vessel
#

all i know about is the companion extension

hushed loom
#

build with --dev --watch

#

and that tab shows up

#

||--watch alone didnt work for me||

green vessel
#

ah yeah I completely missed that

#

is there an easy way to append a common thing?
I don't really know how I would steal a different discord element, so I'm just trying to get a basic poc working at the moment

hushed loom
#

i was thinking of adding something like patch helper to companion

hushed loom
#

||assuming its exported||

cedar olive
#

ngl there's really no pont on using a webpack component for a collapsed thing

#

just make it manually it's a simple useState and a predicate to render elements

green vessel
#

yeaaaahh cat_thumbsup
I know what a predicate is but I have little to no experience with patching react apps

#

basically I have zero clue how I would even target an element
which is what I figured patching would be useful for
but now I have no idea lol

#

Seems like it's used at some point in the discord tutorial also, which makes it a little more annoying to find the exact element i need, but I'm pretty sure it's the Anonymous element, is that normal?

#

I'm pretty sure it at least means findComponentByCodeLazy won't work tannedcirno
because there's no component name to find

#

nevermind then, I found it

dull magnet
#

what do you want to find? is it exported?

green vessel
#

I want to just append an extra child to it

dull magnet
#

why do you want that

#

to patch it?

#

find* functions are for obtaining modules so you can use them yourself

you only need them if you wanna render them

#

if you want to add additional stuff, you need a patch

green vessel
dull magnet
#

you need a patch

green vessel
#

that's what im currently trying to do

#

I'm trying to even get it to throw an error to indicate that im actually changing stuff, but despite vencord companion saying the patch is okay, nothing is changing

#

and yes, the plugin is enabled and im using the right dist

#

i could be fundamentally misunderstanding something, but this should at least do something right?

    patches: [{
        find: ":z.roleIcon",
        replacement: {
            match: "z.roleIcon",
            replace: "z.whatever",
        }
    }],
hushed loom
#

use \i

green vessel
#

so basically I need to use regex now to lookbehind from here to here? Then I should just be able to inject something else into the second part of the ternary operator?
I could be vastly overcomplicating this but again, I suck at regex

dull magnet
#

lmao

green vessel
#

I mean to be fair there aren't really any docs to go off of here ;-;

dull magnet
#

what do you want to add

#

show a mspaint sample

green vessel
#

click minimizes role list
like how the channel list works

dull magnet
#

so you want to add after the - and the digit

green vessel
#

yeah pretty much

dull magnet
#

so u wanna add here

#

after s

#

s is the digit

#

the ternary is the role icon

green vessel
#

yup, but the problem is that z.roleIcon seemed to be the only unique thing I could find

dull magnet
#

match: /" -",\i/,

green vessel
#

would probably work for the match query, but the find query can't be a regex according to the type info

dull magnet
#

the find is good

#

find is used to identify the module

green vessel
#

ahh okay

dull magnet
#

patch acts on the found module

green vessel
dull magnet
#

don't copy paste what I gave you verbatim 😭

#

it's a special unicode -

#

copy from the module

green vessel
#

yeah I just checked again

dull magnet
#

it was just a suggestion

#

you're overcomplicating this a lot

green vessel
#

apparently that's an "invalid or unexpected token" though?

dull magnet
#

do you know how to use regex to replace text

green vessel
dull magnet
#

okay so

#

the match and replace is literally just code.replace(match, replace)

#

it's that simple

#

don't overcomplicate it

#

try to understand the code

then think of how to best achieve what you want. in your example, you need to insert a $self.renderThing()

#

think about where exactly you need to insert that code

#

and then just do it via regex replace

green vessel
#

alright

#

Alright i'm starting to get the hang of it, i'll see if I can get the rest done myself

#

progress!!

green vessel
#

Oh god discord why
roles aren't separated out into separate elements, it's all one huge list of divs, separated by h3 elements

#

How would I even go about iterating through sibling nodes using react? since im not allowed to do dom stuff, I assume that applies to iterating and setting styles on elements?

humble tulip
#

Could you find a way to filter the array that's providing the users it's rendering instead?

dull magnet
#

do you not know how react works?

green vessel
#

I have pretty limited knowledge of react itself, but I figured it would at least be something like

<div class="role1">...</div>
<div class="role2">...</div>
vast karma
#

It is, kinda

dull magnet
#
{role.members.map(m => (
    <div>{m.username}</div>
))}
#

the code looks something like this

vast karma
#

It's more like something like <Component1 value="something">content</Component1>

#

Or, in compiled code, (0, React.jsx)(Component1, { value: "something", children: "content" })

dull magnet
#

which transpiles to role.members.map(m => (0,r.jsx)("div", {}, m.username))

#

you need to find that in code and change the array before it's rendered

green vessel
#

hm
so basically every time someone presses the collapse button, I need to mutate the member list array, instead of just doing something like adding display: none?

#

and then reverse it when they press the expand button

vast karma
#

Or just make the function return nothing instead of mapping the list

#

Mutating stuff is so distasteful

dull magnet
#

but the way you'd do this in react is with a ternary

dull magnet
#

it renders the roleIcon only if l is not nullish

#

you need to find where discord renders the role members which will be a .map over an array

green vessel
#

ahh okay
that makes more sense

dull magnet
#

then change it to shouldShow ? members.map(...) : null

#

(well better would be be shouldShow && members.map())

green vessel
#

well luckily there are only two .maps in the entire module, and one of them is right below W.Z.Messages.MEMBERS_LIST_LANDMARK_LABEL, which sounds suspiciously like what im looking for blobcatcozy

dull magnet
#

if you're lucky it's in the same component and it's gonna be very easy to do

#

if it's in different components then it's gonna be hard

green vessel
#

Well I managed to get it kinda working, there are multiple caveats right now though

  1. I can't set the iterate amount to 0, because that gets rid of everything, including the header. Only 1+ works ;-;
  2. I'm not rendering the component again after the iterate amount is changed, it takes a couple seconds currently (not sure if I can?)
  3. Currently i'm not using the vencordstore to save stuff
  4. it's ugly
    I can fix problems 3 and 4 easily, but I don't know enough about react to fix the other two, maybe I could add a fake hidden user to every separate role?
#

Also discord freaks out when it doesn't expect the role list to be so short

dull magnet
#

u need to adjust their math

green vessel
dull magnet
#

don't use that function

#

findComponentByCodeLazy

#

settings.use()

#

in ur component

#

but that won't work well yeah

#

if you tweak settings in the modal it doesn't immediately update

#

we need to rework the settings modal

dusk kernel
#

is there a reason that fakenitro doesn't support soundboard? i'm thinking that you could get the audio file of the sound, and play that into the vc. is there some issue in that

swift delta
#

plus at that point wouldn’t it just be easier to use an external software and just google to sound you want

iron epoch
sharp cargo
#

Hello! I have been directed hero to ask for help making my plugin, I'm currently stuck trying to make it work as a plugin after I had made a js snippet because the snippet doesn't persist (the div is gone when changing channels/server). But basically what I'm trying to make is showing the current time in the members list because I use hidden taskbars so 99% of the time I actually never see the clock on my monitors. Here's the git https://github.com/AkiVonAkira/VencordCurrentTime soz for wall o' text

dusk kernel
#

that's weird

balmy sky
#

How much information can you get about a message with just the channel and message id? (if any at all)

#

I'm asking because i'm making a plugin to add more info to the message forwarding component

iron epoch
#

let's see-

dull magnet
#

discord already adds context when you can access it

#

so doubt you can do anything else

balmy sky
#

Yeahh i kinda thought as much

candid ice
#

Hello! Apologies for my inexperience, this is the first time I'm writing a vencord plugin 😅

I wanted to add an element after the Home / Servers separator, I found what I presume is the source for it:

function a() {
    return (0,
    i.jsx)(l.H, {
        children: (0,
        i.jsx)("div", {
            className: r.guildSeparator
        })
    })
}

My idea is to find r.guildSeparator and it works, but I don't really know what to do from here, I've tried looking at some examples but I can't seem to wrap my head around it

proud parrotBOT
candid ice
#

Oh, I did not know about that! I'll look into it, thanks :D

spice locust
#

I was trying to update my randomQuotes PR to work with the latest Discord fixes which broke Vencord a few months ago, and I am using loadingQuotes plugin as template.

My problem is, I think, that the async/fetching part takes too long and the HTML renders before it ends, hence the quote is not shown. The only hacky fix I could think of is to directly edit the HTML of the loading tip, but pretty sure this is not a good idea. Any guidance is welcome, and I'll provide any required info.

quotes.length = 0;
// quote() is an async function that handles the fetching of the quotes and returns a string.
quote().then(randomQuote => {
    quotes.push(currentQuote);
    quotes = [randomQuote];
    ////// Hacky fix: Edit the HTML //////
    // let elements = document.querySelectorAll('[class*="tip_"]');
    // elements.forEach((element) => {
    //     if (element != null)
    //     {
    //         element.textContent = randomQuote;
    //     }
    // });
});
vast karma
#

You'd use some react hook for that

spice locust
#

Just to clarify: the hacky fix works, thankfully, but I am looking for a better alternative.

vast karma
#

useState is quick and easy, but might not be the optimal one

spice locust
#

I'll try to research react hooks, then.

#

I mean, I do not work with JavaScript/TypeScript that much.

candid ice
rose fiber
flint bronze
#

All 2 components in Vencord that are injected like that don't take props

candid ice
#

I'll see to look more into the API package, didn't know it existed

#

Actually one last question before I go and keep working on my plugin, I tried embedding icons / css files into my plugin, but I don't think I'm able to? Do I have to embed things like SVGs or CSS code into the index.ts(x) file?

flint bronze
#

You can import CSS files, with SVGs just embed them in your script (must be .tsx)

candid ice
#

Oh okay, do I use like import "cssFileName"?

flint bronze
#

Yes

candid ice
#

Oh okay that makes a lot of sense! 😓 I don't know why I tried to use fetch("/file.css")

candid ice
#

can you use LESS/Sass syntax in imported CSS files?

vast karma
#

They're css, nothing else

candid ice
#

Alrighty, thanks.

spice locust
#

If I use a react hook, does this mean I have to modify whatever function handles the loading screen and explicitly return a compoment or whatever to actually use the variable?

flint bronze
#

The way you ask this is confusing

#

You need to put the hook inside of the component definition

spice locust
vast karma
#

Yes, you'd have to modify the component that renders that part

spice locust
#

I see, thank you.

candid ice
#

how does one go about making a context menu?

#

i.e. This is what I mean by context menu, is there a built-in API or do I have to make it from scratch?

vast karma
#

Check how discord makes the menu, do the same thing

#

Just like how do you do literally anything else

candid ice
#

I'm pretty new, do I just use react devtools to see how it's made?

rose fiber
spice locust
#

Is there any reference for replacing components/sub components?

candid ice
#

how can I manually open this modal?

iron epoch
#

you can set breakpoints

candid ice
iron epoch
#

where you won't be able to tell what's happening till you look into those functions source code

candid ice
#

It looks like this(?)

iron epoch
#

expend > props > onClick, than press function location

candid ice
#

oh yeah I have found that already, it calls c.Z.openCreateGuildModal

#

but I'm as stumped as before because I don't seem to be able to find c.Z even with ctrl+f

dull magnet
#

and it has the option to jump to the code

iron epoch
candid ice
iron epoch
iron epoch
iron epoch
candid ice
#

this knowledge is very useful

candid ice
#
patches: [
    {
        find: "guild-discover-button",
        replacement: {
            match: /return[\s\S]*?id:\s*"guild-discover-button"[\s\S]*?}\)/,
            replace: "return $self.OwnButtonUserManagement()"
        }
    }
],
```I am using `Test Patch` with the companion plugin and I'm getting `Patch failed: Replacement 1 failed: SyntaxError: Unexpected token ')'`
#

I am trying to replace an entire return for a button with my own button, as to override it

#
return (0,
i.jsx)(f.Z, {
    id: "guild-discover-button",
    ref: t,
    className: r,
    onClick: x,
    selected: n,
    tooltip: I.Z.Messages.DISCOVER,
    icon: s.CompassIcon,
    ...T
})
```This is the return itself
bronze dove
#

I guess the return[\s\S]* is matching more than you actually want

candid ice
#

I mean possibly, I'm expecting it to only match that one return because of the id

#

as it's matching return <anything> guild-discover-button <anything> })

candid ice
#

very faint but it works!

dull magnet
#

don't use [\s\S]

#

and you seem to have misunderstood lazy matching

#

your regex will find the very first return in the entire file, then match everything up to id:

candid ice
candid ice
dull magnet
#

there's no reason to ever use that

#

if you want that behaviour, use the dotall flag and .

#

but discord's code wont contain newlines

candid ice
#

Oh okay, thanks

iron epoch
#

how to detect onkeydown in a modal?

#

tried to pass onKeyDown to ModalContent, that didn't work neither wrapping the components in a div

dull magnet
hushed loom
candid ice
#

Is there a way to get information about the current user? (Profile name/icon, presence, etc?)

dull magnet
#

many plugins that do this

candid ice
#

Do you know of one?

#

I guess account panel server profile

hoary pilot
candid ice
#
const CSS_TEMPLATE_STRINGS = {
    ".SEL_CREATE_SERVER_BTN": "#app-mount > div.appAsidePanelWrapper_bd26cc > div.notAppAsidePanel_bd26cc > div.app_bd26cc > div > div.layers_d4b6c5.layers_a01fb1 > div > div > nav > ul > div.scroller_fea3ef.none_c49869.scrollerBase_c49869 > div.tutorialContainer_c96c45",
    ".SEL_NAV_FADE": "#app-mount > div.appAsidePanelWrapper_bd26cc > div.notAppAsidePanel_bd26cc > div.app_bd26cc > div > div.layers_d4b6c5.layers_a01fb1 > div > div > nav > ul > div.footer_aa1bff > div.gradient_aa1bff",
    ".SEL_NAV_BG": "#app-mount > div.appAsidePanelWrapper_bd26cc > div.notAppAsidePanel_bd26cc > div.app_bd26cc > div > div.layers_d4b6c5.layers_a01fb1 > div > div > nav > ul > div.footer_aa1bff",
    ...
};
```there must be a more version proof way of doing this (doing styling for some specific elements, replacing them in CSS to have more concise stylesheets)
vast karma
#

Just patch them to add unmangled classes

candid ice
vast karma
#

Patch the react components to add classes you can target

candid ice
oak sundial
#

Any idea how I would figure out where roles badges are rendered? I want to render them even when the appearance is set to compact but I have absolutely no idea how I would find what I'm looking for

#

where do I even start digging

oak sundial
#

i'm unsure which element I should start at

dull magnet
#

the role badge

#

idek what a role badge is

oak sundial
#

the cozy in this case

iron epoch
#

Nuckyz showed me a trick a while back, where I can open a module in separate tab which helps in searching for matchs and functions. how could I do that again?

hushed loom
#

wpex(moduelid)?

#

@simple folio

#

wrong person

#

@iron epoch

iron epoch
swift delta
#

what would be an easy way the render the first letter in the chat box uppercase

swift delta
iron epoch
swift delta
#

I read fy has "fuck you"

iron epoch
swift delta
#

I mean if you wanna try, like said this is my third time makin a plugin so my patch will prolly be fucked and bad

#

I dont even where to look for a good way to do this

iron epoch
swift delta
iron epoch
swift delta
#

actually

fathom pivotBOT
swift delta
chrome elbow
#

define whatever function

hushed loom
swift delta
#

actually im to tired for this ill do it in the morning, if he doesn’t pr it

hushed loom
#
export default definePlugin({
  name: "WriteUpperCase",
  description: "things",
  authors: [],
  settings,
  patches: [
{
find: "myFind",
replacment: {
match: /^./,
replace: "$self.myFunc(),$&"
}
],
  myFunc() {
console.log("1")
},
})
#

@swift delta

#

format that

#

i cant format and do everything in a codeblock 😭

swift delta
#
export default definePlugin({
    name: "WriteUpperCase",
    description: "Changes the first Letter of each Sentence in Message Inputs to Uppercase",
    authors: [Devs.Samwich,
    { name: "krystalskullofficial", id: 929208515883569182n },
    ],
    settings,
    patches: [
        {
            find: "Messages.CHANNEL_CHAT_HEADING",
            replacement: {
                match: /(memo\(func.{0,30})(let.{0,20}chatInputType:\i,.{0,25}}=(\i))/,
                replace: "$1$self.whatever($3);$2",
            }
        }
    ],
    start() {
        addPreSendListener(presendObject);
    },
    stop() {
        removePreSendListener(presendObject);
    }
});
hushed loom
#

export default definePlugin({
    name: "WriteUpperCase",
    description: "Changes the first Letter of each Sentence in Message Inputs to Uppercase",
    authors: [Devs.Samwich,
    { name: "krystalskullofficial", id: 929208515883569182n },
    ],
    settings,
    patches: [
        {
            find: "Messages.CHANNEL_CHAT_HEADING",
            replacement: {
                match: /(memo\(func.{0,30})(let.{0,20}chatInputType:\i,.{0,25}}=(\i))/,
                replace: "$1$self.whatever($3);$2",
            }
        }
    ],
    whatever() {
      console.log("Do Something");
    },
    start() {
        addPreSendListener(presendObject);
    },
    stop() {
        removePreSendListener(presendObject);
    }
#

@swift delta

swift delta
#

okai that works

iron epoch
swift delta
iron epoch
#

mb.

iron epoch
iron epoch
# swift delta <:glorp:1284328406812590121>

you would want to access textValue and modify it.

{
    find: "\"Only Ref objects are supported\"",
    replacement: {
        match: /(\.memo\(\i\.forwardRef\(func.{0,10})var/,
        replace: "$1$self.whatever(arguments[0]);var"
    }
}
#

ex

function whatever(props){
  props.textValue = "indi"
}
swift delta
#

Fuck we are back at square one of crashing

#

I cant do this iam to tired, ill do it late unless what to pr it

iron epoch
swift delta
flint bronze
swift delta
balmy sky
fathom pivotBOT
swift delta
#

plus you purged this plug-in off the face of the planet, I had a call up on God to be able to find it and resurrected it.

sly mist
#

am i wasting my time in adding an rsa mode to InvisibleChat?

#

my thinking is that aes passwords could be exchanged via rsa every x days

iron epoch
#

conditional breakpoints are so op

hollow condor
#

can i use codeberg for the git repo too?

#

or any other forgejo instance?

cedar olive
hoary pilot
swift delta
fallen sandal
#

host forgejo on github pages

swift delta
hoary pilot
#

@fallen sandal @fallen sandal I will host you on github pages

amber mantle
#

vfjd?

shrewd tundraBOT
amber mantle
#

shoot

swift delta
#

vfjd?

shrewd tundraBOT
swift delta
#

give me 10mins

rocky falcon
shrewd tundraBOT
rocky falcon
remote kestrel
#

i just noticed something
the picture in picture plugin doesnt respect the video player volume

#

fixxx @dull magnet

hushed loom
#

is that the stream volume?

remote kestrel
#

wjar

hushed loom
#

oh, i thought you were talking about streams

#

never heard of the pip plugin before blobcatcozy

remote kestrel
#

guh

humble tulip
#

I made a plugin to replace embeds for things like twitter -> vxtwitter etc but it gets rate limited so fast
Also the settings component is a little bit scuffed but it is my first time actually making anything in react so I'll get there eventually

#

If you opened a channel with like 50 twitter links in it or something it'd just be sending 5 requests, waiting 30-ish seconds for like 5 minutes lol

fervent hedge
#

Is there anyway to block the user to close the modal by clicking "ESC" or clicking outside the modal?

flint bronze
#
openModal(()=>null, {onCloseRequest: () => { }})

something like this (don't run this if you don't want an invisible modal you can't close)

#

You can still close it with closeModal

#

openModal returns the closeModal key

fervent hedge
#

one more question, is there any way to dismiss an notification

#

outside the @api/Notifications?

#

A brief explanation of my problem:

I am creating a modal, so that the user needs to enter a string, and the plugin will check that string if it is correct or not, and in both situations it notifies the user through the notification system, but what ends up happening that the vencord notification system is working with queue, postponing when a user always enters the wrong string multiple times and then the right one, it will show for some time in the notification that the string they entered is wrong, until eventually the right one appears .

#

because the only function Im seeing is showNotification()

humble tulip
#

Does it have to be a notification? TextInput has an error prop that displays a red error text under the input box if you provide one, you could use that

hushed loom
fervent hedge
#

and yes the notification queueing one after other and not displaying correctly

#

When I click on the button, if the password is wrong, it will say that it is, the same will happen for a correct password.

However, if I spam the unlock button, notifications will be added to the QUEUE as it will not showing the correct one directly when passcode (string) is wrong or correct.

I just needed to clear the queue and dismiss notifications every time I click the button, is there any function for this?

humble tulip
#

I don't think you can, I think you're just gonna have to use another method of displaying that it's wrong

#

Or implement it yourself and PR suffoPeepoMischief

fervent hedge
#

well for now some notifications I do like these

#

just to you guys get some context, I'm trying to make a plugin that locks discord with a password, not the account one but one that you can specify, like an old betterdiscord plugin called passcodelock.

Anti Stupid Brothers and Kids trying to access ur pc to do shit :)

flint bronze
humble tulip
#

What happens when you run out of attempts lol

fervent hedge
fervent hedge
#

still things that I need to fix but I first want the main funcionality working

#

correctly without bugs

flint bronze
steady knot
#

you could also just make a css rule to html {display:none} making discord blank, and the only way to see it again is to toggle it off via devtools which only someone who knows how to do that would be able to

#

it also provides deniability so nobody knows it's done on purpose unlike something like a password prompt

green vessel
green vessel
vast karma
#

Also consider: not having such a loser as a lil bro

normal wagon
#

if you’re hiding stuff from your siblings or parents then clearly its something not good to begin with

#

i mean are you gonna be promoting the password on every new window you open or are you going to make it so you type in password and it temporarily suspends that and prompts again after a certain period of time

#

still has security risk

fervent hedge
#

im only trying to develop an plugin based on an betterdiscord old plugin that I not see in vencord

swift delta
normal wagon
#

there’s a password protect plugin that exist pretty sure it’s in third party

#

yep

normal wagon
swift delta
normal wagon
#

yep that’s where it would belong

normal wagon
#

there’s 4 attempts right

fervent hedge
#

it blocks for 300s

#

nothing than a refresh on discord clears the block

#

if im allowed i can show the code

#

im still need some ideias idk

swift delta
fervent hedge
oak sundial
#

not a substitute for real security

#

if you don't trust the people using your machine do not store login info

swift delta
#

I still have to say, though, and I will stand on the fact that it’s a pretty good premise, but it’s also one of those plug-ins that would be best as a #1256395889354997771 having no place being in actual Vencord

normal wagon
#

yea i know people can still find the file, but it’s better than someone just restarting client and bypassing client at least it adds some security

#

you should make it so people who know how to use inspect element can’t just delete your background screen, along with the box i mean that’s the fastest bypass probably cause all ur doing is adding a overlay

#

you’re not really disabling anything

#

oh and discord web exist btw so say goodbye to everything you did also you can disable the plugin, also

quaint cipher
#

i might be dumb but why does this error

export default definePlugin<PluginDef & { languages: Language[]; getAsset: AssetResolver; }>({

i want types for my custom properties in the plugin object

quaint cipher
iron epoch
#

lemme test in vscode

#

its fine for me

iron epoch
quaint cipher
#

also i dont think its possible

#

it uses regex in the build script

quaint cipher
quaint cipher
cedar olive
#

ah

#

maybe a satisfies statement after the obj?

#

just a workaround but im not sure if you can use there

quaint cipher
#

works fine thank u

cedar olive
#

lol

#

funny

empty jacinth
#

hey, i took a look at the code for PronounDB for #🏥-vencord-support-🏥 message
it looks like the patch for compact mode is also applying to "normal mode". would it make more sense to just remove the normal mode patch and have it just show pronouns next to display name? or to try to fix the compact mode patch to only work in compact mode?

dull magnet
#

the css just needs t obe fixed

empty jacinth
#

Well, I'm not experienced with Discord modding. I never got a response in #🏥-vencord-support-🏥 and idk if I'm supposed to make a GitHub issue since it says not to.

warped escarp
#

how can i update the message content and display embeds for any links that could be in the new message?

#

or well, the update message part is trivial it seems, but the embed stuff not so much

vast karma
#

Pretty sure embeds are server-side, aren't they?

#

So you'd have to replicate the link detection

#

And the data extraction, and the CORS

restive shell
#

hey, sorry if dumb question but is there an api for adding a reaction to a message

vast karma
#

That's probably just RestApi, and in many cases is probably selfbotting

restive shell
#

ah ok. didn't think that would count as selfbotting. good point, thank you

bronze dove
#

Adding a single reaction by user interaction isn't self botting for example

vast karma
#

But for example something that husks all husked messages would definitely be selfbot

restive shell
#

like for example if a person wrote like idk, hello in chat, responding with a wave emoji

vast karma
#

Yeah that sounds selfbot

restive shell
#

would that be?

#

ah ok

#

thank you

warped escarp
warped escarp
#

i tried to do a search through existing plugins but i couldn't find anything, how can i listen for new messages and intercept them before they land in the chat? i want to modify the content of the messages 😄

warped escarp
#

i am working on a plugin that uses gpg to encrypt/decrypt the chat messages

#

i managed to use addPreSendListener to modify outgoing messages

#

but i am looking for a way to now do the opposite

iron epoch
warped escarp
#

yeah but that only uses a password, and it doesn't seem to use proper encryption

vast karma
#

Or check how invisiblechat does it, even if your actual function is different

warped escarp
#

invisiblechat doesn't intercept messages, it only gives you a modal to send one

#

but i want it to be a seamless as possible, as long as you have someone's pubkey

warped escarp
warped escarp
#

not exactly, but closer

swift delta
#

ok sure then

warped escarp
#

well my plugin uses the system gpg agent

#

so you control the encryption keys

#

actually, encryptcord uses subtlecrypto so idk how that works, but i still would like it to work the way what i am doing it

#

its probably not very useful but i have friends that actually like this idea and im bored lol

hushed loom
#

prob not the best method

#

but its worth a shot

acoustic nest
#

do we have a quest blocker yet

#

or is that one of those css things

vast karma
#

I would have added them to my Anammox if I had ever seen one

flint bronze
#

I intend to add them to my plugin inspired by Anammox when they actually make quests that show up on Vesktop

#

i just remembered I was going to write a credits section in the readme for that

#

When did they change this to a right pointing arrow on connections?

vast karma
#

I fixed Anammox' patches for the emoji list and git button sometime last week btw, in case yours are also broken

vast karma
#

That's blurry

flint bronze
#

see the nulls

vast karma
#

Pretty

#

Where does that nulls come from?

flint bronze
#

They made all the names plural there (example: gif to gifs, sticker to stickers)

#

That was causing the crash