#👾-core-development

1 messages · Page 130 of 1

crude hearth
#

missing 3 at end

turbid hatch
#

its one digit too short

austere talon
#

ve void guild.getMember("287555395151593473").edit({ nick: "​mantikafasi" })

nimble pendantBOT
# austere talon ve void guild.getMember("287555395151593473").edit({ nick: "​mantikafasi" })
TypeError: guild.getMember(...).edit is not a function
    at eval (eval at execute (/home/vendy/Vaius/dist/index.js:132:30), <anonymous>:1:44)
    at Object.execute (/home/vendy/Vaius/dist/index.js:132:30)
    at Client.<anonymous> (/home/vendy/Vaius/dist/index.js:706:17)
    at Client.emit (node:events:529:35)
    at Client.emit (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/util/TypedEmitter.js:15:22)
    at Shard.onDispatch (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:566:29)
    at Shard.onPacket (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:1064:27)
    at Shard.onWSMessage (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:1265:29)
    at WebSocket.emit (node:events:517:28)
    at Receiver.receiverOnMessage (/home/vendy/Vaius/node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket.js:1184:20)```
crude hearth
#

are you putting zero width char

austere talon
#

HHDJDJSJEJS

#

I will kill

crude hearth
#

ben cant code

austere talon
#

ve (await guild.getMember("287555395151593473")).edit({ nick: "​mantikafasi" })

verbal pumice
#

await my beloved

austere talon
#

finally

#

DIDN'T WORK

crude hearth
#

okay good

#

it has u200b

austere talon
#

why does discord strip

crude hearth
#

WHY IS MEMBERS TAB BROKEN

austere talon
#

fuck you discord

crude hearth
verbal pumice
#

whats the one character that did work

#

17b5 i think

crude hearth
#

wait it does

#

nvm

austere talon
#

it does

#

I DDOSED DISCORD ON ACCIDENT

#

why is it so slow

verbal pumice
#

"" accident ""

livid heath
#

do "\u3000mantikafasi" 👍

austere talon
#

ve (await guild.getMember("287555395151593473")).edit({ nick: "\u3000mantikafasi" })

austere talon
#

doesn't work

crude hearth
#

ve (await guild.getMember("287555395151593473")).edit({ nick: "\u3000" })

#

@austere talon fix

#

lets try all characters

#

\u3000\u0000\u0001\u0002"

crude raptor
#

what is hapepnig

crude hearth
#

better to not know

#

I always wanted to have u0094 in my username

#

”

verbal pumice
#

yeah \u17b5 works

austere talon
#

ve (await guild.getMember("287555395151593473")).edit({ nick: "\u17b5mantikafasi" })

austere talon
#

worked

crude hearth
austere talon
#

yop that's the point

#

we will add that to hoisters

crude hearth
#

donors take half of the members tab anyway

crude hearth
#

do

#

@austere talon I want tts command permission

lime stone
#

does that even still exist

#

I can't see it even on servers where i have adbmin

crude hearth
#

yes it exists

#

I tried and got yelled by my friends

lime stone
#

/tts balls

#

no perms

#

doesn't work in this server i created for testing either

crude hearth
#

exists for me idk

lime stone
#

huh

#

virus

charred monolithBOT
austere talon
#

minor issue with the site

main trout
#

Good

lime stone
#

yes

austere talon
#

mad?

turbid hatch
#

no ur phone just seems like its about to become an IED

austere talon
#

now im back to 200

lime stone
#

what

austere talon
#

no

lime stone
#

why do you need a plugin for something you can already do?

austere talon
lime stone
#

huhwhat

#

deleted messages?

#

that's not possible

austere talon
#

its not possible to retrieve all messages. doing so is api spam and against our rules

#

you can request your data package. it contains all your messages.

#

now stop talking about this here

charred monolithBOT
austere talon
#
charred monolithBOT
limber skiff
#
#

google.cat

spark pivot
limber skiff
#

nononono

#

google.cat

spark pivot
#

where are all the cats

limber skiff
#

google.cat

charred monolithBOT
charred monolithBOT
charred monolithBOT
dire trench
#

blud thinks hes jeremy clarkson

charred monolithBOT
#

I don't know if this is just a me issue, an issue with my install, or if i just screwed up installing something else but for whatever reason when I screenshare audio with vesktop, it creates the vencord-screen-share input, but it never gets any audio. It works when I use helvum to put audio into the input, but it doesn't work when I try to set it up through vesktop.
I am using arch-linux (here is neofetch)
![Screenshot_20231105_161006](https://github.com/Vencord/Vesktop/assets/68258945/f361...

junior olive
void echo
#

does it support freeBSD

charred monolithBOT
crude raptor
#

that is very pretty i'll admit

void echo
#

does the main branch get updated nightly with pulls or is it just whenever

charred monolithBOT
dire trench
#

@spark pivot should i resolve the conversations?

spark pivot
#

If you've fixed them then yes

charred monolithBOT
charred monolithBOT
dire trench
#

im pretty sure returning <></> does not create a dom node

austere talon
#

return null;

#

is the proper way

#

do not return a fragment

dire trench
#

ok

fair helm
#

add magane to vencord so i can use stickers from line ok ty https://magane.moe/

void echo
austere talon
#

the fact that they use svelte is really cursed tho lmao

turbid hatch
#

im surprised they havent just made a proper vencord plugin for it

#

i sorta want to make it official

crude raptor
#

do it- the more plugins the better imo- just make sure you do it right

turbid hatch
#

i mean we'd have to rewrite the whole thing

austere talon
crude raptor
#

oh maybe don't do that then

turbid hatch
#

its entire existence is a violation of the vencord coding standards

#

and is a terrible hack

#

so

crude raptor
#

oh you mean the magane thingy

turbid hatch
#

but it would be cool to have

#

yeah

charred monolithBOT
crude raptor
#

that checks out

austere talon
#

ive seen worse :p

#

ive seen plugins bundle massive libs like nodejs ws

turbid hatch
#

vomit

austere talon
#

i wonder why magane has so much code

#

it shouldnt really need too much code

#

it just adds a sticker picker clone, right?

#

except with line stickers

#

ya kinda

crude raptor
#

ok so doing magane itself seems completely unnecessary but modifying the sticker picker to have.. line? stickers- and also that favourites thing- would be cool

austere talon
#

i think it could be rewritten fairly simply using discord's components and stuff

crude raptor
#

yeah ok don't mind thre sticker i was checking you can't favourite them

#

which also like- why?? you can favourite emojis- and gifs-
though also all 3 of them have completely different UIs lmfao

crude raptor
#

how

austere talon
crude raptor
#

oh ok so you can it just... doesn't work the same way as emojis

#

why tf can't you alt+click them to favourite

rotund void
#

Is there a simplified guide for enabling third-party compatibility for Vencord that could be done by someone with fuck all experience with development outside of a class centered on visual basic of all things like 10 years ago?

#

I just wanna slide BetterFormatting Redux into my install lol

crude raptor
#

(btw random ass thing to bring up but im interested cause it has my contributions in it :3 do you reckon the textreplace pull request could be merged soon?)

void echo
#

its kinda... badly built?

#

idk if i should say that

#

but the end result is cool

austere talon
#

they do say its chaotic

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

elder garnet
frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

void echo
charred monolithBOT
elder garnet
void echo
dire trench
#

529 lines?

elder garnet
#

it's real

void echo
#

his css is almost worse

#
/**
 * @name BlurpleRecolor
 * @description Replaces Discord's native Blurple and Boost-Pink with your own Color
 * @author DevilBro
 * @version 1.0.0
 * @authorId 278543574059057154
 * @invite Jx3TjNS
 * @donate https://www.paypal.me/MircoWittrien
 * @patreon https://www.patreon.com/MircoWittrien
 * @website https://mwittrien.github.io/
 * @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Themes/BlurpleRecolor/
 * @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Themes/BlurpleRecolor/BlurpleRecolor.theme.css
 */

/* To change stuff like the colors, transparency and background image, change the variables inside the root {}, do NOT change the @import url() */

 @import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/BlurpleRecolor/BlurpleRecolor.css);

/* All colors are in RGB format (red, green, blue) use: https://www.google.com/search?q=colorpicker    */

:root {
    --accentcolor:            163,47,194;        /*    blurple        -    default:    88,101,242        */
    --accentcolor2:            225,115,180;    /*    boostpink    -    default:    255,115,250        */
    --linkcolor:            190,60,220;        /*    link        -    default:    0,176,244        */
}
#

this whole thing is just to replace blurple

#

with another color

#

check out the import

elder garnet
dire trench
#

who tf formats css like that

void echo
#

it must take actual effort to make it like that

#

surely it cant just be lack of knowledge

#

he has to being going out of his way to acheive this

elder garnet
#

I don't think so

dire trench
#

maximum readability

elder garnet
#

reject ! important
embrace #app-mount . class

dire trench
#

eslint gives me error Invalid header simple-header/header no matter what i do

#

anyone know how to fix this?

#

ive tried both scripts/header-new.txt and scripts/header-old.txt

charred monolithBOT
austere talon
#

why are u manually adding it

#

let eslint add it

dire trench
#

how

#

im just running pnpm test / pnpm run lint

vivid bough
#

do pnpm lint:fix

dire trench
vivid bough
#

np

austere talon
#

or better yet configure ur vscode to format and fix lint on save

#

:)

charred monolithBOT
misty raptor
#

yippee

livid heath
#

@misty raptor maybe separate inputs for separate regexes instead of separating by newline?

misty raptor
#

considered that at first

#

is it possible to dynamically add fields though

livid heath
#

text replace does it

misty raptor
#

oh it does didnt even realize

dire trench
austere talon
#

banned

misty raptor
#

ok thats definitely something i might do

dire trench
#

i have to manually run the tsc

#

i copy my vencord directory

austere talon
#

tsc????

dire trench
#

run npx tsc

austere talon
#

why tsc

#

wtf

grave mangoBOT
# livid heath https://github.com/Vendicated/Vencord/blob/main/src/plugins/textReplace/index.ts...

**index.tsx: **Lines 134-145

async function onChange(e: string, index: number, key: string) {
    if (index === rulesArray.length - 1)
        rulesArray.push(makeEmptyRule());

    rulesArray[index][key] = e;

    if (rulesArray[index].find === "" && rulesArray[index].replace === "" && rulesArray[index].onlyIfIncludes === "" && index !== rulesArray.length - 1)
        rulesArray.splice(index, 1);

    await DataStore.set(rulesKey, rulesArray);
    update();
}
dire trench
#

then when im done fixing i copy back over to the main and delete the copied directory

austere talon
#

please please please use vscode 😭

dire trench
#

i love native ui

livid heath
#

use lapce then

olive aurora
#

how the hell does tsc even work for you

#

we have esbuild plugins that vencord needs

dire trench
#

i only used it to check for typescript errors

#

if u actually try to build vencord with tsc it will not work

olive aurora
#

also like you can tsc --noEmit

#

for type checking

misty raptor
cunning canyon
livid heath
#

but UX blobcatcozy

misty raptor
#

i think a button is better ux

#

its more explicit

#

i didnt even know textreplace could do that thingy until it happened which is like not the best cuz u want the end user to understand everything as quick as possible

#
  • always having one blank field can make some people angry (like me)
livid heath
#
     patches: [{
         find: "isRawMessageMentioned:",
         replacement: {
-            match: /isRawMessageMentioned:function\(\){return (.{1,2}).{1,512}function \1\(.{1,512}?=(.{1,2});return/,
+            match: /(?<=isRawMessageMentioned:function\(\){return )(\i)/,
             replace: "e => Vencord.Plugins.plugins.KeywordNotify.contains(e, $1)"
         }
     }],
-     contains(e) {
+     contains(e, original) {
-        return regexes.some(a => e.rawMessage.content.match(new RegExp(a)));
+        return regexes.some(a => e.rawMessage.content.match(new RegExp(a))) || original(e);
     }

i think this is better

austere talon
livid heath
#

also instead of compiling regex on every message why not do it at once when you're splitting and and setting the datastore key?

austere talon
#

but please just use vscode 😭

#

why would you ever use np++

dire trench
#

np++ is 🔥

livid heath
dire trench
#

nah but jgrasp is on top

#

not even np++ beats that

austere talon
livid heath
#

i see

austere talon
livid heath
#

yeah i took a look

crude raptor
cunning canyon
#

yes

dire trench
livid heath
#

lapce is still in its early development, and rust gui is far from being mature

dire trench
#

i really dont want to use another web app

#

is vscode the only option?

livid heath
#

jetbrains maybe

surreal storm
#

yea it's cuz of WhoReacted

#

SearchReply seems to be broken btw

austere talon
#

it runs really well

crude raptor
#

it runs in a browser

#

(if yuo want)

dire trench
#

ill use it if i cant get lapce to work

vivid bough
surreal storm
#

i specifically searched this channel

vivid bough
#

oh

#

oh its a pretty easy fix. new update goes hard
findByProps('replyToMessage')

surreal storm
dire trench
#

Some of the telemetry code is accessible to the public, but according to Visual Studio Code maintainers, some telemetry functionality is also added to the program before it is released with a proprietary license.

#

microsoft moment

austere talon
#

Code Oss is free/libre

#

you can use code oss from arch repos or vscodium for a fully free version

dire trench
#

nah this is too far

austere talon
#

INSTALL VSCODIUM

dire trench
#

they want to know my exact coordinates

#

mfs bouta blow up my house

dapper crest
austere talon
#

why tf would u use wsl

dapper crest
#

Because I use windows and hate everything relating to programming in windows

dire trench
#

where does it get that from

#

the recommended part

cunning canyon
#

.vscode folder

spark pivot
#

or yknow

#

the eslint file

dapper crest
#

The "recommend" message is from vscode folder

charred monolithBOT
#

usually, when i'm in a discord call, it's with my partner, and both of us deafen each other since we speak over mumble and use discord's screensharing feature to watch youtube videos or play games.

in order to prevent having to close the screenshare and re-open a new one whenever either of us decide to do something else, we usually use the "entire system" option to capture all audio all of the time, and then i have to open helvum (pipewire patchbay) to disconnect mumble from vesktop, so t...

tidal cloud
#

they're amazing

#

well because of michaelsoft obviously but if you're a maintainer this is ballers

charred monolithBOT
charred monolithBOT
crude hearth
shy veldt
#

vs copium

jagged cloak
#

build vscode yourself without telem trolleyzoom

#

disclaimer i havent used codium for years so i dont know if thats still an issue

olive aurora
#

you can edit a json to make it work

#

the official extension store

charred monolithBOT
charred monolithBOT
woeful sable
#

are userplugins supposed to be missing from Vencord.Plugins.plugins?
i rlly need to call a plugin function from a patch and thats what some plugins seem to be using,,,

#

and assigning to window feels kinda wrong

verbal pumice
#

$self within a patch works perfectly fine

unique rivet
#

will getting the vencord actually work on mobile

verbal pumice
#

vns

nimble pendantBOT
unique rivet
#

o

charred monolithBOT
topaz thistle
austere talon
topaz thistle
#

Targets needs to be a list

#

Otherwise we'll get timing issues

#

And not sure if we can have multiple targets at once right now

charred monolithBOT
charred monolithBOT
woeful sable
topaz thistle
#

Working on it now

surreal storm
#

UrbanDictionary command doesn't show up, plugin is broke

cunning canyon
#

it works on my machine

surreal storm
#

me and a few others in ntts' server can't use it for some reason

#

oh that's weird

#

works here

#

idk

#

sorry lmao

#

maybe it's a perms thing somehow? no clue

#

i didn't think it would be thooo

charred monolithBOT
charred monolithBOT
topaz thistle
# charred monolith

@austere talon I'll try to push the minimum glibc to 2.35 and then make a new tag

charred monolithBOT
charred monolithBOT
charred monolithBOT
#
[Vencord/venmic] New tag created: v2.0.0
charred monolithBOT
shy veldt
#

what did bros cook

charred monolithBOT
acoustic scaffold
#

what work would be needed to add support for Vesktop to pnpm inject?

crude raptor
#

wtf mulv?

#

hello

acoustic scaffold
#

hello

#

wazzah

crude raptor
#

not much, i am very excited for textreplace to get updated tho

junior olive
#

you'd need to make the installer have a option to override vesktop's load dir

#

but u can just do that in vesktop

acoustic scaffold
#

hmm

#

Lol of course there's downtime when I try to do this

#

Hmm yes 50% of sessions so mobile is working but web/desktop is not, thanks discord

crude hearth
#

a

crude hearth
#

it was on different module why did it move trolley

austere talon
unkempt oak
#

how did i not know this was a thing 😭

austere talon
#

scroll down in vesktop settings..

dusky sonnet
unkempt oak
#

pnpm build --watch

dusky sonnet
#

oh neat

#

very good to know thanks :D

acoustic scaffold
#

apologies for being dumb

austere talon
#

why building

acoustic scaffold
#

oh there it goes

#

I am literally just stupid

unkempt oak
#

getUserAvatarURL:C works but getUserAvatarURL:\i doesn't 🥺

austere talon
#

you can't use \i in find if that's what you're doing

unkempt oak
#

oh yeah right that's not a regex

verbal pumice
#

test every module aganist a regex nothing could possibly go wrong

unkempt oak
#

is this a good enough of a patch

#

no wait oops

austere talon
#

don't use \w

unkempt oak
#

what should i use instead

verbal pumice
#

you literally just used it 5 minutes ago

austere talon
#

u already had it correct

#

why change it

unkempt oak
verbal pumice
#

also that patch doesnt look like it works lmao

austere talon
#

and yeah that replacement won't work

#

you can't use arguments in arrow func

unkempt oak
#

yeah I'm realizing there's a few typos I made

charred monolithBOT
#

Discord Account

lockieluke3389#5305

What happens when the bug or crash occurs?

The current installer(built from source)fails to install OpenASAR with Vencord

What is the expected behaviour?

An OpenASAR menu would appear in settings

How do you recreate this bug or crash?

  1. Install OpenASAR with Vencord Installer
  2. Restart Discord and go to settings
  3. OpenASAR menu is not there

Errors

No response

Request Agreement

  • [X] I am using Discord Stable or trie...
unkempt oak
#

although I guess i can still make it work using thag

verbal pumice
#

getUserAvatarURL:(/i),

#

mindblowing idea i know

unkempt oak
unkempt oak
#

thanks discord

#

ok i made the patch better ts { find: "getUserAvatarURL:", replacement: { match: /(getUserAvatarURL:)(\i),/, replace: "$1(user,anim,size)=>$self.patchGetAvatar(user)||$2(user,anim,size)," } }

nimble plaza
#

user, anim, and size would be minified no?

dusky sonnet
#

this is starting to look close to what i want to do...

nimble plaza
#

youd need to extend the patch to get them

dusky sonnet
#

is there a way to do a "before" patch?

charred monolithBOT
dusky sonnet
#

like i just want to change the arguments sent to a function

nimble plaza
#

patch the start of the function??

dusky sonnet
#

i have this written for BD and it would be fun to port it to vencord ```js
onStart() {
const module = WebpackModules.getByProps("getApplicationIconURL");
Patcher.before(module, "getUserAvatarURL", (thisObject, args) => {
if (args[2] === 80) {
args[2] = 300;
}
});
Logger.info("Plugin enabled!");
}

