#πŸ‘Ύ-core-development

1 messages Β· Page 41 of 1

austere talon
#

it doesnt

turbid hatch
#

why do browsers suck

#

stop making me life hard

austere talon
#

also the event is not consistent

#

also

The HTML specification states that calls to window.alert(), window.confirm(), and window.prompt() methods may be ignored during this event. See the HTML specification for more details.

turbid hatch
#

im hijacking your handler

austere talon
austere talon
#

because the user can just reload manually

#

why don't you just want to do it on start?

#

way simpler and more reliable

turbid hatch
#

since it changes when the settings were last updated

austere talon
#

how so

#

you only need to save if the local settings changed

turbid hatch
#

i guess i could add a localstorage flag?

#

or something

austere talon
#

settings.dirty

turbid hatch
#

works too

#

._dirty?

#

or .dirty

austere talon
#
const save = debounce(async () => {
  await syncToCloud();
  delete settings._dirty;
}, 60_000)
  
function handleSettingsChanged() {
  settings._dirty = true;
  save();
}
#

smth like that i think

#

and then on start just check if _dirty

#

if so sync to cloud if possible

turbid hatch
#

_dirty: boolean | undefined

#

?

austere talon
#

_dirty?: boolean;

#

:P

turbid hatch
#

thats the one

#

i keep forgetting

austere talon
#

but also maybe not the best idea to store that in settings?

#

since that will be synced to cloud too i think

turbid hatch
#

please be patient i am sleep deprived

#

yeah thats what i just thought

#

and swapping the order introduces race

#

so

#

not the best

austere talon
#

just use raw localStorage then lol

#

but u need to keep it in a variable lol

#

cause silly discord deletes it

turbid hatch
#

does it

#

πŸ₯΄

#

can i not use datastore api here

austere talon
#

just put

const localStorage = window.localStorage;
``` on top level
#

lolz

turbid hatch
#

oh wait

#

thats indexeddb

#

im a dumbass

#

oki

austere talon
#

yes its async

#

you'll want something synchronous for this

turbid hatch
#

const { localStorage } = window;

#

it really wanted that

#

so

austere talon
turbid hatch
#

localStorage.setItem("Vencord_settingsDirty", "yeah they're pretty damn filthy");

austere talon
#

horror

#

hop on boolean

turbid hatch
#

i'll just set it to literal "1"

austere talon
#

did u know u can localStorage.someKey = 1

#

its funny

turbid hatch
#

can u

#

so you can

austere talon
austere talon
#

funny localStorage moment

turbid hatch
#

i'll use Vencord_settingsSync as the key then

#

just so there's zero chance

#

no

#

settingsDirty*

austere talon
#

converted ur pr to draft before someone sees 2 approve and merges lmao

turbid hatch
#

yeye

#

ty

austere talon
#

not sure if megu is reading chat

turbid hatch
#

peep it

#

might want to make localstorage some util though

austere talon
#

yes

#

i was about to say

turbid hatch
#

@utils/localstorage?

austere talon
#

in vencorddesktop i just put it on the window lmao

turbid hatch
#

oh lmfao

austere talon
#

vcdLS my love

austere talon
turbid hatch
#

i could do it like that

#

but i prefer the module approach

austere talon
#

nono

turbid hatch
#

:P

austere talon
#

dont put it on window

austere talon
#

u should await this me thinks

turbid hatch
#

i am ungodly tired

#

please excuse me

austere talon
#

zzzzzzzzz

turbid hatch
#

i will in a minute

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

JSHandle@error

austere talon
#

JSHandle@error

#

works

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors
font-weight: bold;
color: purple;
 [kb store] KeybindStore: Looking for callback action SOUNDBOARD_HOLD but it doesn't exist in this version. Skipping
JSHandle@error ```
austere talon
#

ready? @turbid hatch

turbid hatch
#

lets do it

austere talon
#

wait

#

let me wait 1min

#

to see if the debounce works

turbid hatch
#

oh yip

#

and also test the restart dirty

austere talon
#

restart works

turbid hatch
#

oki good

austere talon
#

im two steps ahead of u old man

turbid hatch
#

im not that old!!

austere talon
quick ibex
#

im not that old come on

austere talon
#

i feel like the notif is kinda annoying ngl

#

definitely gonna have to add some way to do not show again soon

turbid hatch
#

yeah

turbid hatch
#

i think for now the transparency is worth it

charred monolithBOT
turbid hatch
#

because i want people to be confident

austere talon
#

now we explode

turbid hatch
#

holy shit

#

i cant believe it

#

THE ARC

#

ITS OVER

#

i havent used main branch in ages

