#πŸ‘Ύ-core-development

1 messages Β· Page 133 of 1

fresh cloak
#
FATAL ERROR: tsfn_to_js_proxy napi_call_function
z/home/sarah/Documents/github/Vesktop/node_modules/electron/dist/electron exited with signal SIGABRT
#

that's so awesome

#

It detects the key and then kills itself

#

Maybe it's time we build our own native hotkey module

#

I hate relying on other people

livid heath
#

Maybe it's time we rewrite the client for good

charred monolithBOT
fresh cloak
livid heath
#

I refuse to use software related to erkinalp

fresh cloak
#

so now of course the question is can i access this function from Vesktop

#

ahh okay i can execute javascript in the main window

charred monolithBOT
fresh cloak
#

i got it working CB_wearyy

#

now i'm gonna have to fuckle together an interface and settings for these keybinds

charred monolithBOT
charred monolithBOT
charred monolithBOT
#

I was able to compile and run without errors,
I am unsure if I am suppose to be seeing anything when I do the (GET) instruction,
and I am unsure what I am meant to do when I get to (POST)
Neither show the unable to connect screen, both give out an 404 error in the browser console though.
I am using LibreWolf so I'm assuming the instructions would be the same.

You should use an HTTP Client like Insomnia or HTTPie

charred monolithBOT
#

List command output