unkempt oak
#

the pre-patch is getUserAvatarURL:C

nimble plaza
#

yeah

#

where do user and those come from

austere talon
#

:C

unkempt oak
nimble plaza
nimble plaza
#

show the module

unkempt oak
#

idk what you mean it's literally just the arguments passed to the function

nimble plaza
#

they shouldnt be unminified like that

unkempt oak
dusky sonnet
#

i would still assume it would be possible to get the same result without monkeypatching

unkempt oak
#

yop

austere talon
unkempt oak
#

is there an online version of the patch helper so i dont have to build dev

dusky sonnet
austere talon
#

WHAT IS WRONG WITH MY MOUSE SENS

unkempt oak
dusky sonnet
#

good question lol

unkempt oak
#

i will make it

junior olive
#

i wish there was a patch helper outside of discord itself

austere talon
#

there kinda is

#

inside vscode

junior olive
#

the test find thing?

#

patch*

dusky sonnet
junior olive
#

i find patch helper's visualization of the patch to be extremely helpful

unkempt oak
#

same

austere talon
#

add it to the vscode ext :P

#

make it have a similar modal

unkempt oak
#

im so confused what extension

austere talon
junior olive
charred monolithBOT
jagged cloak
#

it's always been phinicky where the Test Patch/find options show up in my experience