somber ginkgo
austere talon
#

vping

#

explode

#

veval 1

nimble pendantBOT
austere talon
#

thanks vaius

charred monolithBOT
turbid hatch
#

@somber ginkgo lmfao

somber ginkgo
#

hey did you know

#

@turbid hatch pushed 1 commit.

99996ef Merge branch 'main' into feat/cloud-settings

turbid hatch
#

thats basically a god tier shitpost though

#

it's the only way i could get updates into my client cause i was daily driving it for the past month :P

somber ginkgo
#

i wonder what the next feature to be like this is gonna be

#

ill be sure to subscribe for the godtier emails

turbid hatch
#

wait were you subbed

somber ginkgo
turbid hatch
#

holy shit

#

thank you for joining me on this saga

jagged cloak
#

oh the horror

somber ginkgo
jagged cloak
#

explode

austere talon
#

explosion

somber ginkgo
#

ive been subbed for all this time

#

and ```
01:44:46.942 Vencord.user.js:168 Uncaught (in promise) CORS issue

#

userscript Despair

turbid hatch
#

huuuh

austere talon
#

huh

grave mangoBOT
# austere talon https://github.com/Vendicated/Vencord/blob/main/browser/GMPolyfill.js#L56-L66

**GMPolyfill.js: **Lines 56-66

async function checkCors(url, method) {
    const headers = parseHeaders(await fetchOptions(url));

    const origin = headers["access-control-allow-origin"];
    if (origin !== "*" && origin !== window.location.origin) return false;

    const methods = headers["access-control-allow-methods"]?.split(/,\s/g);
    if (methods && !methods.includes(method)) return false;

    return true;
}
turbid hatch
#

im goin to sleep

#

fuck dis

austere talon
#

this might be casing issue

austere talon
#

i can tuck u in

somber ginkgo
turbid hatch
#

gngnnn

somber ginkgo
#

gngngngfriendrequestgngngngn

turbid hatch
#

gngngnacceptedgngngngn

tight vapor
#

Is there a thing I can use to get a user's profile and banner?

#

UserStore.getUser?

austere talon
#

whose

#

arbitrary users or only the local one

tight vapor
#

Any user, as long I as I provide an ID

#

Yea getUser works

#

is there a better way to do this?

charred monolithBOT
austere talon
#

yes

#

user argument exists

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Discord Account

LIL JABA#2363

What happens when the bug or crash occurs?

if the sticker has spaces in its name, it will be sent without hiding the link

how to fix:
you can cut the "&name=cool sticker name" and it still will send the sticker. so I suggest you to remove that name part :)

image

What is the expected behaviour?

I expect it to send the sticker hiding t...

tight vapor
charred monolithBOT
verbal pumice
#

how do people even use android <= 7 nowadays

charred monolithBOT
charred monolithBOT
charred monolithBOT
sudden pilot
charred monolithBOT
cunning canyon
#

3 pr in a row

austere talon
#

every time I merge one pr, two new ones get opened

#

at this rate we will reach 100 prs by Christmas

verbal pumice
#

simply merge prs faster πŸ™„

#

not like every other one will brick vencord if unchecked

woeful sable
charred monolithBOT
lime stone
#

what would a good way to intercept message loading be?

austere talon
#

elaborate?

lime stone
#

i want to change the referenced message to make it appear as a reply

austere talon
#

why in the world do you need to intercept message loading to achieve that

#

or wait

#

maybe im not understanding fully

lime stone
#

why wouldn't you?

austere talon
#

like

#

maybe show an image

#

maybe I just understood wrong

lime stone
#

i mean modifying the message when it's first loaded

#

anything else would probably be complicated :p

austere talon
#

yes but

#

what are u trying to do exactly

austere talon
lime stone
#

make pluralkit replies look nicer, i saw someone talk about it

austere talon
#

ah

#

do you know how react works

lime stone
#

not really! lol

austere talon
#

actually u might not need react

austere talon
#

sorry I just misunderstood you

lime stone
#

it's ok

austere talon
#

search for MESSAGE_CREATE and you will find all handlers to it

#

you would just need to patch them mutate messages that are pluralkit

#

to add referencedMessage

#

property

lime stone
#

does that fire when existing messages are loaded?

#

sorry i'm kind of new :P

austere talon
#

yes

#

that fires whenever your discord receives messages from the api

lime stone
#

ah, thanks!

#

i feel like modifying the logic to determine when to render the reply widget would be too complicated

#

i tried doing a console.error to find where it's called from and it was very confusing

#

shame you can't do call hierarchy

#

javascript is more complicated than assembly i swear :P

#

x3

charred monolithBOT
lime stone
#

should this be moved into another file?

verbal pumice
#

shouldn't the edit be done before the message create fires?
sure you can fire an update later but that's not the best ux

lime stone
#

oh, i thought intercept implied that

#

any way to do it earlier?

#

maybe it was the wrong word altogether

verbal pumice
#

yeah what ven said is valid

#

find the handler for MESSAGE_CREATE that handles loading messages and edit that

lime stone
#

ahh

#

what about in the inbox?

charred monolithBOT
#

Discord Account

Isra#1000

What happens when the bug or crash occurs?

The above error is shown in the network tab after the command is initated

What is the expected behaviour?

I expect Vencord to send me a friend invite

How do you recreate this bug or crash?

  1. Verify your phone number if you haven't yet
  2. Download the friend invite plugin
  3. Use the /create friend invite command
  4. Observe the error in the chat and network tab of dev tools

Errors

{"...
verbal pumice
#

thats more complicated

lime stone
#

oh well, less important

verbal pumice
#

think the easiest way to do this is to patch MessageStore.getMessages(channelid).recieveMessage instead
so it replaces it with the modified message everywhere

#

but that could also be way worse tbh

lime stone
#

oh wait

#

ahh

verbal pumice
#

idk it just could shiddohwell

lime stone
#

is there any plugin which already does this?

verbal pumice
#

dont think so
πŸ—Ώ does everything after the message was sent

austere talon
#

just patch MESSAGE_CREATE

#

don't over complicate

verbal pumice
austere talon
#

that's only for your own messages I think

#

but not sure

verbal pumice
#

no thats for all

#

also the only place message create is fired shiddohwell

#

nvm it isnt but that's 100% the "main" handler

lime stone
#

oh yes

#

what's this?

#

owo

turbid hatch
verbal pumice
lime stone
#

ahh

#

i think that's why i didn't use it before :p

#

doesn't seem to work

#

only fires when messages are created, not loaded

austere talon
#

In both cases it should fire

lime stone
#

receiveMessage?

#

pls send a message so i can test! :P

#

(in case it's only my messages too)

verbal pumice
#

hi

lime stone
#

yes, just my messages

#

i think that probably does it

#

also uses same module as messagelogger

verbal pumice
#

oh i forgot that exists

cedar leaf
#

ayooo, nice cloud save

#

how can we selfhost our own backend cloud tho?

#

is there any officiel docker image or we need to build our own?

cedar leaf
#

ayooo sry im blind

#

thx!!

turbid hatch
#

dwdw

#

just curious, why host your own?

#

privacy?

cedar leaf
#

yup

#

i prefer selfhosting things when i can

#

i made myself a homelab just for this purpose

#

own netflix, own gaming servers, own bots, etc etc

turbid hatch
#

fair enough

#

^^

valid iris
#

prayge blessed that it's go based

charred monolithBOT
lime stone
#

ok

#

i accidentally modified outgoing messages instead of incoming!

austere talon
#

be careful ehehe

lime stone
#

luckily i was using another account

#

i think it was both incoming and outgoing but not existing messages

#

i assumed it was existing messages because it was happening a lot, but i'm just in a lot of guilds :P

turbid hatch
#

re @cedar leaf Vencord/Backend#3: i've seen that software before where someone had the issue of it not working correctly, and it was narrowed down to it not setting env vars correctly

#

it is truenas isn't it?

lime stone
#

i just need a way to get every single message that is currently visible

turbid hatch
#

running under plain old docker compose works fine so its not an issue with the container or backend

lime stone
#

what's optimistic for?

turbid hatch
#

wdym

cedar leaf
cedar leaf
lime stone
cedar leaf
#

also i might optimize your dockerfile during the week end cause 1.1Gb for an image is alotπŸ₯²

turbid hatch
#

i can multilayer it

#

i just never saw the point for personal host

#

but i see the point now xd

austere talon
# turbid hatch wdym

an optimistic event is an event that didn't actually happen that the client dispatches with the optimistic assumption that event will soon happen

charred monolithBOT
#
iwa

Discord Account

No response

What happens when the bug or crash occurs?

i dont want to expose my vencord backend im selfhosting, as i'll be the only one using it, so i'm not exposing it to the internet and accessing to it through a vpn
but it seems that the client cannot connect to the backend unless it's https? could we allow http too? or if it's not possible at least specify it in the readme of the backend repo then?

What is the expected behaviour?

the client should a...

austere talon
turbid hatch
#

ahhhhhh

#

that makes sense

#

got it

austere talon
#

It first dispatches that optimistic event before your message was actually sent, then when the message actually gets sent it dispatches a real non optimistic event

#

so usually you want to just ignore optimistic events

austere talon
radiant reef
charred monolithBOT
austere talon
radiant reef
#

deprecated

austere talon
#

get a certificate, even self signed would work assuming u install it on ur pc (i think)

cedar leaf
radiant reef
cedar leaf
#

never exposing my things on the internet

#

thats why https is useless

turbid hatch
#

not something that discord or vencord can easily "fix" (aka disable)

radiant reef
#

mh

cedar leaf
#

ye fair enough

turbid hatch
#

and if we disable it, it adds a fuckton of vulnerabilities

turbid hatch
#

so we'd rather not

austere talon
#

or use some other dns based solution

turbid hatch
#

also

#

i generate and install a selfsigned on my local stuff

jagged cloak
#

love

lavish ridge
#

so u cant use it on any other device

turbid hatch
#

tempted to start running my own home CA

turbid hatch
lavish ridge
#

unless u isntall the cert

cedar leaf
turbid hatch
#

its meant to only flag up as secure for me and insecure for everyone else

#

:P

quick ibex
lavish ridge
#

i have a cloudflare thing and its just for my network

quick ibex
#

EWWWWWWWWWW

austere talon
#

dns based solution works wonderfully holding_back_tears_salute_old3

radiant reef
turbid hatch
#

anyway

quick ibex
#

SI

turbid hatch
#

veeeeeeeeeeeeeeeeeeen~

lavish ridge
#

lets go

austere talon
#

u want caddy jazz?

turbid hatch
#

wait do i have write access to the caddyfiles dir

#

does that mean i couldve just done it myself

austere talon
#

no i think

charred monolithBOT
turbid hatch
#

πŸ₯Ή

#

hold on

quick ibex
radiant reef
austere talon
#

no u dont have access to it silly

quick ibex
#

wym yeah i do

lavish ridge
#

c-can we have permission viewer 😿

turbid hatch
#

I HAVE WRITE ACCESS

#

FOR FUCK SAKE

#

I COULDVE JUST

#

SDHHN89F;ASD789UIASUASNUIODASNIODANIOD

austere talon
turbid hatch
#

nevermind

austere talon
#

u dont

austere talon
#

only root has access

turbid hatch
#

balls are not touching

#

i thought they were

austere talon
#

BALLS??

turbid hatch
#

nano didnt flag up a permissions issue

#

lmfao

turbid hatch
#
[lewi@vendymachine caddyfiles]$ touch balls
touch: cannot touch 'balls': Permission denied
austere talon
vestal grove
#

HAHAHA

quick ibex
#

oh lol you need to log in LMFAO

turbid hatch
#

anyway yes

#

do that and also drop /v1/ from the backend api

#

i already made a version where the versioning is in the app itself

#

:3

vestal grove
#

no I respect you greatly for rolling such a fucked up setup Ven

austere talon
#

rate my uptime

#

this poor phone has been running for 250 days

radiant reef
#

it's time to install vencord mobile

vestal grove
#

based

quick ibex
#

Rate my setup

quick ibex
turbid hatch
#

but yes

#

builds.vencord.dev first

radiant reef
turbid hatch
#

then edit api.vencord.dev

#

<3

radiant reef
#

Why

austere talon
quick ibex
austere talon
#

u know that right

quick ibex
#

yeahi know

quick ibex
jagged cloak
cedar leaf
radiant reef
quick ibex
#

people shit on ubuntu as if it wasnt THE plug and play of the century

quick ibex
radiant reef
jagged cloak
#

nothing is heavier than windows bruh

cedar leaf
#

fr

quick ibex
radiant reef
quick ibex
#

Lmfao

austere talon
#

gonna do the redir

turbid hatch
#

oki

#

remove the uhhh /v1/ bit though

#

oh wait

#

hm

cedar leaf
turbid hatch
#

you cant do both

quick ibex
#

people who piss and shit themselves because of ubuntu are the reason why linux isnt mainstream

turbid hatch
#

i have redirects in the API anyway!

#

its okay

turbid hatch
#

so itd just be like

quick ibex
turbid hatch
#

what

quick ibex
#

blocked

#

average fucking italian

radiant reef
turbid hatch
#
api.vencord.dev {
    reverse_proxy localhost:57467
}
cedar leaf
turbid hatch
#

okay but what about arch for servers

cedar leaf
#

has a ton of preinstalled things, forces you to use their junky snap packet manager whenever they can

quick ibex
#

lmfao

cedar leaf
quick ibex
#

ubuntu is omega bloated

austere talon
#

does it work

quick ibex
#

but its plug and play

turbid hatch
#

this is why i use ubuntu minimal

quick ibex
#

which is all that matters

quick ibex
turbid hatch
#

nxdomain

quick ibex
radiant reef
austere talon
turbid hatch
#

uh

#

ven

cedar leaf
turbid hatch
#

your redir broke the api domain

#

:P

austere talon
#

how

turbid hatch
radiant reef
#

mh?

austere talon
#

huh

turbid hatch
#

it seems to take priority

turbid hatch
#

xd

fiery jungle
austere talon
#

fixed

turbid hatch
#

now remove strip_prefix

austere talon
#

wdym

#

oh

turbid hatch
#

let it send /v1/ prefixes through

austere talon
#

it doesnt resolve for me even though i dropped dns cache

#

dum windows

turbid hatch
#

i cant resolve

austere talon
#

works on my mobile data

austere talon
#

so its dns cache

#

anyway its cause caddy has no access to ur home

turbid hatch
austere talon
#

need to move the files to /var/www

#

i love silly selinux

turbid hatch
#

can i write there

#

:3

austere talon
#

try not

turbid hatch
#

balls cannot touch

austere talon
#

shouldnt 403 i think

#

yes

#

its fixed

radiant reef
turbid hatch
#

its time

austere talon
#

i think i can give u perms to that folder

#

not sure

#

dont explode everything

turbid hatch
#

is that what sudousers are called on whatchamacallit

#

(i dont have a password anyway so i dont think i can elevate unless you set up passwordless sudo)

austere talon
#

:PP

cedar leaf
austere talon
#

silly lewi

turbid hatch
#

true

#

but

#

wait

#

hm

#

does it allow passwords via ssh

cedar leaf
#

selfhosted + not exposed to the internet

turbid hatch
#

or is it ssh key only

austere talon
# turbid hatch is that what sudousers are called on whatchamacallit

The term wheel was first applied to computer user privilege levels after the introduction of the TENEX operating system, later distributed under the name TOPS-20 in the 1960s and early 1970s.[2][3] The term was derived from the slang phrase big wheel, referring to a person with great power or influence.[1]

In the 1980s, the term was imported into Unix culture due to the migration of operating system developers and users from TENEX/TOPS-20 to Unix.[2]

turbid hatch
#

ahh

#

icic

austere talon
#

yes anyone in wheel can use sudo

austere talon
#

it's keys only

turbid hatch
#

cool

#

my password is balls

#

wait

#

i cant set my password

#

VEEEEEEN

austere talon
#

huh?

#

show

turbid hatch
#

can you give me a preliminary one :3

#

i need a password to set one

austere talon
#

i think i did ages ago

turbid hatch
#

but i wiped my password

#

oh wait let me check

radiant reef
austere talon
#

might wanna change it now that it's public though technically it shouldnt matter ahaha

radiant reef
#

lmao

turbid hatch
#

HOLY SHIT

#

WHAT ARE YOUR PASSWORD REQUIREMENTS

austere talon
#

yes

#

so dumb

#

you need capital, number and a symbol

radiant reef
austere talon
#

its so stupid

turbid hatch
#

i just wanted fucking

radiant reef
#

this

turbid hatch
#

balls1

#

but nOoOoOoOo

austere talon
#

minlen=n
Set a minimum password length of n characters. The default value is
6. The maximum for DES crypt-based passwords is 8 characters.

obscure
Enable some extra checks on password strength. These checks are
based on the "obscure" checks in the original shadow package. The
behavior is similar to the pam_cracklib module, but for
non-dictionary-based checks.

#

i will disable

lime stone
#

i hope so :p

#

unless there's another way to test

austere talon
#

interesting

turbid hatch
#

it lies

austere talon
#

but why do u need to know

#
patchMessage(message) {
  if (!message.webhook_id /* might be webhookId too idk */) return;
  ...
}
turbid hatch
#

oh

#

its baked into selinux

#

there's no way of avoiding it unless you turn off the selinux module

#

not even root can ignore it

austere talon
radiant reef
#

lmao

#

huawei servers

austere talon
#

explode

jagged cloak
turbid hatch
#

vencbox

lime stone
#

i find if you remove the embed it appears again

#

and you don't just need to set message_reference, you also need to set referenced_message

turbid hatch
#

@cedar leaf try the new docker image

austere talon
turbid hatch
#

it should be tiny now

austere talon
#

you're unaware of how discords message flow works

#

it first dispatches a MESSAGE_CREATE with no embeds, then dispatches a MESSAGE_UPDATE with the embeds added

#

so when you send a link it immediately shows even if embedding takes a few seconds

lime stone
#

ah

austere talon
#

so to modify embeds you'd likely need to intercept MESSAGE_UPDATE instead

#

or patch the message component

charred monolithBOT
austere talon
#

if you're worried of bad api requests, u can likely use virtual-merge to solve this

#

actually no

#

:P

#

but u can make a proxy that omits the field

#

or make it not enumerable

lime stone
#

i think patching the component is the best solution, i just spent a long time working out how to do it :P

#

now i realise there's another message type

charred monolithBOT
cedar leaf
#

thanks!

turbid hatch
charred monolithBOT
golden gulch
lime stone
#

lol

#

what makes you say that?

#

self_bot=True

charred monolithBOT
austere talon
#

maybe i should read other replies before replying

charred monolithBOT
austere talon
cunning bobcat
#

that's it?

#

and does it have to be twitch?

austere talon
#

yes

cunning bobcat
#

i see

#

and I assume the twitch part of live on twitch cannot be changed then

cunning bobcat
#

bleh #804 when, so users stop being confused

austere talon
#

the import feature is kinda deranged

charred monolithBOT
cunning bobcat
verbal pumice
#

why not lint userplugins

#

not like they get pushed

austere talon
#

i feel like people wouldn't want our linting rules pushed onto them

#

i assume the person who pr'd was annoyed by them

verbal pumice
#

fair enough

cunning bobcat
#

when I make userplugins I just //eslint-disable-next-line header/header :3

charred monolithBOT
#

Detailed Server Tooltips

Adds detailed server tooltips lol

Displays a more detailed tooltip for servers similar to user popouts. Contains a
larger image, owner's tag, date, time and days ago created, date, time and days
ago joined, member count, channel count, role count, region, and whether or not
the server is partnered.

A similar plugin exists for BetterDiscord:
https://github.com/Metalloriff/BetterDiscordPlugins/blob/master/DetailedServerTooltips.plugin.js

charred monolithBOT
charred monolithBOT
grave mangoBOT
jagged cloak
#

whats wrong with that

#

a

#

ig\ they want a toggle to always send silent messages

#

but imo just have whoever mute the channel atp

charred monolithBOT
jagged cloak
#

does it add it on pinned images too

#

well normal ctx isnt there on desktop either but img/link context is

jagged cloak
#

what if i still want to [object Object], about using custom emoji

charred monolithBOT
#

[Plugin] NotificationSounds

Allows you to edit current Discord sounds to new ones.

  • Upload a sound and change the default
  • Scroll through default Discord sounds stored in files (ex. Special Discord calls, Halloween calls, etc).
  • Create a category for each sound.
  • Copy useful features from the plugin.

A similar plugin exists for BetterDiscord: https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/NotificationSounds

austere talon
#

why does this even happen

limber skiff
#

ikr

charred monolithBOT
woeful sable
#

my code so racist

jagged cloak
#

lmao

loud prairie
quick ibex
#

how the fuck did you find that message

charred monolithBOT
austere talon
#

@limber skiff u will lookie

limber skiff
#

I can lookie but not test

austere talon
#

testie

limber skiff
#

not home

austere talon
#

yeah no need to test i did that

limber skiff
#

I'm on another city lol

#

veryy far from computer

austere talon
#

wow

#

what u doing there

charred monolithBOT
desert cosmos
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

JSHandle@error

woeful sable
#

JSHandle@error

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

JSHandle@error

charred monolithBOT
jagged cloak
#

JSHandle@error love

limber skiff
#

you will use findByPropsLazy

#

other than that it looks fine

tight vapor
#

Can you get a user's banner with UserStore.getUser()

austere talon
#

try it and see

jagged cloak
#

i believe thats user not profile so no

tight vapor
#

I just see avatar

tight vapor
jagged cloak
limber skiff
#

(that depends on cache)

austere talon
#

urself will always be cached

#

but yeah

jagged cloak
#

yop read context now

limber skiff
#

huh

austere talon
#
findStore("UserProfileStore").getUserProfile(wp.Common.UserStore.getCurrentUser().id)
tight vapor
#

So if it's not in cache, I'll have to use the Discord rest API?

#

And doing that is selfbotting

limber skiff
#

you can just use discord own function to fetch the profile

tight vapor
#

How do I do that

austere talon
#

why do u want people's banner

woeful sable
#

inb4 xy problem

tight vapor
#

I wanna make a /avatar and /banner cmd

woeful sable
#

does this work for you?

tight vapor
#

I mean, I use that already

#

But typing it is a lot faster

#

Imo

austere talon
#

how

woeful sable
#

why u need to get banners quickly

#

either way

tight vapor
#

I don't NEED to tbh

charred monolithBOT
woeful sable
#

guhh I still get upsell jumpscare if they appear on startup

#

nvm i forgot --watch

#

lets see

cunning canyon
#

i remember someone made all spotify control to command before and said typing is faster lol

limber skiff
#

cant you just patch the function that checks if a notice has been displayed already

#

upsell*

woeful sable
charred monolithBOT
woeful sable
#

the code is insane though they use a bitfield and there's multiple modules across different chunks doing different things with the bitfield

#

so just setting everything to "already dismissed" is the easiest path lol

muted hinge
limber skiff
#

patch the bitfield @woeful sable

woeful sable
#

some code sets it before my code is run

#

so patching prob wont work cuz it can be overwritten completely

limber skiff
#

patch it with regex

#

abuse proxy if needed

woeful sable
#

mm

#

why is the debugger not keeping my breakpoints when I restart

#

so badd

charred monolithBOT
woeful sable
#

I think I did it

charred monolithBOT
woeful sable
#
{
    find: "HUB_WAITLIST_UPSELL=0",
    replacement: {
        match: /(?=(\i)=\{dismissedContents:)new Uint8Array\(0\)(.{8,64}?value:this\}\);)/,
        replace: "Uint8Array.from(Array(128),()=>255)$2;return $1"
    }
}
#

rate

#

that's some goofy ahh deserialisation code I had to patch

charred monolithBOT
woeful sable
#

guhhhh it still isnt working

#

oh my god my patch doesnt work

woeful sable
#

me when I'm typing .+? and patchhelper freezes cuz it tried matching .+

charred monolithBOT
austere talon
#

patchhelper vscode soon

woeful sable
#

vencocd-companion.nvim

austere talon
#

make

austere talon
#

why doesn't he have his online handle on github

#

silly

charred monolithBOT
charred monolithBOT
sleek pine
#

How do you actually find those regexes for the patch? Do you look in the discord minified code, or?

cunning canyon
grave mangoBOT
# cunning canyon ig yes https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md#making-...

**2_PLUGINS.md: **

# Plugins Guide

Welcome to Megu's Plugin Guide! In this file, you will learn about how to write your own plugin!

You don't need to run `pnpm build` every time you make a change. Instead, use `pnpm watch` - this will auto-compile Vencord whenever you make a change. If using code patches (recommended), you will need to CTRL+R to load the changes.

## Plugin Entrypoint

> If it doesn't already exist, create a folder called `userplugins` in the `src` directory of this repo.

1. Create a folder in `src/userplugins/` with the name of your plugin. For example, `src/userplugins/epicPlugin/` - All of your plugin files will go here.

2. Create a file in that folder called `index.ts`

3. In `index.ts`, copy-paste the following template code:

```ts
import definePlugin from "@utils/types";