[{"client.id":"32","clock.quantum-limit":"8192","device.api":"alsa","factory.id":"10","factory.name":"api.alsa.seq.bridge","media.class":"Midi/Bridge","node.driver":"true","node.name":"Midi-Bridge","object.id":"37","object.serial":"37","priority.driver":"1"},{"alsa.card":"2","alsa.card_name":"JLAB TALK MICROPHONE","alsa.class":"generic","alsa.device":"0","alsa.driver_name":"snd_usb_audio","alsa.id":"USB Audio","alsa.long_card_name":"16042020V2 JLAB TALK MICROPHONE at...
ruby coyote
#

he left telegram(

#

and stackoverflowerror on syntax highlighting appeared

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
uncut glen
#

Anything else you guys think I should add/fix in the plugin?

charred monolithBOT
#
[Vencord/venmic] New tag created: v2.0.1
umbral hedge
#

injection based mod loader moment

austere talon
#

unverified

#

fear

#

megu account got hacked

umbral hedge
#

wha

#

i signed the commit tho 😭

charred monolithBOT
umbral hedge
#

OH

#

its the email

#

lmao

#

lemme add it to my github

livid heath
#

lol

umbral hedge
#

new commits will now be verified

#

lmao

charred monolithBOT
topaz thistle
umbral hedge
uncut glen
#

quick question, how long dose it usualy takes for vee to look at a a PR?

#

soory if thats a bad question

main trout
#

Jokes aside it'll take a while

#

Could take a week could take a month

uncut glen
#

oh ok

#

ty

charred monolithBOT
#
[Vencord/Vesktop] New branch created: dependabot/npm_and_yarn/axios-1.6.1
#

Bumps axios from 1.5.1 to 1.6.1.

Release notes
Sourced from axios's releases.

Release v1.6.1
Release notes:
Bug Fixes

formdata: fixed content-type header normalization for non-standard browser environments; (#6056) (dd465ab)
platform: fixed emulated browser detection in node.js environment; (#6055) (3dc8369)

Contributors to this release

Dmitriy Mozgovoy
Fabian Meyer

Release v1.6.0
Release notes:
Bug Fixes

CSRF: fixed CSRF vulnerability CVE-2023-45857...

main trout
little wing
#

I hope volumebooster for vesktop gets taken a look sometime

#

someone commented in the issue saying they would try but I think they never did

livid heath
main trout
#

Skill issue

livid heath
#

not mine

jagged cloak
#

i mean thats a draft so thats their fault

#

if it were not a draft then maybe

livid heath
#

longest open non draft is from april 19

#

well either way doesn't matter

charred monolithBOT
#
[Vencord/Vesktop] branch deleted: dependabot/npm_and_yarn/axios-1.6.1
lime stone
main trout
lime stone
#

dependaboat

#

hire this man

#

(i'm not going to share their name but this is a very cool bio)

main trout
charred monolithBOT
umbral hedge
austere talon
#

cause of the top commit

#

those people commented on that commit

burnt ridge
#

Lol

charred monolithBOT
charred monolithBOT
junior olive
#

@austere talon Can we try to get Decor reviewed (and ideally merged) tonight, please? I resolved your first review's notes and implemented the better patch to add Decor decorations from Cynthia. I understand if stuff came up last night or you didn't feel like doing it, but leaving me in the dark about whether or not it was gonna happen felt really shitty and I just want to get Decor into Vencord so we can be over with this for a bit :/

nimble plaza
#

this is what happens to all plugins

#

be patient

junior olive
# nimble plaza be patient

I have been, Ven said on Wednesday after half-reviewing it that they'd review the rest tomorrow (Thursday) and when it didn't seem like that was going to happen I asked them if it was going to happen (so I could get out of adhd mode) and got ignored :/

charred monolithBOT
mortal fractal
charred monolithBOT
patent nova
#

may i know the error reason

dire trench
#

the glob

patent nova
dire trench
patent nova
dire trench
charred monolithBOT
dire trench
#

and it has a very easy to use ui

patent nova
#

can u send a link for the plugin only

#

not the full vencourd src

dire trench
#

its src/plugins/fakeProfileThemesAndEffects

patent nova
#

i downloaded it don't worry

#

will try now ty

charred monolithBOT
dire trench
patent nova
dire trench
patent nova
#

good one it worked @dire trench

#

can't u add the decoration too?

dire trench
#

theres already a plugin that does that

#

should get added soon

#

its called decor

#

doesnt rely on 3y3

patent nova
#

cna't find it

dire trench
#

this one has changes outside of its plugin folder

#

if u look at the commits u can see what those changes are

#

would probably be easier to just clone the whole repository then add fakeProfileThemesAndEffects to it and update the dev constants

dire trench
unkempt oak
#

im cooking

#

i dont actually know how to get the module number

dire trench
#

whats the point of that thing

unkempt oak
#

patch helper

dire trench
#

i just use devtools

junior olive
unkempt oak
#

like the vencord dev build has

junior olive
#

OH

#

i didnt even realize that was out of app

dire trench
#

why u need to get module number to write patch

unkempt oak
#

you dont really

unkempt oak
flint jewel
#

Is there a way to determine which text channel you're viewing? I want to add right click functionality to the call button in group/user dms but I'm not sure how to do that

#

my previous plugin in betterdiscord used mutation observers but there has to be a better way lol

unkempt oak
#

in vendetta you use SelectedChannelStore ts find(x => x?.getName?.() === "SelectedChannelStore").getChannelId();

#

however there might be a better version for pc clients

austere talon
#

youre asking massive X/Y problem question

#

first patch the context menu

#

it already gives you the channel

unkempt oak
#

why do pc clients have to be so much more complicated

austere talon
#

???

flint jewel
austere talon
#

its easier

austere talon
#

thats just wrong

#

patch the context menu

#

it gives you the channel

flint jewel
#

alright then I'll try that, thanks

mortal fractal
unkempt oak
#

im not adding syntax highlighting

charred monolithBOT
unkempt oak
#

added diff

spark pivot
#

I'm really struggling to find where messages are received in discord's code, everything i find ends up being something else, any help?

#

some of them are when it's received but it's after the point i need it to be, i need to find exactly when the client receives it

austere talon
#

what for

unkempt oak
#

in that case listen to the message create flux event no

spark pivot
#

i need to modify the data in the received message

unkempt oak
#

oh

spark pivot
#

.

unkempt oak
#

its not showing the shiggy gif in the embed

jagged cloak
unkempt oak
jagged cloak
#

i know

#

im just messing

unkempt oak
spark pivot
jagged cloak
#

true

#

you must put shiggy into every field

spark pivot
charred monolithBOT
unkempt oak
#

still no shiggy image

spark pivot
#

yeah i think ik why

unkempt oak
spark pivot
#

just let discord be your cdn

unkempt oak
#

lets go

charred monolithBOT
austere talon
#

its probably not much harder to do

#

well it does already have a lot of stuff, just not the days ago

#

<t:1699663282>

#

oh i see, joined date is like very weird xd it doesnt even use proper timestamp

#

discord moment

charred monolithBOT
spark pivot
#

found it

austere talon
#

are u making always mention

#

why so many patches

#

fear

jagged cloak
#

fear

charred monolithBOT
spark pivot
#

try and ping me i dare you

jagged cloak
#

@spark pivot hiii

spark pivot
#

reply ping*

austere talon
dire trench
austere talon
#

why

cunning canyon
austere talon
#

that pr is really insane

#

seems very convoluted / overengineered

spark pivot
#

omg it is so big

#

none of the settings make sense

jagged cloak
#

i didnt even know git let you do this

austere talon
jagged cloak
#

yes

austere talon
#

who paying 10 bux for that

jagged cloak
#

many

spark pivot
#

for a mixed review program

#

no thansk

jagged cloak
#

** Please read this section before purchasing! **- OVR Toolkit only supports Windows 10 and 11! Not Windows 7 or Windows 8. Windows 8.1 'may' work but is unsupported!- OVR Toolkit requires you to have a Windows account with admin permissions and that you run Steam on this same account.- Oculus users may experience decreased performance as ga...

Price

$11.99

Recommendations

2370

β–Ά Play video
#

people pay for this MORE

#

than xsoverlay

spark pivot
jagged cloak
#

people are just malding about him changing from unity ui to web ui

#

lol

#

anyways uhh you can just use steamvr dashboard now it doesnt suck as much as it used to (it still sucks tho)

#

you're paying for quality of life as usual

#

or use one of the free ones that are probably worse because they dont get paid to develop their shit

jagged cloak
#

why did you husk own review

junior olive
#

no review comment webhook messages

#

weird

cunning canyon
austere talon
#

days ago is cool

jagged cloak
#

what's optimistic

#

nvm i searched

#

ic

austere talon
#

guh syntax highlighting broke

cunning canyon
jagged cloak
#

Are the dispatch logs from console optimistic or something?
mentioned, stickers and stuff from viewraw arent in this object

austere talon
cunning canyon
#

how

austere talon
#

they differ from what flux dispatches

#

wp.Common.FluxDispatcher.subscribe("MESSAGE_CREATE", console.log)

austere talon
jagged cloak
austere talon
jagged cloak
#

not saying theyre the exact same but what im using has worked for me

austere talon
#

then ignore that

#

ig flux MESSAGE_CREATE are unprocessed

junior olive
cunning canyon
#

still same

charred monolithBOT
jagged cloak
#

also can you even get optimistic events from other users

charred monolithBOT
jagged cloak
#

actually no that doesnt matter

charred monolithBOT
jagged cloak
#

oh my god i hate shithub

#

that was entirely my fault but i like blaming guhhub

#

check again when you feel like it

charred monolithBOT
jagged cloak
#

didnt i already do thar

jagged cloak
#

also definitely ignore the two commits i included on accident lol

jagged cloak
#

oh its just incredibly slow

charred monolithBOT
jagged cloak
#

lmao -

junior olive
junior olive
#

i was pushing to my server. and expecting it to build docker container

charred monolithBOT
jagged cloak
#

veb crashed shithub again real

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

thick kestrel
#

not sure if this is the right channel regarding plugin development questions

junior olive
#

it is

thick kestrel
#

good

#

I'm a decent-ish programmer with non-zero experience with JS (it's not a lot though). I never used other Discord modifications, so I have no experience with that. I've read the plugin development documentation and now I have some idea about how code modification is done in Vencord.
now, I'm struggling to understand how would I go around finding the right snippet to patch, other than just beautifying Discord's JS and then clueless grepping through it. which I've attempted, with minimal success - since the names are minified, looking for keywords wasn't very helpful, mostly leading to translation strings.
what I'd like to try making is a plugin that'd change the inline CSS Discord puts into nicknames based on the role color, to be based on something else.

void echo
#

You can select the element you're patching

thick kestrel
#

I use Firefox

jagged cloak
#

dont

#

it crashes lol

#

use vesktop or web version of discord

midnight raven
#

using browser for development is suicide

jagged cloak
#

read what i just said xd

#

vesktop is fine

void echo
#

oops

midnight raven
#

cause u need to manually reinstall ext each time

jagged cloak
#

that has to be deliberate

#

it happens on unpatched 64bit canary and they dont seem like theyre gonna fix it anytime soon

#

who am i kidding though

midnight raven
#

its cause their css bundle is fucked up

void echo
#

you can use desktop if you want just open devtools before its launched fully lmao

midnight raven
#

it crashes trying to parse the css file

#

it only happens on windows

jagged cloak
#

i would say pipe bomb but they already did that

#

yeah windows issue cause dumb

thick kestrel
# void echo Vesktop or web

well, I do use the web version, in particular with the userscript version of Vencord (since the Firefox version got poofed out of existence)

void echo
thick kestrel
jagged cloak
#

do you know regex, if you dont learn or you will hate yourself

#

working with vencord patches

thick kestrel
#

yeah regex is an essential skill in software development lol

#

and even daily use of computers tbh

#

so yeah, I am quite familiar with the Perl flavor, which the JS flavor is kinda similar to as far as I can tell

#

(as well as somewhat with the Vim flavor but uh yeah)

#

so Vesktop is a repackaged version of Discord web with Vencord preinstalled

spark pivot
#

Yes

thick kestrel
#

guess gonna install that just for development, though I will stay with Firefox for daily use, it's convenient to have just a single browser running lol

thick kestrel
#

gonna add the scrollbar back

void echo
#

@spark pivot How hard would it be to create an inverse of your plugin?

#

so if metions are off it mentions me anyway

#

wait

spark pivot
#

easy (i think)

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

import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { MessageStore, UserStore } from "@webpack/common";
import { MessageJSON, UserJSON } from "discord-types/general";

export default definePlugin({
    name: "AlwaysReplyPings",
    description: "Ensures getting pinged by replies, even if the sender turned it off",
    authors: [Devs.MrDiamond],
    patches: [
        {
            find: "_channelMessages",
            replacement: {
                match: /receiveMessage\((\i)\)\{/,
                replace: "$&if($self.shouldAddMention($1))$1.mentions.push($self.getCurrentUserMention());"
            }
        }
    ],

    shouldAddMention(e: MessageJSON): boolean {
        if (!e.message_reference) return false;

        const repliedMessage = MessageStore.getMessage(e.channel_id, e.message_reference.message_id);
        if (!repliedMessage) return false;

        return repliedMessage.author.id === UserStore.getCurrentUser().id && !e.mentions.some(mention => mention.id === UserStore.getCurrentUser().id);
    },

    getCurrentUserMention(): UserJSON {
        const currentUser = UserStore.getCurrentUser();
        return { id: currentUser.id, username: currentUser.username, discriminator: currentUser.discriminator };
    }
});
#

would it be that simple

mortal fractal
#

why not just modify shouldNotify

midnight raven
#

wont add the yellow highlight

jagged cloak
#

(source: i tried it and i see)

charred monolithBOT
void echo
#

vscode plugin is so cool

#

i js tried it

#

tf

spark pivot
void echo
#

again?

spark pivot
mortal fractal
#

thats what highlight does

void echo
#

someone reply ping me please

thick kestrel
void echo
thick kestrel
dire trench
fringe eagle
#

but i'm gonna update it rn

void echo
#

what is venticord

fringe eagle
#

modified vencord

void echo
#

whats the mod

fringe eagle
#

more loading quotes and badges i guess

#

and an sdk accessible in the utils

void echo
#

kewllll

#

i did see ur vscode thing

#

a min ago

#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated, Mr Diamond, ant0n and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { MessageStore, UserStore } from "@webpack/common";

export const settings = definePluginSettings({
    alwaysPingOnReply: {
        type: OptionType.BOOLEAN,
        description: "Always get pinged when someone replies to your messages",
        default: false, 
    }
});

export default definePlugin({
    name: "ReplyPingControl",
    description: "Control whether to always or never get pinged on message replies",
    authors: [Devs.ant0n, Devs.MrDiamond],
    settings,

    patches: [
        {
            find: "_channelMessages",
            replacement: {
                match: /receiveMessage\((\w+)\)\{/,
                replace: "$&$self.modifyMentions($1);"
            }
        }
    ],

    modifyMentions(message) {
        const isReplyToCurrentUser = this.isReplyToCurrentUser(message);
        if (settings.store.alwaysPingOnReply && isReplyToCurrentUser) {

            if (!message.mentions.some(mention => mention.id === UserStore.getCurrentUser().id)) {
                message.mentions.push(this.getCurrentUserMention());
            }
        } else if (!settings.store.alwaysPingOnReply && isReplyToCurrentUser) {

            message.mentions = message.mentions.filter(mention => mention.id !== UserStore.getCurrentUser().id);
        }
    },

    isReplyToCurrentUser(message) {
        if (!message.message_reference) return false;
        const repliedMessage = MessageStore.getMessage(message.channel_id, message.message_reference.message_id);
        return repliedMessage && repliedMessage.author.id === UserStore.getCurrentUser().id;
    },

    getCurrentUserMention() {
        const currentUser = UserStore.getCurrentUser();
        return { id: currentUser.id, username: currentUser.username, discriminator: currentUser.discriminator };
    }
});
#

is there anything obviously awful

#

with this

#

AHH

#

ok

#

thats the done one

charred monolithBOT
thick kestrel
#

how do I even use Vesktop for development, for Firefox I ran pnpm buildWeb and installed the userscript

#

for desktop the docs say to pnpm inject

#

but what about Vesktop then

charred monolithBOT
fringe eagle
#

it hink

#

ith ink

#

i th in k

#

ithnk

thick kestrel
fringe eagle
cunning canyon
#

vesktop settings

thick kestrel
#

welp, I still don't see the plugin

#

oh, perhaps a full restart is needed

dire trench
#

why user ids in dev constants stored as bigints when they are strings everywhere else

thick kestrel
austere talon
#

discord also uses bigints in some places

dire trench
austere talon
#

there isn't a better way

dire trench
#

im getting rate limited

#

badges

austere talon
#

it's api spam

dire trench
#

there is an alternative

austere talon
#

the alternative is not having it

dire trench
#

the user object has a flag variable

austere talon
#

it's pretty useless

#

those don't have badges

dire trench
#

its a number that represents the badges a user has

#

bitwise shift and u can figure out what badges

#

but i would have to hardcode the badges cuz i cant find anywhere in the api to get a list of all possible badges

livid heath
#

guh use user profile store

austere talon
#

that's only cached users

#

iirc the normal user object doesn't have the flags you need

livid heath
austere talon
#

its only fetched when you open their profile

livid heath
#

it fetches if not cached

#

give me a random user id

austere talon
#

no it doesn't

#

fetching is a different function and fetching all users in chat is braindead

mortal fractal
#

it doesnt you have to use another function from another module to fetch profile

livid heath
#

random user never opened profile

austere talon
#

you opened their context menu

#

to copy their id

livid heath
#

😭 discord so ass

junior olive
#

could a cloudflare worker that caches user profile heavily for badges be done

austere talon
#

no

livid heath
#

tbh why even make such a plugin

dire trench
#

perhaps the error is related...

livid heath
dire trench
#

nah i dont need to get the profile for this

#

i just need to find a list of all badges

#

to get their values

#

so i dont have to hardcode them

livid heath
#

profile has list of badges

austere talon
#

it's handled by the api

livid heath
#

or you wait for the day when community team goes insane and adds /users/:id/badges endpoint

dire trench
fringe eagle
#

ohhh

#

this is vencord dev

mortal fractal
nimble pendantBOT
austere talon
#

<@&1088566810976194693> moment

dire trench
#

this plugin not only gets me rate limitted but makes my discord freeze every 2 seconds

livid heath
#

well that should give you a clear indication

austere talon
#

shrimply don't make the plugin

livid heath
#

bad plugin idea

dire trench
#

it can be done
ill just hardcode the badges

livid heath
#

this is a i will do it just because i can moment

livid heath
dire trench
#

UserStore

livid heath
#

what if not cached

dire trench
#

nvm i dont even need to do that

#

the message author object has a user object with the flags im pretty sure

livid heath
#

wait forget about cache

#

what will you do if dicord updates the badge assets

dire trench
#

i will update the plugin

livid heath
#

manual updating :lipbite:

dire trench
#

i froze for 3 minutes

#

just from this plugin

livid heath
#

imagine running this plugin in a heavily active chat

#

good luck

dire trench
#

i removed the fetchUserProfile part and its still freezing

austere talon
#

maybe it's time to abandon the plugin

dire trench
#

this runs for every user

fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv")
    .then((res: Response): Promise<string> => { return res.text(); })
    .then((data: string) => {
        const badges: string[][] = data.split("\n").map((s: string) => s.split(","));
        const userBadges: [string, string][] = [];
        for (let i: number = 0; i < badges.length; i++) {
            if (badges[i][0] === author.id)
                userBadges.push([badges[i][1], badges[i][2]]);
        }
        setVCBadges(userBadges);
    })
    .catch(e => { console.error(e); });
#

every message actually

austere talon
#

why

#

also why would u write that for loop

livid heath
#

no cache moment

austere talon
#

you will use .filter()

dire trench
#

chad for loop vs soy filter

livid heath
#

nop

#

filter good

dire trench
#

i gotta look that up

#

yeah thats probably better

livid heath
#

no way what

#

rigged website

charred monolithBOT
charred monolithBOT
charred monolithBOT
unkempt oak
verbal pumice
#

horror

dire trench
#

Do people actually use the patch helper

verbal pumice
#

yes its useful

#

but theres no reason to have it outside of discord

#

(imo)

dire trench
#

U know u can press the un minify button in devtools

verbal pumice
#

unless you can like, share patches through it

dire trench
#

Then what's the point of the patch helper

verbal pumice
dire trench
#

Regex search is built into devtools

verbal pumice
#

filling from clipboard

turbid hatch
livid heath
verbal pumice
#

i think its better not being in a codeblock tbh

livid heath
#

that green has awful a11y

#

mmmyes inspect data using ⬛⬛⬛⬛⬛ and ⬛⬛⬛⬛⬛

livid heath
#

any problem with that

unkempt oak
#

no

livid heath
#

good

#

@unkempt oak it seems you are using chunk ids as module ids

unkempt oak
livid heath
charred monolithBOT
unkempt oak
#

test

charred monolithBOT
unkempt oak
#

(all of these are uncommited changes btw)

charred monolithBOT
cunning canyon
#

why do the plugin for pfp need to have badge lmao

woeful sable
#

why are they so negative

#

and picking out everything

charred monolithBOT
little wing
#

this guy gets it

charred monolithBOT
wary void
# charred monolith

duplicate
there doesn't seem to be an actual gh issue, so I assume this means it's known, right?

austere talon
wary void
#

ah, a classic "github search sucks" moment (and me being blind, as it's the 4th latest open issue). thanks

void echo
#

@spark pivot I'm not able to make a PR to your no-reply-pings but I've created a README.md and updated the plugin

#

also if anyone sees anything really stupid on that plugin lmk cz im very new to TS

#

also, I had an idea for creating readmes where I could try feeing plugins to the codex LLM and letting it create one based on that

#

might be a lot faster for the plugins that alr don't have them and then moving forward we can manually add them

spark pivot
#

I’ll look at in a bit and just make a new pr for it

void echo
#

wouldnt let me weirdly

#

do you have them disabled?

#

or do you mean a new PR to main vencord

fresh cloak
#

the main vencord, that's where every plugin lives

#

and you forked that

void echo
#

I forked MrDiamonds

fresh cloak
void echo
#

cz he alr had a PR for mute all replies

#

diff branch

fresh cloak
#

doesn't matter which branch you're on

void echo
#

oops

fresh cloak
#

it's still forked from the same repo

void echo
#

smmhmgnfgng i did the wrong thing

spark pivot
#

@void echo

void echo
spark pivot
#

k cool

charred monolithBOT
spark pivot
#

ugh shithub let me comment on a review without making a new review

void echo
#

I'm currently not even importing UserJSON

spark pivot
#

oh yeah

#

do that

void echo
#

huh

spark pivot
#

huh

void echo
spark pivot
#

pnpm i?

#

works fine for me

void echo
#

i swear i did that

#

thats the insomnia kicking in

#

u sure is should be as Unknown?

spark pivot
#

if you remove it it's an error

#

so yes

spark pivot
#

more reviews incoming

void echo
#

@spark pivot

#

can you no ping reply to me

#

wait

#

no this fix doesnt work

#

the one you suggested

#

im getting this on all my msgs

spark pivot
#

hold on let me clone

void echo
#

yea i dont get a ping for that

spark pivot
#

yep that broke it somehow

#

hold on

void echo
#

The return statement in modifyMentions is only executed if isReplyToCurrentUser returns false, which means it exits the function early for non-reply messages.

#
modifyMentions(message: MessageJSON) {

    if (!this.isReplyToCurrentUser(message)) return;

    if (settings.store.alwaysPingOnReply) {
        if (!message.mentions.some(mention => mention.id === UserStore.getCurrentUser().id)) {
            message.mentions.push(this.getCurrentUserMention());
        }
    } else {

        message.mentions = message.mentions.filter(mention => mention.id !== UserStore.getCurrentUser().id);
    }
}
spark pivot
#

this is it before

void echo
#

try that

spark pivot
#

yeah that's what i was gonna do

#

nop

#

still broken

void echo
#

not for me

spark pivot
void echo
#

ok now reply with pings on

spark pivot
void echo
#

now on again

spark pivot
#

i forgor an exclamation mark

#

silly

void echo
#

what i got rn works

#

thankfully

spark pivot
#

yeah mine i forgot an excalmation mark

#

works now

void echo
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated, Mr Diamond, ant0n and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { MessageStore, UserStore } from "@webpack/common";
import { MessageJSON, UserJSON } from "discord-types/general";

export const settings = definePluginSettings({
    alwaysPingOnReply: {
        type: OptionType.BOOLEAN,
        description: "Always get pinged when someone replies to your messages",
        default: false,
    }
});

export default definePlugin({
    name: "ReplyPingControl",
    description: "Control whether to always or never get pinged on message replies",
    authors: [Devs.ant0n, Devs.MrDiamond],
    settings,

    patches: [
        {
            find: "_channelMessages",
            replacement: {
                match: /receiveMessage\((\w+)\)\{/,
                replace: "$&$self.modifyMentions($1);"
            }
        }
    ],

    modifyMentions(message: MessageJSON) {

        if (!this.isReplyToCurrentUser(message)) return;

        if (settings.store.alwaysPingOnReply) {
            if (!message.mentions.some(mention => mention.id === UserStore.getCurrentUser().id)) {
                message.mentions.push(this.getCurrentUserMention());
            }
        } else {

            message.mentions = message.mentions.filter(mention => mention.id !== UserStore.getCurrentUser().id);
        }
    },

    isReplyToCurrentUser(message: MessageJSON) {
        if (!message.message_reference) return false;
        const repliedMessage = MessageStore.getMessage(message.channel_id, message.message_reference.message_id);
        return repliedMessage && repliedMessage.author.id === UserStore.getCurrentUser().id;
    },

    getCurrentUserMention() {
        return UserStore.getCurrentUser() as unknown as UserJSON;
    }
});
#

yum

fresh cloak
#

is there anything we can do about screensharing on vesktop? electron GPU features report video encode is available but.. y'know

spark pivot
#

updated the review

void echo
#

Yea should be all good to go

#

and now we wait

fresh cloak
#

this seems to only happen on these webpage based discord clients

void echo
fresh cloak
#

but why would it be?

#

GPU features report hardware accelerated encoding is available and enabled

charred monolithBOT
fresh cloak
#

but regardless of that it's still all done on cpu

austere talon
#

stop breaking rule 5

#

@spark pivot @verbal pumice

patent nova
#

@spark pivot i know how to setup third party pluggins

#

i just don't know how to use it

#

literally no info

dusky sonnet
#

can anyone give some feedback on this?```ts
{
find: "getUserAvatarURL:",
replacement: {
match: /(i=a.*??).+?(:f.AVATAR_SIZE)/,
replace: "$1(arguments[2]==80?300:arguments[2])$2"
}
}

#

works but the regex is pretty ugly

spark pivot
#

what's the code you need to match

stark barn
void echo
dusky sonnet
#
function C(e) {
    var t;
    let n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]
      , i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : f.AVATAR_SIZE // this line
      , r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null;
    return null !== (t = I(e, n, i, r)) && void 0 !== t ? t : g(e.id, e.discriminator)
}
spark pivot
#

can you not just put i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : f.AVATAR_SIZE into it and regex-ify it

#

aka remove spaces and escape other regex characters

#

and use \i for i and f

fresh cloak
#

maybe we're not using an electron build with vaapi enabled

void echo
#

would it not be this

#

@dusky sonnet

austere talon
#

discord code does not have unnecessary spaces

void echo
#

so that then

spark pivot
#

remove spaces and use \i for i and f

#

no

#

all the spaces

void echo
#

OH Ok

#
{
    find: "getUserAvatarURL:",
    replacement: {
        match: /(\i=arguments\.length>2&&void 0!==arguments\[2\]\?arguments\[2\]:)f\.AVATAR_SIZE/,
        replace: "$1(arguments[2]==80?300:arguments[2])"
    }
}
spark pivot
#

except for the void 0 one cause that would error lol

#

i really want to add a place for just pasting a whole patch into the patch helper

#

it's annoying going into each field and pasting them

austere talon
#

do it

charred monolithBOT
spark pivot
# austere talon do it

ugh patches arent actual JSON objects cause they have regex and stuff so I have to find a workaround

#

charghpt says eval but there has to be a better way

charred monolithBOT
austere talon
#

you can just eval them

charred monolithBOT
austere talon
#

since its a developer tool i assume people who paste stuff there are smart enough not to paste malicious scripts

#

patch helper currently already evals your replacement

spark pivot
#

that's true

livid heath
#

just eval it

charred monolithBOT
#

~/venmic.log:

[2023-11-11 15:36:26.201] [venmic] [debug] [has_pipewire] pulse-server was pulseaudio (on pipewire 0.3.84)
[2023-11-11 15:36:26.213] [venmic] [info] found speakers: 40

System information

$ . /etc/os-release; echo "$NAME"
Arch Linux
$ uname -srvom
Linux 6.6.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000 x86_64 GNU/Linux
$ pacman -Qi vencord-desktop-git | head -n2
Name            : vencord-desktop-git
Version         : r221.a232af...
dusky sonnet
#

How are you supposed to format the header in the files

#

pnpm test doesnt seem to like mine lol

spark pivot
#

If you have eslint on in vscode is should do it automatically

#

What do you have

dusky sonnet
#

eslint seems to be forcing this ```ts
/*

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

but still says its invalid

void echo
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated, Mr Diamond, ant0n and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
dusky sonnet
#

could it be because im not importing devs?

void echo
#

shouldnt be

#

well

#

maybe it is

dusky sonnet
#

hmm

#

imma try add myself to that lol

void echo
#

Yeah you optionally can

#

Good practice if u wna show this stff on portfolio

#

its weird literally noone ads themselves to the license

dusky sonnet
#

should the name be discord username or Github username?

dusky sonnet
void echo
#

You can add whatever you want as your name

#

Your dev constant should link back to whatever account you want the badge on though

dusky sonnet
#

yeah

#

the header is still broken :/

#

still is forced to ```ts
/*

  • Vencord, a Discord client mod
  • Copyright (c) 2023 Vendicated and contributors
  • SPDX-License-Identifier: GPL-3.0-or-later
    */
void echo
#

what you got under ur header

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

import { disableStyle, enableStyle } from "@api/Styles";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";

import styles from "./style.css?managed";

export default definePlugin({
    name: "LargeProfileAvatars",
    description: "Makes avatars take up the full width of the profile modal and scales resolution accordingly",
    version: "1.0.0",
    authors: [
        Devs.board
    ],
    patches: [
        {
            find: "getUserAvatarURL:",
            replacement: {
                match: /(\i=arguments\.length>2&&void 0!==arguments\[2\]\?arguments\[2\]:)f\.AVATAR_SIZE/,
                replace: "$1(arguments[2]==80?300:arguments[2])"
            }
        }
    ],
    start() {
        enableStyle(styles);
    },
    stop() {
        disableStyle(styles);
    }
});
``` sorta doubt this is gonna get accepted anyway lol
dire trench
#

sorta doubt anything will get accepted

charred monolithBOT
void echo
dusky sonnet
#

didnt seem to change anything though

void echo
#

I'm not getting any header errors anyway so dw about that

dusky sonnet
#

huh

#

i wonder whats broken then...

void echo
#

maybe just restart vscode to be sure

#

what's the filepath

dusky sonnet
#

to be fair its showing the wrror here aswell

void echo
#

only error i get is lack of css ofc

dusky sonnet
#
.userPopoutOuter_d739b2 .avatarPositionNormal__1797c,
.userPopoutOuter_d739b2 .avatarPositionPremiumBanner__1e83d,
.userPopoutOuter_d739b2 .avatarPositionPremiumNoBanner__8bf3b {
    position: static;
    order: -1;
    z-index: 1;
}

.userPopoutOuter_d739b2 .avatarHint__8e5b9 {
    height: 340px;
    width: 100%;
}

.userPopoutOuter_d739b2 .wrapper_edb6e0[style^="width: 80px"] {
    width: 340px !important;
    height: 340px !important;
}

.userPopoutOuter_d739b2 .avatarHintInner__3d1c9 {
    box-shadow: none;
}

.userPopoutOuter_d739b2 .bannerSVGWrapper__3e7b0:not([viewBox$="120"]) {
    display: none;
}

.userPopoutOuter_d739b2 .bannerSVGWrapper__3e7b0 mask circle {
    display: none;
}

.userPopoutOuter_d739b2 .avatarHoverTarget__3a360 .wrapper_edb6e0 svg {
    width: 115%;
    height: 115%;
}

.userPopoutOuter_d739b2 .avatarHoverTarget__3a360 .wrapper_edb6e0 svg circle {
    display: none;
}

.userPopoutOuter_d739b2
    .avatarHoverTarget__3a360
    foreignObject
    .avatarStack__6604a {
    transform: translate(0, 0);
}

.userPopoutOuter_d739b2 .roundedBanner__9fa0a {
    border-radius: 0;
}

/* Following hopefully fixes decorations */

.userPopoutOuter_d739b2 .avatarDecorationHint__03e0b {
    height: 340px;
    width: 100%;
}

.userPopoutOuter_d739b2 .avatarDecoration_ae35e3,
.userPopoutOuter_d739b2 .bannerSVGWrapper__3e7b0 mask {
    display: none;
}
void echo
#

that built fine

dusky sonnet
#

also the patch seems broken

#

oh wait

#

maybe i shouldnt just blindly copy regex lmao

#

wow as long as i run my own dev build i can pretend to be a contributor lmao

jagged cloak
#

well yeah xD

midnight raven
#

it's insane just hwo fast discord loads if you're only in a few guilds and have no friends

charred monolithBOT
charred monolithBOT
dusky sonnet
#

well then lets hope that was good enough lol

jagged cloak
#

looks fine to me

#

makes profile look ugly tho xd

charred monolithBOT
dusky sonnet
#

You think I should make the theme part a toggle?

#

Then again the situations where you’d want this without the theme part seem very rare

jagged cloak
#

maybe if the profile picture was the background of the profile

#

but cant that just be a theme (maybe not)

#

the way they are top and bottom like this tho... to each their own xP

#

maybe im just too used to discord lol

charred monolithBOT
dusky sonnet
#

@void echo thanks for all the input :D

void echo
#

Nws, it's nothing major and I'm sure the others will have stuff to say but that's some basic things

dusky sonnet
void echo
#

I'm not really familliar with how vencord deals with css so it might be just my inner web designer talking

#
.element {
    display: -webkit-box; /* Fallback for older browsers that support only old flexbox syntax */
    display: -ms-flexbox; /* Fallback for IE 10 that supports only the prefixed version of the new syntax */
    display: flex; /* Newer, preferred method */
}
#

here's a fallback example

#

I'm 99% syre you're safe to ignore that haha

dusky sonnet
#

Yeah, I’ll have it in mind though

#

I’ll make a readme tomorrow

charred monolithBOT
void echo
#

Yeah it's just super basic stuff like
"what it do"
"what settings do"
"what it look like"

charred monolithBOT
#
[Vencord/venmic] New tag created: v2.1.0
#
[Vencord/venmic] New tag created: v2.1.1
#

yes, this should definitely be part of vesktop and not a plugin

either via electron's global shortcut api, or via iohook

the former does not support things like mouse side buttons and has no way to implement PTT, the latter would require a native module

Correct me if I'm wrong but as the latter uses libuiohook I think that it will not support wayland.

I think the electron shortcut API is the right way to go as it is probably the ...

sick cypress
#

hi how easy is it to compile and manually install vencord urself

dire trench
#

easy

austere talon
# charred monolith

yes it seems x11 only, but

  1. is it even possible for backgrounded apps to read key strokes in wayland? I thought this was one of the big arguments for wayland
  2. the electron api doesn't support detecting key up/down, so PTT isn't possible
#

@topaz thistle

topaz thistle
#

xdg-dekstops approach offers a portable way for global hotkeys

sick cypress
topaz thistle
#

Also discord-screenaudio uses the KDE shortcut API which is an implementation of the xdg-deaktop protocol mentioned earlier

sick cypress
#

is there not place to sugggest plugins anymore?

dire trench
sick cypress
topaz thistle
sick cypress
#

i know about that plugin that makes the server list wider and opens them vertically alongside the whole other bar

misty raptor
#

who approves these

spark pivot
#

maintainers

misty raptor
#

is there like a team of people who just can approve them

#

how do some newer PRs get get approved before oldder ones

#

whats the process behind that

austere talon
#

only first time contributors need approval

misty raptor
#

whats the typical approval rate

austere talon
topaz thistle
austere talon
#

hmm, why not base it on iohook instead? it already supports all major platforms except wayland

charred monolithBOT
austere talon
#

you'd just need to rewrite / extend its linux part

misty raptor
#

should i expect to wait up to 2 weeks for an approval or like hows the timing

austere talon
#

depends on a lot of factors

topaz thistle
austere talon
#

oh

#

what do you dislike about it

topaz thistle
#

Too much to fork it

misty raptor
topaz thistle
#

I would majorly change the windows implementation and go the desktop portal approach for Linux

austere talon
#

i think discord also uses iohook

topaz thistle
#

Also modern C++

spark pivot
austere talon
topaz thistle
dire trench
#

turns out findByProps was causing all the lag

austere talon
#

did you call it inside your handler

#

dummy

dire trench
#

its called for each badge on each message πŸ’€

austere talon
#

BRO

#

findByProps can take up to 100ms

dire trench
#

just to get the className for the badge component

austere talon
#

it's literally checking all exports of thousands of modules

dire trench
#

i froze for like 7 seconds when u sent that message

charred monolithBOT
spark pivot
dire trench
#

i fixed it by only retrieving the class name once

spark pivot
charred monolithBOT
junior olive
dire trench
#

what other badge sources are their?

#

i can think of vendetta, aliucord, and reviewdb

junior olive
#

vd has no badges

void echo
#

can someone send a message with an email in it

#

a fake one works

dire trench
junior olive
#

idk tbh

topaz thistle
junior olive
void echo
#

ooh ok

topaz thistle
void echo
#

so it works

#

it just doesnt highlight

dire trench
topaz thistle
#

help@me.thistakessofuckinglong

dire trench
#

support@vencord.dev

topaz thistle
charred monolithBOT
#
[Vencord/venmic] tag deleted: v2.1.1
dire trench
# junior olive idk tbh

i searched https:// in the vendetta github repo
couldnt find anything related to badges so it has to be a plugin doing it

charred monolithBOT
dire trench
#

or they hardcoded them
also searched badge and found nothing tho so prob not

charred monolithBOT
#
[Vencord/venmic] New tag created: v2.1.1
dire trench
#

tf is goose mod

charred monolithBOT
junior olive
dire trench
junior olive
#

yeah

dusk hill
#

wuts this bout

dire trench
#

im using all the badge sources in ur plugin for my show badges in chat plugin

#

also tf is goose mod

topaz thistle
#

insane

#

that was a good cache hit lmfao

dusk hill
#

old client

#

from ducko

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

limber skiff
#

those shc broken patches can wait to get fixed

midnight raven
#

so lazy xd

frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/

ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/

PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/

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

Bad Starts

None

Discord Errors

None

limber skiff
midnight raven
#

yea im just messing

maiden sapphire
#

my devtool keep making my discord crash

rustic oxide
#

Hey, sorry if this is the wrong place, but because the Discord Blur extension got broken, I was thinking of asking for a version of BlurNSFW extension that works on all images and media. Should I make a GitHub issue for that request?

ornate herald
#

Question. Does vencord work on MaOS Sonoma (the new major update to MacOS)

Before someone bashes me for having a MacBook (screw off), I don’t have the money and resources to build my own PC as of yet due to sudden financial turmoil.

livid heath
#

vns

nimble pendantBOT
ornate herald
charred monolithBOT
charred monolithBOT
charred monolithBOT
dire trench
#

@dusk hill trolley

#

gets called for each message

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#
[Vencord/venmic] New tag created: v2.1.2
charred monolithBOT
jagged cloak
#

sounds like discord