#

but yes it exists

austere talon
#

it only supports plain patches

charred monolithBOT
austere talon
charred monolithBOT
jagged cloak
#

ic

austere talon
#

true throwaway-123456 moment

void echo
jagged cloak
#

not throwaway throwing away an entire plugin

nimble plaza
#

true throwaway-123456 moment

junior olive
void echo
#

Dev.throwaway-123456

dire trench
nimble plaza
#

thats what devs is

junior olive
#

why is it so typed

void echo
dire trench
#

they did [0n]

nimble plaza
#

yeah

junior olive
#

this seems overly complex

nimble plaza
#

it shouldve been {name: "", id: 0n}

dire trench
#

its either u use a dev constant or u specify name and id

nimble plaza
#

the thing is they wanna be anonymous

#

thats why 0n

#

they just failed

dire trench
#

yeah

void echo
#

I thought they were tryna stop the name and ID

nimble plaza
#

its never been

#

oh thats for preexisting plugins

rancid dragon
#

anonymity and ownership of a plugin dont really mix well

dire trench
void echo
#

if someone really wanted i guess they could ask to be anon

#

could just have an "anonymous" dev or wtv

nimble plaza
dire trench
#

oh if only it would get merged one day 🙏

void echo
junior olive
#

complaining ab it won't get them reviewed and merged any faster

