#🧩-plugin-development

1 messages · Page 57 of 1

dusk kernel
#

being fr

clear parcel
#

something this volatile shouldn't be 1st party

#

quite a lot of servers block zwc

#

so this isn't even close to a universal bypass

#

also you can use text replace for this p sure

swift delta
clear parcel
#

I don't think I've ever said that before

#

but that's literally all this is lol

#

there's no "bypass"

crisp basin
#

ok i kinda got this one. i'll try to get context menus working but later because it's like 6am right now for me lol

fast geyser
#

very nice

#

i've been wanting to code that, can't live without it after switching to vencord

acoustic nest
iron epoch
#

god

#

wow the time pass real fast

iron epoch
vapid latch
amber mantle
#

p much

flint bronze
vale spear
#

i wonder if i'm literally the only one working on improving this plugin atm

#

¯_(ツ)_/¯

#

new plugins being added to vencord:

#

meanwhile my pr

#

anyway it is time for my irregularly scheduled check-in regarding my PR @dull magnet (and obligatory sorry to bother you)

flint bronze
#

am i insane

vale spear
#

are you on canary or smth

flint bronze
#

yes doesnt matter

#

i am fucking up react stuff ok

vale spear
#

ah

vale spear
flint bronze
#

thats fucking stupid

#

why can't you use the {name:name} === {name} with imports

#

its not even that

#

its that react wasnt even loaded

#

well

#

it loaded properly

#

i know what it is

#

fucks sake

vale spear
#

mans went through all 5 stages of grief

flint bronze
#

it's MenuGroup not passing down extra arguments

#

even worse

#

there's this cope sitting right below it

flint bronze
#

😭

flint bronze
#

i fixed my plugin

#

and

#

I have learned the hard way

#

that

#

Discord does NOT cache emojis

#

nvm i'm retarded

#

What the fuck

dull magnet
flint bronze
#

please

#

seek some help

#

like wtf did i just read

dull magnet
#

what's wrong

flint bronze
#

nothing husk

dapper valve
#

i want to make a typing test for discord so you can see how fast you typed messages. is there anything i can use to detect more input other than using keydown on the input textbox or whatever its called

vapid latch
#

keyup

indigo ferry
#

Is there a way to modify QuickCSS?

vapid latch
#

from a plugin, not really, what would you want to modify

#

if its relating to LSP throwing errors with nesting or :has(), its a long standing issue that we're waiting for someone at microsoft to merge into monaco

dapper valve
# vapid latch `keyup`

oh ok and sry if this is a stupid question but is there any way to always get the message input element?

#

I looked at the better upload plugin and it refers to the plus button for images with a specific name

vapid latch
#

patch to extract it out when its created

indigo ferry
vapid latch
dapper valve
vapid latch
#

you should theoretically be able to just do $self.whatever=whatever

dull magnet
#
// disable quick css
Vencord.Settings.useQuickCss = false

// disable online themes
Vencord.Settings.themeLinks = [];

// disable offline themes
Vencord.Settings.enabledThemes = []
#

@indigo ferry

#

just need to keep backup of the previous state

indigo ferry
#

alr

#

would this be a good plugin idea?

vapid latch
dull magnet
#

well someone made a theme that hides most vencord stuff

#

i don't really think making every plugin add code to hide itself is viable

#

way too tedious for something so niche

#

why do you care so much about showing client mod stuff in screenshots

just make sure the server you're in isn't uber cringe (if it is, whyare you talking there in the first place)

#

and if you really want a vanilla screenshot, it's probably best to instead keep a second vanilla install of discord

indigo ferry
vapid latch
#

I would never modify my Discord™️ client because that would be a no-no and against ToS. I'm a good girl who would never modify their Discord™️ client and publicly talk about it on Twitter.

dull magnet
#