export default definePlugin({
    name: "Epic Plugin",
    description: "This plugin is absolutely epic",
    authors: [
        {
            id: 12345n,
            name: "Your Name",
        },
    ],
    // Delete `patches` if you are not using code patches, as it will make
    // your plugin require restarts, and your stop() method will not be
... (86 lines left)
charred monolithBOT
#

Race conditions should be fixed, it's really weird how this value gets initialised but this workaround should be good. Basically: even though dismissibleContents is as far as I know completely independent per-client it still attempts to be sent to Discord's API along with other user settings, and to future-proof for more prompts I made the array larger than it should be, so it fails the server-side schema. By setting it to an empty array (no contents dismissed, the initial value) and making...

woeful sable
#

do not the user settings proto

#

worst mistake of my life

#

if anyone has a better name suggestion for that plugin that'd be cool cuz I think it doesn't make it clear what it is

#

most dismissible contents are nitro ads

jagged cloak
#

NoAdPopups?

#

or somethjing like that

#

stop shooting im not a name expert

sudden pilot
#

NoDismissibles

#

or sum

jagged cloak
#

or just make descrition really good (no one will read)

sudden pilot
#

GgkstqllrqasgtkskgsFkkgstwkktwgs
Removes all dismissibles (nitro ad populs, etc)

jagged cloak
#

mangle alll plugin names and task the user with actually reading descriptions

#

unusable (the average user cannot read plugin descriptions)

woeful sable
#

true

#

right now the desc is "Dismiss all upsell popups about Discord features or Nitro ads before you ever see them"

#

something like NoUpsell might be more catchy but its not as accurate

#

NoUpsell
Suppresses all dismissible Nitro and feature ad popups

#

(I have spent too much time thinking I will explod)

sudden pilot
#

yes

woeful sable
#

I got immediately greeted by this since I renamed the plugin and it's no longer enabled

#

😭

sudden pilot
#

get real

jagged cloak
sudden pilot
#

you will .replaceAll("_", " ")

jagged cloak
#

0/10 they didnt all show at once

woeful sable
#

u need to turn them off for them to appear lol

jagged cloak
#

oh

woeful sable
#

on -> dismissed

#

there's also a button at the bottom to undismiss everything

#

do

fleet depot
woeful sable
#

devtools has a builtin beautifier

fleet depot
#

But only for reading. Cuz of CTRLF and other characters you can't regex the beautified code

fleet depot
woeful sable
#

at the bottom

#

patchhelper helps a lot

#

if you build vencord with --watch, it'll show up in the settings sidebar

jagged cloak
#

horror it did explode

woeful sable
#

real

#

you love huge ass popup

jagged cloak
#

giant

#

i never use it i deliberately dont do patches

limber skiff
#

I prefer using regex101

#

hardest part is the actual matching

#

replacement isnt that bad

#

so I just do it and wish it works

#

(when it doesn't I cry and look at the diff in the console)

woeful sable
#

(basically the diff you'd see in patchhelper trolley)

limber skiff
#

yes

woeful sable
#

but ye I get it

limber skiff
#

I also prefer using regex101 cuz I see how long the patch takes

#

I normally copy the whole discord source file

#

so if matching that whole file is fast, matching the single module will have no problem lol

woeful sable
#

btw apparently there was a whole ass sereialiser/deserialiser where this was initialised so I just patched that and gave an empty array as the input shiddohwell

radiant reef
#

πŸ˜”

woeful sable
#

cuz there iS FUCKING SERVER SIDE VERIFICATION

#

its literally not sane

limber skiff
#

either way I spend more time reverse engineering and finding the correct place to patch than making the actual patch

woeful sable
#

real

limber skiff
#

react makes this process 1000% worse

#

because putting breaking points almost never happens

#

because of how react works the call stack is messed up

#

one time I spent 2 days debugging a problem

woeful sable
#

react is malware πŸ’”

limber skiff
#

because a component was getting rendered and I couldn't find where

#

I spent hours trying to reverse engineer the react rendering

#

and couldnt find it

#

then I manually patched some components to return early

#

until I found the component that rendered the one I wanted to find

#

the process that took 2 days turned into a single patch to change an if statement

woeful sable
#

yea this was hell to find cuz I suspected like 5 diff places the thing was being initialised

#

and I put breakpoints in all of them

#

and none were ever reached until way too many attempts

#

i hate

fleet depot
limber skiff
#

break points are super good until you reach a react render

#

or discord parser for text

#

some things are so hard to find nowadays I just look at my other plugins that touch them so I can find the file

fleet depot
limber skiff
#

the parser is a pain in the ass

limber skiff
#

It was a super horrible thing

#

basically discord has a component that acts a router

#

you render it and it modifies the url path of the page

#

That component was being rendered and changing the route which made the thing I wanted to render not appear

#

but because it was a component it was horrible to find where it was called

#

because react call stack is horrible in the debugger

#

I have some tips for finding what renders what and where

#

but too lazy to write rn

fleet depot
#

Q: i was trying out the Vencord companion extension for vs code but i was patching canary instead of stable. Every time I tried to test the patch using the companion I'd get the error that no running discord could be found. Was it cuz it was canary?

#

I was running discord from command line

limber skiff
#

you need to pnpm watch

#

vencord has to be running in dev mode

fleet depot
fleet depot
limber skiff
#

I cant help rn or in the next 2 days because I'm away from my computer

fleet depot
#

All g

#

I dunno the next time I'll take a crack at it

limber skiff
fleet depot
limber skiff
#

you can try reconnecting companion too

#

right click the settings gear in the user panel

#

and there will be an option there

fleet depot
#

I saw those instructions in the file but i wasn't sure what it meant, I feel dumb but... User panel?

#

I was checking the extension settings

jagged cloak
#

right click the settings cog

limber skiff
#

the place where you mute and unmute

jagged cloak
#

ye

fleet depot
#

Ahhhh

#

Discords user settings not vs code

#

Gotcha

#

Okay

#

To-do for next time πŸ‘

#

Thanks guys

limber skiff
#

no prob!

charred monolithBOT
sudden pilot
#

dicord my belovde

charred monolithBOT
muted hinge
cunning canyon
#

@lime stone can i see the css to make banner taller, idk

cunning canyon
#

oh nevermind, fakeProfileTheme already made it taller

#

i havent used fakeProfileTheme