void echo
#

wait could you not just... hide supers via css?

#

or just display them the same as regular ones

junior olive
#

that only really was finished like oct 20

#

but yeah

#

it has been awhile

unkempt oak
junior olive
#

nearing a month since i started working on decor again

dire trench
junior olive
#

great question probably far too many

austere talon
#

you have to add to Devs

#

you cannot use an inline object

#

you can just make the authors array empty ( maybe idk )

jagged cloak
#

you can do that

#

it'll just show +0 on the card and throw some error

dire trench
# void echo wait could you not just... hide supers via css?
[class*=reaction_] {
  animation: none !important;
  background: var(--background-secondary) !important;
}

[class*=burstGlow__],
[class*=effectsWrapper__] {
  display: none !important;
}

[class*=reactionCount_] {
  color: var(--interactive-normal) !important;
}

[class*=hideEmoji__] {
  opacity: 1 !important;
}
void echo
#

I think it does need to be done via a plugin

dire trench
void echo
void echo
# dire trench i think i fixed it
.reaction_fef95b[class*="reaction_"] {
  animation: none;
  background: var(--background-secondary);
}

.reaction_fef95b [class*="burstGlow__"],
.reaction_fef95b [class*="effectsWrapper__"] {
  display: none;
}

.reaction_fef95b [class*="reactionCount_"] {
  color: var(--interactive-normal);
}