(i sent a video with vencord & vesktop to discord staff a few days ago and they didn't even mention it meowlien)

vapid latch
#

well yeah they know you

dull magnet
#

I kinda wonder how many discord staff will see vendicated and realise who i am

indigo ferry
#

i heard a rumor going around like that

dull magnet
#

well just earlier I found out that there's a discord staff who starred the vencord repo lmao

indigo ferry
#

mb

dull magnet
#

crazy staff

#

im not gonna say who cause some annoying kid is gonna read these messages and snitch and I don't wanna get that staff in trouble

indigo ferry
#

discord doesn't care about modified clients, they care about them getting too popular if they allow them and being able to bypass nitro

#

if imma be honest

dull magnet
#

not even that

indigo ferry
#

some discord staff are probs why they aren't actively banning modded clients

vapid latch
#

discord just doesnt care unless its actually being used maliciously

dull magnet
#

i don't have any data to back this up but i would assume that the client mod population has a way higher ratio of nitro subscriptions than non client modders

and someone who installs a client mod for fake nitro likely wouldn't have ever bought nitro in the first place

#

so there's really no reason for them to care

vapid latch
#

they had the betterttv dev as one of their devs since near the beginning for years on end, it would be hypocritical for them to actually take action against client mods

#

miss you night o7

indigo ferry
#

if the discord ceo could, he would

#

there's no debating

dull magnet
#

could what

#

ban client modders?

#

they absolutely can lol

vapid latch
#

jason may be stupid on certain things when it comes to internal work politics and testing the waters with shit like crypto integration but i feel like he wouldnt axe off a good majority of the userbase just for "you broke tos, cope"

#

he more than likely realizes thats bad publicity

dull magnet
#

just push code to discord

if (window.Vencord) reportCurrentUser()
vapid latch
#
if (window.Vencord) HTTP.post(Endpoints.BAN_ME);
indigo ferry
#

I remember how I sent a ss with a modified client badge in it and a discord server helper (the official server) said "is that a platform indicator?" then when I deleted my image they deleted their message 😭

vapid latch
#

official servers are just the worst because they get people that moderate that are so out of touch with the community if not just take it too seriously with brand integration

dull magnet
#

just think about it from a logical standpoint

there are millions of people who use client modders. i would assume that client modders make up a good portion of discords most avid users, power users. so many of them will be nitro subs

if they banned all of them, it would produce massive backlash and they would lose many of their most loyal users. and many nitro subs

for what gain? emotional high ground?

#

there is no reason to ban someone unless they actively cause harm

which is why we have actually malicious plugins banned

vapid latch
#

there was some stupid change in like 2017/2018 that i dont remember that i bandwagoned with cancelling nitro over and its like, why did that even matter

dull magnet
#

but there will always be a very slim non zero chance of getting banned cause you're breaking tos after all. if you're not okay with that you probably shouldn't be using mods

but the odds are so low, it's much more likely that you'll get banned for other stuff like joking with your friends

#

"haha this you? [ip address]" has a much more realistic chance of getting u banned than client mods

vapid latch
#

or someone underage baiting you which still pisses me off

dull magnet
#

yeah it's stupid but the laws regarding that are strict

#

you can get into serious trouble if you don't follow child protection laws

#

so i understand their standpoint

vapid latch
#

i get that, but theres a fundemental flaw in the fact that t&s dont get to see the pre-edited content of the message

#

thats the part that annoys me the most about the entire ordeal

dull magnet
vapid latch
#

or just lack of context in general

#

yeah

dull magnet
#

horror

#

well at least you can appeal age bans by proving your age

vapid latch
#

just hope it doesnt end up on a holiday or when they're out of office

dull magnet
#

the EU should implement some digital passport kinda deal that companies can use to verify your age without requiring access to personal info like your id

#

basically you can have your entire passpoint online and there should be some sort of oauth where you can choose exactly which info you need

so for example discord could ask for only the date of birth

paypal could ask for your name and dob and address

etc

#

it'd be cool tbh

vapid latch
#

neat idea but i still feel like theres still some people that would take issue to it but thats kind of expected

indigo ferry
#

vee can you pay for my plan ticket outta the usa 🙏

vapid latch
#

sorry you're stuck here cope

indigo ferry
#

the usa is collapsing in our life time

#

which is crazy

dull magnet
vapid latch
dull magnet
#

would be so much better than shenanigans like having to send discord support a picture of your passport

vapid latch
#

i committed identity fraud to verify my bot

indigo ferry
#

tbh

#

if my bot gets over 100 servers

#

im fucked

#

i dont have an ID, passport, nothing

vapid latch
#

and then i didnt even care to attempt to apply for message content intent and swapped apps tr

indigo ferry
#

i dont even have my birth certificate at my house

vapid latch
#

under 18?

indigo ferry
#

yes

vapid latch
#

i think you can still get a state id at 16 without having to apply for a drivers permit idr

dull magnet
#

honestly i don't think i mind discord making you verify your identity for large bots

as long as they take good care of it and don't use it for anything besides verification and legal purposes

indigo ferry
#

im 14

#

i heard you can get around verification if you add someone onto your team who can verify the bot

#

dk tho

vapid latch
#

This webpage is designed to serve as a resource for youth experiencing homelessness or those assisting them in understanding individual state requirements for obtaining a valid government-issued photo identification or ID.
For youth experiencing homelessness seeking to obtain a valid government-issued photo ID, there are four common and critical...

indigo ferry
vapid latch
#

yeah that site is fucked wtf

amber mantle
#

the two most fucked states

#

alabama and alaska

fallen flint
#

does anybody know how discord decides what ?size parameter to use for user avatars? trying to find the largest possible version of images and don't really want to repetitively fetch with different size values

tropic ice
fallen flint
#

ig not

tropic ice
#

when using view avatar, the few people i just tried were all 4096

fallen flint
#

also when i try to use 4090 it sends back 400

tropic ice
#

you mean 4096?

fallen flint
#

yeah

#

hm

#

wait

#

thanks lol, sorry for my stupidity

tropic ice
#

@round bobcat

#

tested on alt

#

used a 2x2 pfp

#

it's kinda weird

flint bronze
#

not really sure where to post this, but what 3rd party plugins do people recommend using the most

#

@iron epoch I probably sound schizophrenic saying this but #1032200195582197831 message has a custom expression picker tab, I had wanted to build an expression picker api, would you mind if I used your code for that?

#

what do you mean you already made one

#

i thought you were just shoving your code directly into the cookieclicker plugin

#

i really regret looking at your code

#

did you learn js/ts purely for vencord plugins

#

because it really feels like it

iron epoch
flint bronze
#

good luck lmao

#

you would need to recommit all of that

#

because uhhhhh

#

oh

#

or cherry pick

flint bronze
iron epoch
flint bronze
#

like

#

wtf happened here

iron epoch
flint bronze
#

...

#

ok

iron epoch
#

I was going to ping you and Nuckyz anyways because the code is awful

flint bronze
#

oh

iron epoch
#

I am rn improving the awful patchs locally then going to commit them to a new branch

flint bronze
#

fun

#

also

#

TabApi or whatever you called it

iron epoch
#

yeah?

flint bronze
#

could probably do with a more descriptive name

iron epoch
#

I am listening for any criticism

flint bronze
#

meanwhile i am worried that I am being too rude

iron epoch
iron epoch
#

oh my god. my code is awful husk

frosty otter
#

uhhhh mmmm

balmy sky
#

Did the context menu api get changed? all of plugins buttons have stopped appearing in the context menu after an update a while back

flint bronze
#

Yes

balmy sky
#

Oof

flint bronze
#

Where there is a function returning another function in your patch remove one of those functions

balmy sky
#

R/ihadastroke

flint bronze
#

it really would be easier

#

if I showed you the diff

#

of when it was changed

balmy sky
#

Yes please do

#

Hold on i'll check out the way you define conext menu patches because i haven't done them in AGES

flint bronze
#

Also there's a contextMenus field added into plugins

flint bronze
balmy sky
#

Oh i'll just read the definePlugin source again hold on

#

Oh wow that's so much easier lmao

balmy sky
#

Oh this is so much easier lmao

#

Thanks

flint bronze
#

exploding so hard rn

flint bronze
#

well

flint bronze
#

finally

tropic ice
#

is that a file preview?

dapper valve
iron epoch
#

will Nuckyz mind if I ping her? idk if she will be interested

iron epoch
#

while I am waiting and avoiding to do my homework(aka updating my old plugins).
going to make the idea that you indirectly/unconditionally gave me

iron epoch
#

me again, how do I not force restart when my plugin is off? I don't want the window of "those plugins... restart..."

jagged briar
#

what?

#

if your plugin has patches it has to restart

iron epoch
#
Vencord.Settings.plugins[$self.name].enabled ? $self.AppendButton($2, $4) : null
jagged briar
#

remove the enabled check

#

it's useless since you have to restart anyway

#

afaik there's no way to disable that if you have patches

iron epoch
#

damnit, alr

#

but can I like force restart?

#

no asking, just force the user to restart

jagged briar
#

why do you need to do that

cedar olive
iron epoch
#

a plugin

cedar olive
#

and the plugin still has patches after making it use the api?

iron epoch
cedar olive
#

show it

iron epoch
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2024 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Button, ButtonLooks } from "@webpack/common";
import styles from "./style.css?managed";
import { disableStyle, enableStyle } from "@api/Styles";

function AppendButton(codeblock, r) {
    return <Button
        look={ButtonLooks.INVERTED}
        onClick={() => console.log("hello" + Math.random())}
        className="qs-quickcss-append-button"
        size=""><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="green" viewBox="0 0 24 24"><path fill="currentColor" d="M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z"></path><path fill="currentColor" d="M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z"></path><path fill="currentColor" d="M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z"></path></svg></Button>;
}

export default definePlugin({
    name: "quickSnippet",
    description: "append css snippets quickly to quickCss with one click!",
    authors: [Devs.iamme],
    patches: [
        {
            find: "codeBlock:{react(",
            replacement: {
                match: /(codeBlock:\{react\((\i),(\i),(\i)\)\{.+?),children:(\(0,(\i)\.jsx\)\((\i),\{text:(\i)\.content\}\))/,
                replace: "$1,children:[$5, Vencord.Settings.plugins[$self.name].enabled ? $self.AppendButton($2, $4) : null]"
            }
        }
    ],
    AppendButton: AppendButton,
    start: async () => enableStyle(styles),
    stop: async () => disableStyle(styles)

});
cedar olive
#

oh

#

yeah you dont the enabled check

#

and no way for it to not require a restart because it uses a patch

#

the plugin is obligated to be enabled when discord starts for the patch to apply

flint bronze
iron epoch
#

but thanks

#

@cedar olive while you are here, can I ask you to look into something else?

cedar olive
#

but that code will never run without a restart

#

when the user enables the plugin after, the place you patch has likely already run without your patched code

#

so it will never try to even add your button

iron epoch
#

oh you got it all wrong

cedar olive
#

that's why the user needs to restart, so the code is patched and the new modified version is run

#

you mean when disabling?

iron epoch
cedar olive
#

that would work but at the same time it's not a practice we do

#

all plugins that require a patch will require a restart to disable too

#

so we don't need to write logic for every single thing

iron epoch
#

thanks nuckyz for the feedback

iron epoch
cedar olive
#

not now, sorry

iron epoch
#

oh okay, that's alright

jagged briar
iron epoch
flint bronze
#

no

#

but

#

i am making a replacement for quick css

iron epoch
#

how would that be possible? quickcss seems perfect

flint bronze
iron epoch
#

oh, yeah that's true..

jagged briar
#

ngl thats real

flint bronze
#

that is literally the only reason I am developing a replacement

iron epoch
#

this seems exciting, can't wait to see it

flint bronze
#

the todo:

make editor load properly
inject CSS into the page
clean up the UI

jagged briar
#

is this a plugin or a core update

flint bronze
#

core update blobcatcozy

vale spear
#

moreusertags just broke (i think the stable one did as well) so i'm working on fixing it

#

at least in my pr

cedar olive
#

already fixed

#

in dev

vale spear
#

alr

next leaf
#

how do i add custom commands including options and text replace? (e.g. i want to make a /url command with the options title and url, that sends [§title](§url) (while obviously replacing the § variables) into wherever u use the command (inspired by kaomoji and textreplace plugin)

balmy sky
next leaf
#

any examples of plugins to look at?

#

kaomoji wont work cuz it doesnt implement variables/user input

balmy sky
#

Petpet

next leaf
#

yup

#

what function do i use to send the message?

#

sendMessage expects a channel id and idk how to retrieve that

dull magnet
#

you're asking really basic questions that you could easily answer by yourself

balmy sky
#

^

dull magnet
#

find usages of that function in the code and see how they do it

#

and look at all plugins that register command

#

a simple global project find in vscode will find everything

next leaf
#

tho i got it now

dull magnet
#

i have adhd too and wrote most of this codebase you have no excuseblobcatcozy

next leaf
#

f*ck

#

whats the keybind for dev console again?

dull magnet
#
next leaf
#

when i use the command it does nothing

#

no message, no console error

#

and yes i have enabled the plugin in my settings

#

anyone? pls?

iron epoch
next leaf
#

i magically made it work

#

tho how do i turn my options into required options?

#

i cant rly do options: [RequiredMessageOption] cuz i wanna give the options custom names and descriptions

balmy sky
#

Bruh

next leaf
#

ik i suck </3

balmy sky
#

I don't fully understand patching yet, so id like to ask a question- if i wanted to patch the src property of this image in a component, what's the best thing to set the match to, instead of just src: E, so it doesn't get replaced when the value names change?

dull magnet
#

identifiers can be matched with \i

#

but to guarantee you match the right need you need to be a bit more specific, for example also capture the __invalid_ringArt

flint bronze
#

^^^

#

i would also recommend avoiding explicitly defining the alt attribute in your match

#

do a .{0,10} or something like that

balmy sky
#

Oh i get it now, thanks

cedar marsh
amber mantle
#

u can just check the code trol

proud parrotBOT
iron epoch
#

guys, I am unable to patch a module, I am sure the patch works as I tested it in the patch helper

{
    find: "PROFILE_BIO_RULES:",
    replacement: {
        match: /(PROFILE_BIO_RULES):(\i)/,
        replace: "$1:$self.addRules($2)"
    }
}
#

but the plugin doesn't seem to do the patch

#

I am sure the module is getting loaded because its responsible for the markdowns

vapid latch
#

vencord plugins load too late for markdown patching to be possible without having to recreate the parsers after the fact

dull magnet
#

wdym

iron epoch
dull magnet
#

make sure your plugin is enabled

iron epoch
vapid latch
#

it still would be nice to have a markdown library but its just annoying that theres no way to get it to work without recreating parsers

#

and adding webpack interop support for one (1) feature would probably be unfavored

iron epoch
#

and right about this either

#

welp

#

code blocks and mention will never be possible in vencord 😔

here the code if someone is interested

export default definePlugin({
    name: "MoreRules",
    description: "added more Markdown Rules",
    authors: [Devs.iamme],
    patch: [
        {
            find: "PROFILE_BIO_RULES:",
            replacement: {
                match: /(PROFILE_BIO_RULES):(\i)/,
                replace: "$1:$self.addRules($2)"
            }
        }
    ],
    addRules: (rules) => {
        console.log("\n" * 2);
        console.log("RULES:", rules);
        console.log("\n" * 2);
        return rules;
    },
    startAt: StartAt.Init
});
vapid latch
#

i dont get why your patch is failing

iron epoch
vapid latch
#

that shouldnt matter when it comes to patching

#

wait you're not isolating the module in that screenshot

#

you're just looking at the bundle

iron epoch
#

wh-

#

like bundle of modules?

#

that shouldn't matter right?

iron epoch
vapid latch
#

Vencord.Webpack.extract(428595) in console and then click that function it returns

#

then you'll see if its actually patched or not

iron epoch
#

alright, better then giving up that doesn't seem right at all

#

oh ye, I am still in init stage

dull magnet
#

the issue of it not patching some chunks should have been fixed ages ago

#

if not, maybe try again with the webpack-changes branch

iron epoch
#

alright going to check that out

cedar olive
#

It should be patching all chunks yeah

balmy sky
#

Where can i patch the audio that gets played in the wumpus "Chats can be alot" page? i've been looking for 2 hours but i literally just can't find it 💀

flint bronze
#

It's webpack module 778184 btw

#

just do a find for 044c6093a6ca7006430c

balmy sky
flint bronze
balmy sky
#

Omfg oops

flint bronze
#

i would patch it where its defined btw

balmy sky
#

Yee

#

I think i'm stupid

flint bronze
#

do not patch the webpack module id location

#

patch the string defining the asset

balmy sky
#

Ik, i just can't find module 778184 or the ./vibing_wumpus

flint bronze
flint bronze
#

i would assume that random filename stays the same

balmy sky
#

044c6093a6ca7006430c doesn't show up when i search sources either

#

It works in the patch helper but i'm not sure how to patch without seeing the source bruhsk

flint bronze
#

your regex should be /=.{0,10}"044c6093a6ca7006430c.mp3"/ or something like that

#

i would assume n.p here is /assets/

balmy sky
#

Brain aint braining oh god

amber mantle
#

venbot agrees

#

isnt that right

flint bronze
#

So why is it called local themes

#

when the enabled themes sync

#

and do that

cedar olive
#

that's a new thing that was added after you made your stuff

vapid latch
#

does that count for dependencies as well

cedar olive
#

prob yes

vapid latch
#

like if plugin a depends on api plugin b, and api plugin b is set to run the earliest it can, will plugin a automatically be set to run the earliest it can too?

cedar olive
#

no

#

you need to set plugin a manually

#

but it's no big deal honestly

vapid latch
#

guh

#

fair

cedar olive
#

you can also not depend on the start method and do something else

#

vencord runs early, you just need to make the thing you want run early too :)

vapid latch
cedar olive
#

easy with the new way to change how early the start method runs, but also doable in other ways

cedar olive
vapid latch
#

i personally see very little use cases where this would be an issue anyways

cedar olive
#

I agree with you

#

can't be more early than that haha

vapid latch
#

yeah that should be early enough

cedar olive
#

that's before discord has even initialized the webpack

vapid latch
#

yeah thats why i said that

#

is there already a keyword highlight plugin thats merged

cedar olive
#

nah

#

also I suppose not having to re-build the parser is going to save you a lot of trouble?

vapid latch
#

yes

amber mantle
#

highlight real

iron epoch
#

anyone has a good plugin idea for the penal api?

green vessel
quaint cipher
#

hai i wonder if this would be a good idea
the character count when you're close to hitting limit is a react component that will take the current character count in chat as prop and return null if its not close enough to the limit and otherwise it'll return the count and the "Send longer messages with Nitro"

#

i was thinking to add a character count visible all the time i could patch it and if it returns null then i'd return my component instead which would just be the count

#

so that way the "Send longer messages with Nitro" which is the normal behaviour would only appear when you're hitting the limit

#

is this a good approach?

quaint cipher
#

alternatively i could just remove the "Send longer messages with Nitro" thingy from the component as i doubt anyone would care but eh idk if that'd be bad to do as the plugin description would say it just adds a character count and wouldn't mention this side effect

#

actually this component is characters since your limit (2k for non nitro and 4k for nitro) so maybe i could add a different one for total chars not dependant of this one but i feel like having 2 counters could be confusing

cedar marsh
#

Is there a good reason why we don't have splitLargeMessages or should I make

#

Already basically made for my bot

cedar marsh
#

Ah

#

What if I made it so it just sends the first 2k characters (with smart detection of where to split) and keeps remaining in chat box, so you just press enter more than once

#

That way it's only making it easier to send what you want, but not botting

swift delta
#

I think it’s considered API abuse because you would be sending two requests back to back that quickly and it might get flagged

cedar marsh
#

It just tells you to slow down

swift delta
cedar marsh
#

It's not our problem if users decide to send 10+ 2000 character messages at once

swift delta
cedar marsh
#

I could just add a timeout after sending one, then have it increase with every subsequent message

swift delta
#

fair, but the selfbotting/api abuse is just what Vee said and i’m using weird logic to come to the same conclusion that Vee did. So unless you could implement some kind of client side slow mode I feel like there’s no way to get around Vee’s conclusion.

cedar marsh
#

I'll pr with a 2s slowmode cooldown after enter press

swift delta
#

i think the only way to get around Vee’s conclusion of Selfbotting/Api abuse is if you send the first part of the message then put a client-side slow mode before letting someone manually push the enter button to send the second part of the message

chrome elbow
#

i dont remember ven said that, just it's useless since discord allow you send as file

swift delta
#

that too, just 94% sure that’s what they said it was

swift delta
cedar marsh
dull magnet
#

i just think it's useless

swift delta
dull magnet
#

how often do you send more than 2k chars

swift delta
#

far point, I was just going off that because I was told by someone you did the time I bought it up

iron epoch
balmy sky
#

How could i get the message component for a fake/example message element to demonstrate smth?

jagged briar
#

wdym

#

just send a message?

balmy sky
#

Wha

amber mantle
#

render the message component yourself

#

or hijack botmessage iunno

jagged briar
#

ok that makes more sense but yeah rendering it yourself shouldn't be hard

visual rune
#

@dull magnet do u know what this part of messagelogger is for

#

it ignores the edit if the content matches the first item in editHistory, but why

dull magnet
#

because not every edit is a content edit

#

i assume

visual rune
dull magnet
#

idk check git blame to see who wrote that code and ask them

visual rune
#

says you co-authored it

dull magnet
#

it wasn't me who wrote it :p

granite wharf
#

if i added it there was some reason to
most likely to do with embed message updates

visual rune
granite wharf
#

most likely different things

#

it could be that one of those is a partial message object

#

try logging $2 and m during after link unfurling
i had issues with that for a bit

ripe smelt
#

I've been trying to figure out native.ts for a while and I got to the point where I'm stumped and curl is failing with the error of Warning: Failed to open the file No such file or directory Failure writing output to destination

import { execFile as cpExecFile } from "node:child_process";
import { readdir } from "fs/promises";
import { extname, join } from "path";
import { promisify } from "util";
const execFile = promisify(cpExecFile);

interface PluginInfo {
    name: string;
    downloadUrl: string;
    description: string;
    tags: string[];
    options: Record<string, any>;
    customInfo?: string;
    started?: boolean;
    authors?: string[];
}

const pluginsDir = join(__dirname, "../src/userplugins");

async function ensureDirectoryExists(dir: string) {
    const { mkdir } = await import("fs/promises");
    try {
        await mkdir(dir, { recursive: true });
    } catch (error) {
        console.error("Error creating directory:", error);
        throw new Error("Failed to create directory for plugins.");
    }
}

export async function installPlugin(_: any, plugin: PluginInfo): Promise<void> {
    await ensureDirectoryExists(pluginsDir);
    const pluginPath = join(pluginsDir, plugin.name.replace(/\s+/g, "_"));

    try {
        if (plugin.downloadUrl.endsWith(".git")) {
            await execFile("git", ["clone", plugin.downloadUrl, pluginPath]);
            console.log(`${plugin.name} has been successfully cloned.`);
        } else {
            const fileName = plugin.downloadUrl.split("/").pop() || "plugin";
            const filePath = join(pluginPath, fileName + (extname(fileName) ? "" : ".zip"));
            await execFile("curl", ["-L", plugin.downloadUrl, "-o", filePath]);
            console.log(`${plugin.name} has been successfully downloaded.`);
        }
    } catch (error) {
        console.error(`Error installing ${plugin.name}:`, error);
        throw new Error(`Installation failed for ${plugin.name}: ${error}`);
    }
}
jagged briar
#

why are you making a third party plugin installer

amber mantle
#

huh i thought the same

#

everyone does it or wants to do it without knowing the repercussions doing such thing will have

jagged briar
#

without knowing that the entire purpose of vencord is to not have this

flint bronze
#

90% of messages after an announcement of "easy 3rd party plugin installation" will be

  • how do i install plugin
  • what does this plugin do
  • why isnt this plugin working
  • why do i get [obvious error]
green vessel
#

Real

dull magnet
#

use fetch()

flint bronze
#

i was only worried about the git clone instead of using branches and merging

#

but also conflicts husk

ripe smelt
#

plus it's an opportunity to get familiar with typescript and working with electron

ripe smelt
ripe smelt
ripe smelt
flint bronze
#

i have a stupid question

ripe smelt
flint bronze
#

have you considered this wont work because end users of this will not have git or pnpm or node or anything like that

ripe smelt
#

Well at that point all the plugin could do is give them an error telling them to install it or redirect to a guide or something

#

however, since it's unlikely this would ever get published to vencord, people would have to download this as a 3rd party plug-in, so they should have git and pnpm downloaded by then

flint bronze
ripe smelt
#

thank you

amber mantle
#

i guess for lazy people that use a devbuild already it would be fine

queen sedge
#

not for a plugin, just running this in console, but is there an equiv of Vencord.Webpack.Common.EmojiStore.getDisambiguatedEmojiContext().emojisById for stickers? wanting to archive all emojis + stickers on my account before i leave some servers

#

nvm got it, Vencord.Webpack.findStore("StickersStore").stickerMetadata

green vessel
amber mantle
#

pnpm build*

#

me when i do it all in the console

#

git clone cd build taskkill start

stiff dragon
#
(from logger / response)
{"application_id":null,"avatar":"7c82584dd82b41b2ddb83a2348a7d457","channel_id":"1170555935396216834","guild_id":"1170555933819154472","id":"1217572863100321853","name":"cool webhook","type":1,"token":"xfYO5sSEqMvB6xYNiYZaQC22J0F_uKlY-zbq2IvzyiIyGcXA78Ub668WqRh7ww2X_TZo","url":"https://discord.com/api/webhooks/1217572863100321853/xfYO5sSEqMvB6xYNiYZaQC22J0F_uKlY-zbq2IvzyiIyGcXA78Ub668WqRh7ww2X_TZo"}

index.ts:66 An Error occurred while executing command "webhook info" TypeError: Cannot read properties of undefined (reading 'id')
    at index.tsx:73:85
    at async Object.execute (index.tsx:69:17)
    at async eval (WebpackModule287746:2:7209)```
#

im confused

#

oh

#

wait

#

wait no

#

ahhhh

#

they got rid of user.id when fetching with token

#

lovely

green vessel
#

I think I added ing to signify it's an action or smth

#

Idk

next leaf
#

guys how does messagelogger store messages and how would i change the code to make it store the messages permanently in a custom file location?

silent edge
next leaf
#

ye ik

#

but like every friend group needs a paranoid creep

#

and im that person

#

especially cuz my friend group consists of me, myself and i

silent edge
#

im paranoid as shit and even i think something like that is going too far

next leaf
#

well

#

if people dont want me to see smth dont send it in the first place

#

and i hate people lying to me

#

and im paranoid about it

#

cuz that stuff rly broke me

dull magnet
silent edge
dull magnet
next leaf
next leaf
#

nvm smart me searched for "messagelogger" instead of "logger" which was the problem

next leaf
#

anyone knows why the "Browse" button in Enhanced Message Logger doesnt work?

#

it says "Failed to update directory"

next leaf
#

well i fixed that

#

tho next problem for another small plugin im making

#

my goal is to select the box where the user enters text, but idk what method to use for that

flint bronze
#

use a ref

next leaf
flint bronze
#

it even has an example for focusing a textboz

next leaf
#

ngl i never used react xd

flint bronze
#

dont feel bad

#

i didnt

#

I was scared of react once

jagged briar
#

i still am

next leaf
#

so am i

next leaf
flint bronze
next leaf
#

im struggling :sobs:

honest stump
#

Does the multi option in <SearchableSelect /> just not work?

<SearchableSelect
  options={[
    { label: "Dark", value: SearchState.DARK },
    { label: "Light", value: SearchState.LIGHT },
  ]}
  placeholder={"Tags"}
  closeOnSelect={false}
  multi={true}
  onChange={(e) => setFilterState(e as SearchState)}
/>

No matter what I do it never selects more than one option

might be cause of my usage of onChange but uh blobcatcozy

woven lion
#

why are you using that for two options

honest stump
balmy sky
#

Is it possible to enable the purple streaming status without having a streaming rpc? i'm trying to make a plugin that adds it to the status options but i can't even find where you can toggle it NAH

honest stump
#

I love Discord (if its already known ignore my presence blobcatcozy)

amber mantle
#

you love shitcord

#

the gif picker no one uses in the edit profile page also half works when you have favoritegifsfirst on

#

actually just kidding it works again

#

apparently theres just no way to get to favorites from there otherwise lmao

dry patio
#

maybe some day

honest stump
#

do you guys think that the ability to hide the dearrow button would be a good idea, i mean its helpful but i dont want to pr for literally one line blobcatcozy

honest stump
silent edge
#

like disabling the thumbnail getting dearrowed

#

so u only have the modified titles

honest stump
#

youre reading my mind wtf

silent edge
#

im guessing that means ur working on it so thats good :D

honest stump
ruby turtle
#

sorry if I'm being a little dumb, but is there a event that gets fired when Save & Closed is pressed?

flint bronze
#

what saved & closed are you talking about

#

in plugin settings?

ruby turtle
#

yeah in plugin settings sorry

flint bronze
#

for that you can use the onChange method

#

in a plugin setting definition

#

it will ONLY be called from the settings menu save button

#

overwriting settings.store.setting will NOT automatically call that

ruby turtle
flint bronze
#

isnt that because you write directly to the store though

ripe smelt
#

is it possible to download and unzip/extract a rar via native.ts?

vapid latch
#

if you can find a library for it, but why do you need to?

honest stump
#

i think theyre building a plugin downloader

ripe smelt
#

^

dull magnet
#

don't use rar

#

use zip or better yet asar

#

then yes

indigo ferry
#

use rawr instead

ripe smelt
#

i meant zip mb

vapid latch
#

asar best bet because then its just apart of electron

dull magnet
#

electron has native support for asar

and there's an unzip library included in vencord already

vapid latch
#

the bonus of using asar is you dont even need to extract it

ripe smelt
#

ah, I'll look into that then. thank you

flint bronze
#

asar very cursed if you look into it though

vapid latch
#

how so

#

the only cursed part is redirecting node:fs

#

other than that the format itself is just an offshoot of tar

flint bronze
vapid latch
dull magnet
#

yeah asar is cool tbh

#

super simple yet powerful format

honest stump
#

why does reviewdb have an option to remove reviews

#

isnt the whole purpose of reviews to not remove your own reviews

jagged briar
#

That’s the only reason why is still on Vencord

dull magnet
#

its main purpose is being a fun plugin

swift delta
swift delta
# honest stump You can report them

I might be able to report them, but I don’t wanna wait however long it takes for the mods to remove it, when they’re basically calling me slurs in the reviews

dull magnet
#

that and there's only so much reporting can do

#

it might be that there's a review on your profile that isn't offensive but you absolutely hate the person and don't want them there

#

like an ex or a stalker

swift delta
jagged briar
#

I got bad reviews because I denied people’s decors and they complained about it

#

That’s why I opted out

swift delta
jagged briar
#

That only works on the dashboard

#

If you do it through the discord bot it doesn’t redact it

swift delta
#

understandable

signal hemlock
#

does vencord have a consistent way to define styles e.g. with a framework or should I just use style={}

jagged briar
#

And if you are modifying discord styles then you should make it managed so it turns on/off with your plugin

signal hemlock
#

how do i apply the css file

#

just import it?

swift delta
#

import "./style.css";

signal hemlock
#

okay that works

#

but i'm having trouble with the <Textarea> component (imported from @webpack/common)

#

it's not setting the default value I pass as children

#

this is my code so far:

<TextArea onChange={console.log} name="code" placeholder="console.log('Hello world!');">testest</TextArea>
#

this is what i'm getting

dull magnet
#

yeah dont use children like that

#

you'll want to use the value: prop

signal hemlock
#

i found patch helper and copied from that

dull magnet
#

got it to work?

signal hemlock
#

yup

#

actually is there any way to highlight the value of the textarea

#

like quickcss but without the fancy stuff

dull magnet
#

like syntax highlighting?

signal hemlock
#

yeah

dull magnet
#

depends

#

readonly is easy with discord's parser

#

if you want it to be readwrite then you should use monaco (the quickcss editor)

signal hemlock
#

is there a way to easily embed this bc i want it to be part of the settings modal

#

and not open in a new window

dull magnet
#

what exactly are u making

signal hemlock
#

script snippets

#

we discussed in dms like a year ago

jagged briar
#

True but im not gonna redact myself from every review

worthy rose
dull magnet
potent fox
signal hemlock
#

what does ApplicationCommandInputType do

dull magnet
#

ignore the rest

worthy rose
amber mantle
#
  • i dont use it
green vessel
balmy sky
balmy sky
honest stump
dull magnet
#

it's not interesting

#

just irrelevant

green vessel
balmy sky
vapid latch
ripe smelt
#

I've been trying to get the search bar to work but I just keep getting "Rendered fewer hooks than expected. This may be caused by an accidental early return statement". I tried using a plain HTML text box and it works there, but it doesn't work with <TextInput>

#
function ExtraPluginsTab() {
    const [searchValue, setSearchValue] = React.useState({ value: "", status: SearchStatus.ALL });
    const pluginFilter = (plugin: PluginInfo) => {
        if (searchValue.status === SearchStatus.CUSTOM && !customPlugins.some(p => p.name === plugin.name)) return false;
        if (searchValue.status === SearchStatus.PRESET && !presetPlugins.some(p => p.name === plugin.name)) return false;
        if (!searchValue.value.length) return true;

        const v = searchValue.value.toLowerCase();
        return (
            plugin.name.toLowerCase().includes(v) ||
            plugin.description.toLowerCase().includes(v) ||
            plugin.tags?.some(t => t.toLowerCase().includes(v))
        );
    };

    const onSearch = (query: string) => setSearchValue(prev => ({ ...prev, value: query }));
    const onStatusChange = (status: SearchStatus) => setSearchValue(prev => ({ ...prev, status }));

    return (
        <SettingsTab title="Plugin Repo">
            <Forms.FormTitle tag="h5" className={classes(Margins.top20, Margins.bottom8)}>
                Filters
            </Forms.FormTitle>

            <div className={cl("filter-controls")}>
                <TextInput autoFocus value={searchValue.value} placeholder="Search for a plugin..." onChange={onSearch} className={Margins.bottom20} />
                <div className={InputStyles.inputWrapper}>
                    <Select
                        options={[
                            { label: "Show All", value: SearchStatus.ALL, default: true },
                            { label: "Show Custom", value: SearchStatus.CUSTOM },
                            { label: "Show Preset", value: SearchStatus.PRESET },
                        ]}
                        serialize={String}
                        select={onStatusChange}
                        isSelected={v => v === searchValue.status}
                        closeOnSelect={true}
                    />
    </div>
</div>
...```
dull magnet
#

this shouldnt error

ripe smelt
noble rose
#

vee deleted one line and now plugin broke for app users, do i just push a fix to the same branch i made?

chrome elbow
#

make another pr

flint bronze
#

then open another PR

#

make sure your branch is up to date with what vee changed though

dull magnet
#

i replaced it with the download property

#

which makes the browser download it instead of opening the url

drowsy chasm
#

yes
which breaks it if you're trying to download it through the discord app

noble rose
#

^ that

dull magnet
#

eh?

noble rose
#

i'll do it the second i can, currently busy with urgent assignments!

drowsy chasm
#

the button does nothing

dull magnet
#

i tried it in vesktop and it worked 🥺

#

we will force all users to switch to vesktop

drowsy chasm
dull magnet
noble rose
#

Either way learning a lot from contributing to vencord, thanks vee.

karmic marsh
#

😭

amber basin
#

app.use(cors())

#

assuming thats express

#

dont put ur middleware in each route

karmic marsh
#

alr

steady knot
#

so uhh dumb question; I used to have replytimestamp as a userplugin that I had slightly modified but I think I want to use the one that's now integrated; how would I go about modifying the timestamp format the best way (I want seconds in it)

vapid latch
#

look at moment.js docs for valid format strings

steady knot
#

yeah but if I change it in the src what happens

#

when it gets updated or something

vapid latch
#

...it changes?

#

make it a different filename if it conflicts with being a userplugin?

#

alternatively just pr an option for seconds

#

or custom time format entirely

steady knot
#

I did have a modified format for the userplugin but I was wondering if it's now merged, the userplugin might not get updated anymore and the one in /plugins will get updates so not sure what the best way to go about this would be; copy it as userplugin and keep it up to date myself (not ideal) or if I can just somehow override it with my plugin

#

not sure it makes sense to PR an option for seconds when there's no merged plugin for seconds in timestamps in general that would be weird (also I can't code)

amber basin
#

lmao

amber mantle
#

lol

swift delta
# amber basin

I think reaching out on an email about something is a new to me

amber basin
#

yeah lmfao

#

also its on one of my cobu prs

#

i used it for like a week

#

they must have been digging for that

amber basin
#

i just remembered, not the first time this has happened :p

#

person found my fork of an alternative discord client that added qr code auth

visual rune
flint bronze
flint bronze
#

should I try working on a video loop plugin? I know it's been attempted before btw

gloomy terrace
#

picture in picture for embed videos when (basically YouTube links)

amber mantle
#

i thought there was one

#

unless my devbuild is schizo lol

flint bronze
amber mantle
#

DONT star that LOOL

flint bronze
#

not the videos

#

too bad

amber mantle
#

well they said videos

#

xd

flint bronze
#

i mean

amber mantle
#

embed videos as in

flint bronze
#

the embedded youtube player

amber mantle
#

oh

#

maybe

#

shouldnt be hard ~~but why dont you open it in a real browser blobcatcozy ~~

gloomy terrace
#

I had another idea, but I'll make a different plugin request later
you can't open audio files in an actual browser like you'd do with videos, so a PiP mode for these might be useful idk

flint bronze
#

blame discord's http headers they send

gloomy terrace
#

I already blame discord for too many things SKULL_SKELETON

#

I have a question though
Is it possible to make a plugin that skips the opening browser part when saving files?

gloomy terrace
#

Might request that later as well, cuz I'm tired of having to open 20 tabs when I'm working on a project

worn karma
#

I have been unsuccessfully trying to fetch members by their ID. I have also tried to subscribe to GUILD_MEMBERS_CHUNK & GUILD_MEMBER_UPDATE events to see if anything is coming in, with no luck. I have also tried without the promise chaining with no luck either.

Does anyone have an idea about what's wrong here?

const nicknames: (string | undefined)[] = [];
FluxDispatcher.dispatch({
  type: "GUILD_MEMBERS_REQUEST",
  guildIds: [guildId],
  userIds: userIds,
}).then(() => {
  userIds.map(id => nicknames.push(GuildMemberStore.getMember(guildId!, id)?.nick));
});
console.log(nicknames);
#

Current result of the above is just an array of undefined's.

dull magnet
worn karma
dull magnet
#

provide more context

worn karma
#

Is this only supposed to work inside a react component?

dull magnet
#

if you want the list of members once it's done fetching you also need to await the gateway event of chunk fetch success

#

look at implicit relationships

#

but it's way easier if u do it in a react component

worn karma
#

Ahhh I see, that must be the missing piece

#

Thank you!

dull magnet
#

what are u trying to do anyway

honest stump
#

I'm trying to get the message author of the reacted message, I saw the moyai plugin use messageAuthorId for MESSAGE_REACTION_ADD

however when I try to access it it returns always undefined, am I missing something?

however logs show that it exists as property

MESSAGE_REACTION_ADD({ channelId, guildId, userId, messageAuthorId, emoji }) {
  const currentUser = UserStore.getCurrentUser();
  console.log(messageAuthorId, currentUser.id);
}

im a little confused, appreciate any help

#

my current fix is just fetching the message manually but thats a meh solution

dull magnet
#

you don't seem to be destructuring right

honest stump
#

moyai also returns undefined, either its just my stupidity or smth else

vapid latch
#

oh wait i see now

#

you can either patch the flux event to take in message_author_id (kinda stupid to do it just for one plugin) or just MessageStore.getMessage(event.channelId, event.messageId).author.id

honest stump
ripe smelt
dull magnet
ripe smelt
#

export default wrapTab(ExtraPluginsTab, "Plugin Repo");

#

and then index.tsx just pushes into the Vencord section in settings:

async start() {
    const customSettingsSections = (
        Vencord.Plugins.plugins.Settings as any as {
            customSections: ((ID: Record<string, unknown>) => any)[];
        }
    ).customSections;

    customSettingsSections.push(() => ({
        section: "PluginRepo",
        label: "Plugin Repo",
        element: require("./ExtraPluginsTab").default,
        className: "vc-plugin0-repo",
    }));
}```
dull magnet
#

idk skill issue

#

shouldnt happen

ripe smelt
#

Imma try reinstalling dev build from scratch and see what happens

#

yeah it still crashes, so it has to be something with the code somewhere

ripe smelt
# dull magnet shouldnt happen

turns out it was just because the function that renders the install button used multiple hooks (useState and useEffect) and was in the same file instead of being a separate component

balmy sky
#

How could i get/set profile data like pfp, banner, pronouns, bio, etc? I'm trying to make a profile preset saver system but i have no idea where to start

balmy sky
frosty otter
#

this might also be useful

frosty otter
#

the field names are nearly the same as in the settings

dull magnet
#

don't send the request manually and don't manually bother with proto

dull magnet
frosty otter
dull magnet
#

no

#

UserSettingsActionCreators.PreloadedUserSettingsActionCreators.getCurrentValue()

frosty otter
dull magnet
#

if the client is already using something then you don't need to manually fetch it

#

that just makes it harder on yourself and potentially makes you seem sus to antispam

clear parcel
#

profile stuff isnt in proto settings

frosty otter
clear parcel
#

yeah HTTP.patch({url: "/users/@me/profile", body: {}}) is best here

dull magnet
#

there's probably a func for that too

dull magnet
clear parcel
#

no point bothering

frosty otter
stiff cargo
#

Also the CSS in the PR is completely borked now, that does however present the option of just removing it completely and just changing the src like it's already doing

silk sorrel
#

use a css property instead style="--something: url('....')"

orchid shard
#

is it possible to change what audio channel/device discord is using for screenshares? I use Elgato's Wavelink and discord uses the Monitor-mix... which includes the discord audio
opened a support ticket half a year ago and they said its a "known issue" but no fix :P

cobalt radish
#

hey, I want to learn about how to make a plugin.. I have checked the repository for some examples but im really confused about how would I run my own custom code

#

is there any guides or documentation for that?

stiff cargo
#
{
    find: ".LABEL_WITH_ONLINE_STATUS",
    replacement: {
        match: /(src:null!=\i\?(\i).{1,50}"aria-hidden":!0)/,
        replace: "$1,\"style\":{\"--large-avatar-url\":\"url(\"+$2.replace(/\\d+$/,$self.settings.store.imgSize)+\")\"}"
    }
}
#

this feels cursed

cobalt radish
#

from what I got so far, I need to compile the whole to add a plugin?

steady knot
#

yep

cobalt radish
#

oh, nice, I think I managed it

#

is there a mor epractical way to re-deploy and test that does not require restarting the client?

#

or I need to build and inject every time?

dull magnet
#

build yes inject no

#

but use pnpm watch command

woeful oak
#

is tsx supported for plugins?

dull magnet
#

check the existing plugins and you'll see

woeful oak
cobalt radish
cobalt radish
#

@dull magnet is there a documentation for development?

#

Im trying to get familiar with it by looking at how some plugins work, but it would be really nice if there was somewhere to check how it works

#

who wrote that? ShibeLaugh

cobalt radish
#

that helps

cobalt radish
#

thanks

clear parcel
dull magnet
#

that's some of the oldest code in vencord

#

back then you still had to install from source

#

without gui installer

clear parcel
#

ven so silly

clear parcel
#

less support

dull magnet
#

omg cute

dull magnet
#

shortly after swc explosion

clear parcel
#

what if i change the bundler again

dull magnet
amber mantle
#

o7 real

clear parcel
#

horror

cobalt radish
#

I need some help, im still trying to understand how to do a patch
from what I got the replacement is where you can make so it repalces a piece of code with a different code, for which I can do $self.someFunction so it points to a function in the plugin file

#

correct?

#

but what is the find section of the patch?

#

Im trying to do something basic, to find the text input and add a onClick to it as a way to learn how to do it

cobalt radish
#

I tried this repalcement:

replacement: {
                match: /(parent: r,)/,
                replace: "$1,onClick:()=> $self.testHandler();",
            }

and I think it is about right, but I don't know what to put on the find

sand ember
sand ember
cobalt radish
#

for example, I want to add a onClick to the text field, what should I do to figure out what to place on the find in order to get the correct module?

sand ember
#

first of all you need to find the module manually. aither bress ctrl+shift+f ind devtools and search for things that are related to what you are searching for, or use react devtools or breakpoints

cobalt radish
#

yes, I think I found it with the react dev tools

sand ember
#

now you need to find something specific to this module that isn't in any other modules so vencord will patch only this module and not some other random ones

cobalt radish
sand ember
#

yes

cobalt radish
#

makes sense

#

I'll try thankyou so much =)

#

@sand ember when it is successfully patched, are the patched code visible when I navigate to it via the dev tools?

sand ember
#

idk

cobalt radish
#

fair

dull magnet
proud parrotBOT
jovial field
#

does anybody know the different values for status (e.g. online, idle) when using FluxDispatcher for "USER_SETTINGS_PROTO_UPDATE"?
edit: i've tried various values, like 'online', 'idle', 'dnd' but suspect it might use different integers hmm

dull magnet
#

show what you tried

jovial field
#
function updateStatus(status: any) {
    const desiredStatus = status ?? settings.store.chosenStatus;
    const proto = UserSettingsActionCreators.PreloadedUserSettingsActionCreators.ProtoClass.create();
    proto.status = desiredStatus;
    if (desiredStatus !== typeof undefined) {
        FluxDispatcher.dispatch({
            type: "USER_SETTINGS_PROTO_UPDATE",
            local: true,
            partial: true,
            settings: {
                type: 1,
                proto: {
                    status: desiredStatus,
                }
            }
        });
    }
}
#

unsure how to format with color 😭

#

settings.store.chosenStatus is either 'online', 'idle' or 'dnd'

cobalt radish
dull magnet
#

anyway dont do that lol

#

react devtools inspect this

#

see what it does

frosty otter
#

this also works (credits to vee)

const setStatus = findByCode(".USER_STATUS_UPDATED")
setStatus("dnd", null, { location: { section: "Account Panel", object: "Avatar"} });
jovial field
#

woah i'll check it out

dull magnet
dull magnet
#

whenever you need to find something, think about whether there is a ui element inside discord that does what you want

#

in your case, you want tochange the status programatically, so you need to look at what this does

#

so you need to inspect that element with React Devtools to see what it does onClick / onSelect, etc...

#

just adapt to your use and you'll easily find most stuff

jovial field
#

holy moly that is very informative, i will make sure to use this strategy. i have used the sources and components tab until now, but i see how the functions work now as well

#

i didn't understand how the breakpoints were of use at first, thanks for the help! ska_capoonod

#

the status picker is a little silly because the elements collapse in the components tab when the different status UI elements disappear from view

dull magnet
#

yeah its tough to inspect that

#

you can use the custom status option instead :p

#

it opens a modal with save button

dull magnet
worthy frost
#

would it be possible to automatically insert text into the message textinput if so, how?

dull magnet
#

see how QuickMention plugin does it

worthy frost
worthy frost
#

where are the did-you-know splash texts stored?

amber mantle
#

hashed in the loadingtexts plugin

#

loadingquotes*

worthy frost
#

tyty

tropic ice
whole cosmos
#

Looking for feedback, is this patch robust enough?

amber mantle
#

horror

#

you can just enable ignoreactivity and turn it off for re-volt

#

what is skulling me

#

@fresh raptor

whole cosmos
#

self bot

amber mantle
#

vban @fresh raptor selfbot lmaoooo

shrewd tundraBOT
whole cosmos
#

lmaoo

amber mantle
#

i did it a couple days ago

whole cosmos
#

But what if you are a revolt gamer and use revolt and discord?

amber mantle
#

wdym

#

it wont show (assuming you have their rich presence off lool)

whole cosmos
#

Mmm, true

#

Regardless, i want to get some feedback because it's my first time learning how to patch thing

#

even if i can just disable the activity

dull magnet
#

don't capture the entire match in a group

#

you can use $& to get the entire match

whole cosmos
#

Oh yeah, you're right! thank you

#
{
  match: /setObservedGamesCallback\(.{1,2},(.{1,2})=>{/,
  replace: "$&$1=$1.filter((x)=>x.id!=='498994022048727050'||(x.id==='498994022048727050'&&!x.exePath.contains('revolt-desktop/revolt.exe')));",
};
green vessel
#

Fair

ionic breach
#

Yea they just typed +:skull: in the channel every time someone spoke

#

Could do it with a macro easy