.reaction_fef95b [class*="hideEmoji__"] {
  opacity: 1;
}
#

i had this which

#

i think is wrong

#

lol

#

is it a good idea to use selectors or js !important for quickcss

dire trench
#

id just use important for userstyles

void echo
#

@austere talon i tested throwaway's plugin tbf it works well

dire trench
#

SortFriendRequests broke

charred monolithBOT
charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function

Bad Starts

None

Discord Errors

None

austere talon
#

ooop

livid heath
charred monolithBOT
charred monolithBOT
dire trench
#

i only started getting these errors after i installed the eslint plugin for vscode

#

very annoying

#

auto fix does not solve the errors

#

pnpm lint does not give these errors
just the vscode plugin

limber skiff
#

try deleting the headers and let lint on save fix it

dire trench
limber skiff
#

whats the header its adding

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

odd

#

try restarting vscode

dire trench
charred monolithBOT
livid heath
dire trench
livid heath
#

lol

#

What about disabling and re-enabling eslint extension

dire trench
livid heath
#

damn

charred monolithBOT
charred monolithBOT
wise umbra
#

hey, how do I submit a idea?

#

I have an idea to hide the nitro badge beside the username and file uploads when this annoying experimental feature eventually rolled out of all of us

wise umbra
#

sorry, I am new to Vencord, how do I do that? Where do I modify the text?

cunning canyon
#

quick css

wise umbra
#

thx

charred monolithBOT
dire trench
#
{
    find: '"ProfileCustomizationPreview"',
    replacement: {
        match: /(let{.*?),?pendingThemeColors:(\i)(.*?),pendingProfileEffectID:(\i)(.*?}=(\i),?)/,
        replace: "$self.previewUpdate=Vencord.Webpack.Common.useReducer(()=>({}),{})[1];$1$3$5[$2,$4]=$self.profilePreviewHook($6),"
    }
}
#

so scuffed but works (only after the first user triggered update it seems) 💀

#

had to do this to force update the profile preview on the profiles settings page

#

anyone know a better way to do this?

charred monolithBOT
vivid bough
deep vector
#

its not working for me can anyone help me

#

vencord

livid heath
nimble pendantBOT
charred monolithBOT
charred monolithBOT
austere talon
#

wtf is that issue

charred monolithBOT
unkempt oak
austere talon
#

so vesktop starts where you closed it.

unkempt oak
#

ok but

austere talon
#

basic UX

unkempt oak
#

why not store that in like localstorage or something

austere talon
#

that makes no sense

#

why store nodejs state in the browser

unkempt oak
#

ok

#

didnt know it was a nodejs thing

austere talon
#

discord also stores it in their settings.json

grave mangoBOT
# austere talon https://github.com/Vencord/Vesktop/blob/main/src/main/mainWindow.ts#L314-L330

**mainWindow.ts: **Lines 314-330

function initWindowBoundsListeners(win: BrowserWindow) {
    const saveState = () => {
        Settings.store.maximized = win.isMaximized();
        Settings.store.minimized = win.isMinimized();
    };

    win.on("maximize", saveState);
    win.on("minimize", saveState);
    win.on("unmaximize", saveState);

    const saveBounds = () => {
        Settings.store.windowBounds = win.getBounds();
    };

    win.on("resize", saveBounds);
    win.on("move", saveBounds);
}
charred monolithBOT
toxic bough
#

Day 889893 of asking for a free avatar decor plugin 😇

livid heath
charred monolithBOT
ocean garden
#

I am writing a plugin to change/replace the message content that is displayed on the UI, if it matches certain conditions. Would the best way to do this be the patches way? What can I use for the .find parameter if so?

misty raptor
#

isn't there already a textreplace plugin?

ocean garden
#

If I understand how that works, that only replaces the messages you send by adding a presend hook right?

ocean garden
#

I want to replace stuff that's from other users too

#

say someone's message says "cat", I want to replace that with "dog" etc.

verbal pumice
#

you'd probably need to patch MessageStore and the handlers for MESSAGE_CREATE and MESSAGE_UPDATE

ocean garden
#

I took a look at the moyai plugin and tried to set the message.content to something else in the listener, but that didn't work, so ig I have to do a patch :P

charred monolithBOT
toxic bough
main trout
nimble pendantBOT
ocean garden
grave mangoBOT
grave mangoBOT
ocean garden
#

Ah I see, thanks for this <3

limber skiff
#

there is also another place you can patch

#

let me show you hold on

#

t.content is the raw message content

#

p is the rendered one after it has been parsed

#

you could modify t.content there

#

prob modify and not touch the original actually

grave mangoBOT
charred monolithBOT
#

almost all software needs to persist data to the disk. im not sure what you're expecting. just don't make it readonly

Almost all software cleanly separates user settings from application data though. Obviously you are going to need a place to cache stuff, but a settings.json shouldn't really change much beyond what the user does themselves.

Many people like to manage dotfiles in a central repo and one way of preventing drift is to make those dotfiles read-only. I don't see how NixOS i...

main trout
#

Scrumplex!!!!!!

ocean garden
charred monolithBOT
charred monolithBOT
charred monolithBOT
distant flax
#

thanks for merging that quickly

limber skiff
#

no problem lol

crude raptor
#

discord when they change something for no reason ?

grave mangoBOT
# dire trench sorry for the 10 hour delay https://github.com/ryan-0324/Vencord/blob/main/src/p...

**index.tsx: **Lines 429-441

profilePreviewHook(props: any): [[number, number], string] {
    let colors: [number, number] = props.pendingThemeColors;
    let effect: string = props.pendingProfileEffectID;
    if (preview) {
        if (primaryColor !== -1)
            colors = [primaryColor, accentColor === -1 ? primaryColor : accentColor];
        else if (accentColor !== -1)
            colors = [accentColor, accentColor];
        if (effectID !== "")
            effect = effectID;
    }
    return [colors, effect];
},
limber skiff
#

you should stop calling it a hook

#

it's not really one

dire trench
#

i wrote this while trying to get it to at least work

#

for some reason im only able to force update the component after at least one user triggered update has occured

dire trench
#

this is definitely not the best way to do this

charred monolithBOT
charred monolithBOT
#
  1. Maximize the window
  2. Minimize it (you can also close it afterwards, doesn't matter for the end effect)
  3. Double-click the Vesktop tray icon or use its Open action
    Result: the window is now in "windowed" state - neither maximized or minimized. Looks like it's always the windowed state stored prior to maximizing and minimizing doesn't store maximized state.
    Discord behavior, expected by me and present in the patch version of Vencord: the window opens as maximized.
dry barn
#

do i need smt special to see the react dev tools?

austere talon
charred monolithBOT
vivid bough
dire trench
#

if 3y3 Builder Preview is off, the theme colors and profile effect of the preview do not get changed

junior olive
dire trench
dire trench
#

ill try that

charred monolithBOT
#

i don't understand what you're trying to say, sorry

Judging by the interface definition of Settings there are several values that aren't really user settings like windows state or firstLaunch and skippedUpdate. Obviously these are gone trigger the save handler, without the user intending to.

Those would belong in separate state files preferably in .local/share

I would be happy to implement this and som...

little wing
#

is vencord crashing when using the inspect element mouse thing normal

#

it crashes and logged all accounts off

austere talon
little wing
#

okey

dire trench
charred monolithBOT
junior olive
charred monolithBOT
vivid bough
#

const previewUpdate = () => FluxDispatcher.dispatch({ type: "USER_SETTINGS_ACCOUNT_SUBMIT_SUCCESS" });

{
           find: '"ProfileCustomizationPreview"',
           replacement: {
               match: /let{.{1,500}pendingThemeColors.{1,500}pendingProfileEffectID/,
               replace: "$self.profilePreviewHook(arguments[0]);$&"
           }
       }
profilePreviewHook(props: any) {
        console.log(props);
        let colors: [number, number] = props.pendingThemeColors;
        let effect: string = props.pendingProfileEffectID;
        if (preview) {
            if (primaryColor !== -1)
                colors = [primaryColor, accentColor === -1 ? primaryColor : accentColor];
            else if (accentColor !== -1)
                colors = [accentColor, accentColor];
            if (effectID !== "")
                effect = effectID;
        }
        props.pendingProfileEffectID = effect;
        props.pendingThemeColors = colors;
    },

can you see if this works? @dire trench

vivid bough
#

np

charred monolithBOT
acoustic escarp
#

can someone explain how the architecture of betterdiscord and vencord differ? i see general statements like "vencord is faster and uses less memory", but would like to understand how this is achieved to convince myself to switch over

#

also probably gonna get biased answers, but i assume vencord just has more robust engineering since i saw typescript. comments on this would also be good

turbid hatch
#

vencord doesn't use monkeypatching, which can be quite slow

#

it patches the modules as they get loaded with source code patches

#

that's the main difference

#

using colorsighted as an example

grave mangoBOT
turbid hatch
#

we're patching all of the other status masks out and replacing them with just the online mask

#

@acoustic escarp

#

the using less memory comes from vencord not needing extremely large plugin libraries to run basic stuff, so vencord only includes what it needs for its plugins

#

regarding robustness, yes i'd say we are more robust than bd

#

everything goes through quality control before it makes it into the mod

#

and plugins are encouraged to be written in a way that makes it survive updates

acoustic escarp
#

thanks for the quick reply :D this is convincing enough for me to switch lol

turbid hatch
#

npnp ^^

austere talon
#

to be clear, i doubt the way the two mods function makes much of a difference on performance

mostly just that a looot of BD plugins are terribly written because they have no quality control

#

many bd plugins also have tooons of very bloated code. Devilbro's plugin library for example is bigger than the entirety of vencord including all ~130 plugins

split hornet
#

devilbro plugins made my discord run slower

#

vencord runs hella light

charred monolithBOT
charred monolithBOT
void echo
#

i went through and read some n choked

charred monolithBOT
austere talon
charred monolithBOT
austere talon
#

that completely ruins security. it's a sandbox escape and if discord ever has an xss again, people can use it to run malware on your pc

#

dont do that

#

you can achieve the same while still preserving proper security, by adding ipc methods for

  • selecting a directory to write files to
  • writing files to the currently selected directory
rustic nova
#

alright, how about i move all the filesystem work to that importMetoPreload.ts file like VencordNative, and just call that through the ipc

austere talon
#

yes something like that

rustic nova
#

aight sure. ill get to it after my finals 🫡

austere talon
#

just reaching out cause i don't want vencord users to have a less secure discord

#

even if the plugin isn't official

rustic nova
charred monolithBOT
#

there's really no good argument for having this ipc method

plugins having any use for this ipc method implies that the plugin code has security issues (the renderer being able to write arbitrary files => sandbox escape), as is the case for MessageLoggerEnhanced

Instead of allowing arbitrary file write to the renderer, plugins should add ipc methods for scoped file write, and also an ipc method for showing the open dialog (handled entirely in node, so the renderer cannot manipulate its v...

austere talon
#

that person has a cool pfp

austere talon
#

also, i might write a better way to have native code in plugins soon so people wouldn't even have to patch vencord

charred monolithBOT
austere talon
#

the idea is to implement the following:

// src/plugins/YourPlugin/native.ts

import { readFileSync } from "fs";
export async function readPasswd() {
  return readFileSync("/etc/passwd", "utf-8");
}
// src/plugins/YourPlugin/index.ts

const Native = VencordNative.pluginHelpers.YourPlugin as typeof import("./native");

console.log(await Native.readPasswd());
misty raptor
#

updated my keywordnotify plugin

#

hoping it gets accepted now

#

cuz its based

rustic nova
turbid hatch
#

hm

#

wondering if that should be a func call or a prop access

#

i guess prop access for consistency

austere talon
#

but i already have an idea for implementing it

turbid hatch
#

unless the plugin explicitly registers what natives it wants poi_think

austere talon
#

no

turbid hatch
#

can we add natives late?

austere talon
#

just functions you export will automatically be made ipc methods

turbid hatch
#

no what i mean is

#

if we can add them late

austere talon
#

why would we do that

turbid hatch
#

typing

austere talon
#

no

#

not possible

turbid hatch
#

you could have a function that retrieves them late

#

not add

#

retrieve

#

im tired

austere talon
#

unless we generate a .d.ts file which is deranged cause you will get type errors until you run a command

austere talon
turbid hatch
#

not unsurprising in typescript land

#

hm

austere talon
# austere talon but i already have an idea for implementing it

it's pretty simple:

  • the build script node bundle will glob src/plugins/*/native.ts and put it all in one object like { YourPlugin: { method1() {} } }
  • for every method, an ipc handler called VencordPlugins_YourPlugin_method1 will be registered
  • ipcRenderer.sendSync("VencordGetPluginMethods") will return { YourPlugin: ["method1"] }
  • ^ is called in preload and used to build an object pluginHelpers that automatically calls the ipc methods
#

fully automated but u need to type cast it manually

#

cause there is no way to do this automatically in typescript, other than generating a .d.ts file and i dont like that

#

for obvious reason, it will only be available on desktop/vesktop - though plugins can still be hybrid and function on web as well without their native side ( like OpenInApp currently )

turbid hatch
#

i wonder

#

can you do string interpolation in a typeof import

austere talon
#

no

turbid hatch
#

that's unfortunate

austere talon
#

they could make it possible if the variable is a compile time constant

#

but then whats the point

void echo
#

Ven a lotta people are saying fakenitro stickers are broken, has that been fixed or is it at least known?

austere talon
#

fixed on dev

#

not pushed to main

void echo
#

okay sweet

austere talon
#

just check commit log in the future

#

look in both main and dev

void echo
#

kk

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function

Bad Starts

None

Discord Errors

None

limber skiff
#

wait wtf

#

I merged into dev not main

charred monolithBOT
austere talon
#

dont merge rn

#

why did u force push dev 😭

limber skiff
#

it didnt have the bump commit

limber skiff
#

I rebased off main

#

it sucks so much having to create prs to push to main

#

github so bad

austere talon
#

its branch protection

#

but like i said dont push to main

#

im cooking rn

limber skiff
limber skiff
austere talon
charred monolithBOT
austere talon
#

hmmm

austere talon
#

thats probably horrid with ts

#
export type PluginIpc<PluginExports extends Record<string, (event: Electron.IpcMainInvokeEvent, ...args: unknown[]) => unknown>> = {
    [key in keyof PluginExports]:
    PluginExports[key] extends (event: Electron.IpcMainInvokeEvent, ...args: infer Args) => infer Return
    ? (...args: Args) => Promise<Return>
    : never;
};
#

copilot wrote this

#

IT WORKS

#

PROMISE PROMISE

#

LETS GOOO

#

this is fine imo

charred monolithBOT
austere talon
#

PR is now ready

#

i should probably test that it fuuuully works

#

oh i already found a silly issue heh

charred monolithBOT
#

superseded by https://github.com/Vendicated/Vencord/pull/1965 - thanks a lot aynway for your effort!

#1965 doesn't actually have a convenient way to inject into frames, but rather just the ability for any plugin to have native code

However, it would be fairly trivial to export a basic frame patching api from ipcMain, like

addFrameCallback("MyPlugin", frame => {
	if (frame.url.startsWith("https://open.spotify.com/embed")) {
		frame.executeJavascript("...")
	}
})
charred monolithBOT
jagged cloak
#

also that is still targeting main cause i forgot when i made the pr lol

austere talon
#

GRAFIK

#

WHY IS UR SHITHUB GERMAN

jagged cloak
#

grafik jumpscare

#

im pulling native branch rn german

#

also i just learned uploading an image into a comment adds it in the repo owner's assets

austere talon
#

ya

#

thats why we have an issue thread

jagged cloak
#

did not know lol

#

more like did not pay attention whenever you posted it

#

i found it

charred monolithBOT
jagged cloak
#

eh ill just change to dev anyway

#

i havee so many tabs open hwo do you shithub

austere talon
#

that screenshot is kinda shit

#

maybe take one where the text doesnt overlap xd

jagged cloak
#

i was thinking the same i need to test it with native changes anyway

austere talon
#

also @turbid hatch, looks like BD is very close to usercss theme support

jagged cloak
#

never thought bd would see usercss

elder garnet
#

YESYESYESYESYESXESXRDXFDXGFFGTGJ

jagged cloak
#

what do i have to do to the function for it to be included in native?

export async function sendToOverlay(_, data: any) {
    data.icon = Buffer.from(data.icon).toString("base64");
    const json = JSON.stringify(data);
    xsoSocket ??= createSocket("udp4");
    xsoSocket.send(json, 42069, "127.0.0.1");
}
``` same code as it's always been, except the ipcMain.handle removed since its not needed cause of this pr(?)
austere talon
#

just that

#

export it from native.ts and it'll be available automatically on your plugins ipc object

#

look at the example in my prs description

austere talon
jagged cloak
#

odd that it isnt then

austere talon
#

you need to hard restart to load main changes

jagged cloak
#

i am

#

w/ watch

austere talon
#

skill issue

#

i mean close discord fully

#

and reopen

jagged cloak
#

i've.. been doing that?

austere talon
#

ctrl r isn't enough

#

oh

#

show code

#

and make sure u use the silly branch and not dev or main

grave mangoBOT
austere talon
#

oh

#

your casing is wrong silly

jagged cloak
#

wuat

austere talon
#

XsOverlay

jagged cloak
#

oh lmfao

austere talon
#

if uses the dir name not the plugin name (first char is uppercased and last .suffix is dropped)

jagged cloak
#

ah i see

#

well xsOverlay? no one types it like that but to stay consistent w literally every other plugin lol

#

oh didnt see ur edit

austere talon
#

don't think too much just check VencordNative.pluginHelpers in console xd

vivid bough
#

@austere talon btw if a folder has dashes in it it will error. for example a plugin repo/folder is called vc-epic-plugin.

here are the errors:

X [X ERROR[] Expected "}" but found "-"

    import-natives:~pluginNatives:10:2:
ERROR      10 │ Vc]- epic-plugin:p3,
         │   Expected "}" but found "-"^

    import-natives:~pluginNatives:10:2:

         ╵         10 │ Vc}-

1 error
epic-plugin:p3,
         │   ^[watch] build finished, watching for changes...
         ╵
}

1 error
austere talon
#

don't do that

vivid bough
#

but many plugins already have dashes in the repo name

spark pivot
#

no?

vivid bough
#

i mean third party plugins

spark pivot
#

bd plugins?

vivid bough
#

?

spark pivot
#

nvm

vivid bough
#

vencord plugins bruh

spark pivot
#

just replace the dashes then

vivid bough
jagged cloak
#

just tell them to rename folder then ig

#

not big deal

jagged cloak
#

much better image

charred monolithBOT
jagged cloak
#

mk is done gonna push when it gets merged to dev

vivid bough
# jagged cloak just tell them to rename folder then ig

that isnt very user friendly
also third party plugin devs who use this native feature will have to change the repo name.

heres a possible solution
vencord already has a way to get the plugin name based on the path of the plugin. https://github.com/Vendicated/Vencord/blob/main/scripts/generatePluginList.ts#L93C45-L93C45
use this to find the name of the plugin and use that instead of the folder name.

since this is being done at build time the performance shouldnt matter too much, and you can add checks like if it is a user plugin and check if it has a dash in the name and then only call that parseFIle function.

grave mangoBOT
jagged cloak
#

its already not user friendly they're installing a third party plugin lol

#

third party plugin devs who use this native feature will have to change the repo name.
git clone <repo> <desired folder name>

vivid bough
#

wouldnt it be better to just fix this? what advantages comes from not fixing this?

spark pivot
#

Because literally no one cares

#

Just rename it

#

It’s two clicks

#

Third party plugins aren’t supported and we don’t care if they work or not

#

They aren’t managed by us at all, we don’t care what they do with them. If this was a problem with actual plugins then we’d fix it, but it isn’t

crude hearth
#

third party plugins are supported

#

ven just says if you dont know what you are doing dont mess with it and cry for help

crude hearth
#

does vencord auto update those

#

actually nvm some plugins have css files too

spark pivot
#

Aka we don’t provide support/maintenance to them

crude hearth
#

at the and support for them exist

spark pivot
#

The owners do what they want with them

crude hearth
#

you can create userplugins folder and thow anything there

spark pivot
#

Yeah

#

I know

crude hearth
#

just problems with it is not supported

spark pivot
#

That’s exactly what I mean

crude hearth
#

if dashes cause problems I think it should be fixed tbh

cunning canyon
#

check if userplugin has a dash in name then explod computer

jagged cloak
#

yopppp

#

best idea is just to not use dash in plugin if ur gonna want a native feature
if u already have one use whatever name in plugin and tell ppl to rename to that, or change repo name or both

#

but either way explod

#

doesnt really matter as they'll figure it out as they always have

crude hearth
#

I just find it so dumb

#

to tell people "rename while cloning" or "rename your repo" instead of fixing the thing

#

dashes make it more readable

#

and some new user wouldnt know dashes cause problems

jagged cloak
#

well yeah

long ocean
#

why in fake nitro sticker bypass not working?

unkempt oak
#

i wonder

charred monolithBOT
dire trench
#

mfs really fork vendroid just to change the apk icon 💀

uncut glen
#

💀

woeful sable
#

wtf blurryCRYING

uncut glen
#

Bro funny

dire trench
#

me when git clone WHAT

#

mf even put out a release
and its just a zip of the source code 💀

uncut glen
#

💀💀💀

ocean garden
# limber skiff

I tried this, an issue is that the crypto libraries and functions are async and it appears that I can't call async functions here. Any other way?

crude hearth
#

(its pain)

#

and also building

#

probably thought it had actions which auto builded apk

dire trench
charred monolithBOT
dire trench
#

this is their only other repository

crude hearth
#

I think that confirms it

charred monolithBOT
short bridge
verbal pumice
#

(that's not a joke)

livid heath
#

Unfunny joke

charred monolithBOT
turbid hatch
#

lets merge first cause itd be funny

#

"we had usercss before it was cool"

turbid hatch
#

that's working well from what i see

charred monolithBOT
nimble plaza
#

are there any real guidelines for third party plugins? bc with the native plugins you can easily share shit thay makes things unfair (i say as if i dont have a plugin that enabled putt party devmode)

charred monolithBOT
nimble plaza
#

my ipcplugins pr was closed right

#

yeah okay

#

tried that

#

i got no signs it installed at all

crude hearth
#

then adds 100mb of memory usage

nimble plaza
#

* This file is based on AdGuard's Block YouTube Ads (https://github.com/AdguardTeam/BlockYouTubeAdsShortcut).

#

like where

#

spotify embeds?