#🧩-plugin-development

1 messages Ā· Page 6 of 1

dull magnet
#

uh

#

I can fix it probably

chrome folio
#

I am just having fun rn loading all users

#

there is also a small margin/padding that looks weird if it's not loaded yet

granite vault
chrome folio
#

I don't know about ratelimites there but they seem to be pretty high (aka not strict) so maybe adding a option that it fetches the first page of all reactions of a message (if uncached) to display the pfps

slow charm
#

should probably not show reactions when there's more than <max> reactions on the same reaction and if more than <max> reactions on the same message

fickle plinth
#

Speaking of the cache, there's a plugin to fix invalid-user for Aliucord

#

Someone should do that for Vencord

#

Unless that's not much of an issue on desktop

slow charm
#

yesyes load up 20k members to cache every single user who reacted on one message

fickle plinth
#

šŸ˜

slow charm
#

it can be way easier than that

fickle plinth
#

I love Discord using tons of ram

#

idk about you

granite vault
slow charm
#

what the aliucord plugin does (and the old bd plugin) is attempt to cache the data of a mentioned user that wasn't already cached not the entirety of a server

fierce tendon
#

ven about to replace me as developer

#

šŸšŽ

dull magnet
#

real

#

armcord will be mine soon

granite vault
granite vault
#

And then it'll stop getting updates because ven forgor

dull magnet
slow charm
#

did u reply to the wrong msg or

dull magnet
#

oh you mean validuser

slow charm
#

yeah

granite vault
fickle plinth
#

How's the vencord support for armcord going

granite vault
#

Gone

fickle plinth
#

Is it just like the web extension

granite vault
dull magnet
#

for whoreacted if u hover a message it fetches users

fickle plinth
#

Ah

dull magnet
#

so maybe the plugin could just force call the hover callback

#

to fetch people

granite vault
#

Yop

slow charm
#

can't u do funny math

granite vault
granite vault
slow charm
#

u can get reaction count and u display max four users

fierce tendon
slow charm
#

20 reactions show 4 users +16

fierce tendon
#

You just pick it from the menu and it installs lol

#
  • auto updates
fickle plinth
#

nice

#

I'm gonna install armcord on my usb drive beacuse official discord client is just too fat

#

and I don't feel like using browser discord

granite vault
slow charm
#

is armcord on scoop outdated

fickle plinth
#

I love scoop

slow charm
#

make a release now @fierce tendon

dull magnet
#

armcord code is absolutely wild

fickle plinth
#

You mean the lack of empty space between lines?

next stone
fickle plinth
#

I don't get why legcord uses Python

dull magnet
#

it worksā„¢ though

#

that's all that really matters

fickle plinth
#

Yeah

fickle plinth
next stone
#

didn't read the code

granite vault
fickle plinth
#

It launches pywebview but why

granite vault
#

More like didn't read description trolley

opal fern
next stone
#

"should've used webview!!!"

granite vault
fickle plinth
#

what do you mean quizzical

regal rune
granite vault
#

Your question is answered in the readme of legcord

#

Bozo

dull magnet
#

it doesn't explain why it uses a python script to launch

fickle plinth
#

Yeah

granite vault
#

Well why python script idfk

#

But the web view bs he was spitting out

fickle plinth
fickle plinth
dull magnet
#

python uses insane resources so using a wrapper script with 2 lines of python will waste loads of resources for almost nothing

fickle plinth
#

I meant using the go library

#

or any of the wrappers

granite vault
#

Because fridge is python and js codemonkey

slow charm
#

YES YES USE RUST USE 26854 CRATES FOR 3 LOC

granite vault
fickle plinth
#

using python makes legcord look like a troll

dull magnet
#

looks like nim can import C(--), so it could just import libwebkit.h or whatever tf there is and call it from nim

#

and yeet python

granite vault
#

@fierce tendon

fickle plinth
#

This server is rustphobic smh

slow charm
#

it amkes no sense

#

to use fucking tauri

#

0

#

sense

fickle plinth
slow charm
#

you are ruststruck

granite vault
#

Fr

#

Rustphobia all the way

fickle plinth
#

Kyirocord will feature only rust wasm code

granite vault
#

I love installing a bajillion crates

dull magnet
#

so instead import this from nim and you can yeet python entirely

fickle plinth
#

That library has an actual nim wrapper

granite vault
#

No shit

dull magnet
#

@fierce tendon immediately

granite vault
#

You will pr@dull magnet

fickle plinth
#

tbh using tauri would still be better than using python

slow charm
#

YOU ARE INSANE

fickle plinth
dull magnet
#

tauri is very poopy

fickle plinth
#

(I never actually used tauri btw)

dull magnet
#

someone on this server I don't remember who tried tauri and it literally used more ram than electron

fickle plinth
#

I only used wry if anything

granite vault
dull magnet
#

šŸ’€

slow charm
#

it's literally just so unnecessary

fickle plinth
#

the fucking window creator

slow charm
#

it's a WHOLE electron alternative

granite vault
#

And a shit one at that for now

#

Maybe in a few years

slow charm
#

no it's good

fickle plinth
granite vault
fickle plinth
#

I will make OpenAsar a tauri wrapper for Discord

granite vault
#

Insanity

dull magnet
#

horrid

fierce tendon
#

it uses ie11 on Windows lmao

dull magnet
#

y

#

LMAOOO

fierce tendon
#

there's no modern webview bindings for nim

granite vault
dull magnet
#

can't u fork and update

#

or just bind the c bindings

fierce tendon
#

cuz webview changed to C++ and now nim doesn't play with it well

granite vault
fierce tendon
#

there were attempts but they're not cross platform

#

legcord just uses pywebview lol

fierce tendon
#

Well semi automatically

#

If you want to make a wrapper lib you need to hook up nim functions to C functions

#

it's a bit of work

fierce tendon
slow charm
#

@fickle plinth here's your fucking tauri code bro

fickle plinth
fierce tendon
#

why is legcord name??

#

I'm gonna sue!

slow charm
#

look above

fickle plinth
#

How much is the actual executable though

slow charm
#

debug is 69.5mb

granite vault
#

Guhh

fickle plinth
#

And release?

granite vault
#

What about release

slow charm
#

release is 13.5mb

fickle plinth
#

Oh

granite vault
fickle plinth
#

wtf

slow charm
#

granted it can be less

green vessel
#

yeah crates take so much space

slow charm
#

w optimization

#

still dumb as fuck

fickle plinth
#

I'm no longer a fan of tauri

slow charm
#

it's not for this

fickle plinth
#

dioxus still cool though

slow charm
#

at all

#

it's bundled for much bigger

fickle plinth
#

mainly dioxus-desktop

granite vault
slow charm
green vessel
#

world if cef was optimized

granite vault
dull magnet
green vessel
#

time to fork cef and optimize it

#

actually with all this fame on electron i don’t get why they haven’t made their own shit lazy mfs

#

or at the very least optimize cef

granite vault
#

Fr

#

Ig the mindset of "computers are fast enough today, it'll be fine"

green vessel
#

yeah i think it’s down right laughable that the only company with bearable cef is riot games

#

it’s also so stupid how electron keeps on ā€œoptimizingā€ their project while cef is the main issue, this is like ā€œokay guys my game runs on 16fps seems like i can’t aim so im getting a new mouseā€

granite vault
chrome folio
#

How do embed work

dull magnet
#

uh

#

the typings are mad fucked up for embeds lol

chrome folio
#

lol

dull magnet
#

you just use normal embed (like api docs say)

#

not the rawTitle

chrome folio
#

Already thought that this looks weird lol

opal fern
#

dunno if it is my theme, but why member since showing in user accounts

dull magnet
#

discord feature

opal fern
#

actual braindead discord moment

wraith carbon
#

Done this, not sure what I can compare them to though (if anything)

#

Or.. Could do that if all are new, then none are new, as it's impossible that they're all new

dull magnet
#

yes do that

obsidian sorrel
#

is anyone already working on dynamically installing userplugins?

#

cause i wanna do that rn with @shadow ruin

#

and they dont know if anyone already did this

#

(also when firefox support)

shadow ruin
#

when you marry m,e

austere gulch
#

i think i did an oopsie and didn't add the key to the components

#

will fix

#

can you pull and git checkout fix/plugin-list-keys & rebuild and tell me if it fixes?

#

poggers

#

i will blindly merge this inconsequential change

dull magnet
austere gulch
#

ven beat me to it

dull magnet
#

u can finsh it

green vessel
#

i have arrived

green vessel
wraith carbon
#

So I don't have to worry about fixing conflicts

green vessel
#

rip so sad

#

couldnt be me tonguecat

granite vault
#

@dull magnet how find props if idk their name trolley

dull magnet
#

what module do u wanna find

#

I should finish my client modding crash course

granite vault
#

I'm curious how SpotifyAPIMarker was found

#

BC it's nowhere to be found in Discord's js

#

Oh

#

Lol

#

That makes more sense

opal fern
dull magnet
#

yeah

granite vault
#

I got confused BC of that

dull magnet
#

basically I needed to patch that module anyway because it doesn't have post

#

so I just also added my own marker so it's easy to find

granite vault
#

I'm used to aliucordrn's plugin thing

#

Don't get confused by something appearing BC of regex patch

dull magnet
#

what thing

#

oh u mean monkey patches

granite vault
#

Ye

dull magnet
#

yeah ig regex patches can be confusing because we're literally rewriting discords code trolley trolley

granite vault
#

Ye

cinder wigeon
#

Injections are so much better than regex patches in statically typed languages

#

But swc + dynamic language + need exported to patch

dull magnet
#

monkey patching in discord swc is horrid

granite vault
dull magnet
granite vault
#

What did u fix trolley

dull magnet
granite vault
#

Ah

dull magnet
#

lmao wdym

cinder wigeon
granite vault
#

You love trolley

dull magnet
#

but still it's not the same

#

ohhh

#

yeah just make the patch also add delete

granite vault
dull magnet
#

pog

#

does it work

#

nicee

granite vault
#

Did u patch oauth link gen?

#

Sectrolley

#

As all things should be

#

Nice

dull magnet
#

why do u even need to do oauth

granite vault
#

Scopes

dull magnet
#

lol

granite vault
#

user-library-modify and user-library-read are the scopes that are needed to save/read saved songs

dull magnet
#

so people need to reauth

granite vault
#

Ye

dull magnet
austere gulch
#

meowdal

dull magnet
#

discord will love having tokens with permissions they don't request

granite vault
austere gulch
potent fox
wanton sierra
granite vault
#

@dull magnet does regex patching replace all occurences trolley

#

well more like how the fuck can i check if my patch happened or not

austere gulch
#

if it didn't happen, it would print in console

#

you can also find the resulting code in one of these if it patched successfully

granite vault
#

ah

#

ty

#

alr it patched successfully

#

lol

austere gulch
#

xd

granite vault
#

alot less cancer than i initially thought

dull magnet
#

You can just search Patched by PluginName

slow charm
#

could be patched by more than one plugin

granite vault
dull magnet
#

the easiest way to find how ur patch looks is to just search for the code ur patch inserts

#

but also just use Patchhelper lmao

#

it shows u nice diff and stuff trolley

granite vault
#

yeah, I used PatchHelper trolley

#

I can't add /g there tho

#

no more console spam

dull magnet
#

source maps still useful to have sourcemaps for vencord

#

what if

#

intercept requests with electron

#

if request is for discord source map return empty string

#

so it doesn error

granite vault
#

true trolley

#

I just turned off sourcemaps bc of the console spam

#

very annoying

dull magnet
#

you can just use filter

granite vault
#

ah

#

true

#

I was trying to patch the emote picker experiment trolley

#

to attempt to revert big emotes

#

but doesn't work unfortunately, ig it's gotta be done on css

#

or patch discord's component for emojis

dull magnet
#

WIP console filter to hide spammy/useless messages, I will update this whenevr I add smth new annoying (or reply with ur own addition)

-/load\ssource\smap/ 
-/\[DEPRECATED\]/ 
-/render\swindow/ 
-/\[Violation\]/ 
-/Deprecation/ 
-/GET.+404/ 
-/status of 404/ 
-/duplicate\slistener/ 
granite vault
#

hm?

dull magnet
#

what

granite vault
#

all goes in 1 line ig

slow charm
dull magnet
#

you need spaces

dull magnet
#

i added spaces at the end of each line so it copies properly

dull magnet
slow charm
#

unfailed

dull magnet
#

i already have [DEPRECATED] doesnt that work

granite vault
#

you love

dull magnet
#

oh that lmao

granite vault
#

ye

dull magnet
#

done

granite vault
#

pog

dull magnet
#

could also add 404 and similar errors

granite vault
#

-/\[GatewaySocket\]/

austere gulch
dull magnet
#

added 404

granite vault
#

nice

granite vault
dull magnet
#

bro

#

thats literally gateway logu enabled in dev settings lmao

granite vault
#

where

dull magnet
#

disable verbose level or disable gateway log xd

granite vault
#

i never turned on any of the dev settings

austere gulch
#

should only need value and onchange for checkbox

#

o

cursive plank
#

Usually the onChange callback has a boolean parameter

#

I kinda think this should be a toggle and not a checkbox

#

Like, the text to change

near aurora
#

checkbox good

cursive plank
#

Also, do you hate the Spotify client that much?

#

You'd rather use discord to control it?

#

Inb4 someone embeds discord within the Spotify client using spicetify

near aurora
#

SpotifyControls is really good because you don't have to have the spotify electron client in foreground

cursive plank
#

I wish I knew what CEF is

near aurora
#

still, chrome widgetWin_1 window class

#

bloat

cursive plank
#

But it uses react

#

And I know it

dull magnet
#

youre using it completely wrong

near aurora
#

nico add urself to devs in plugin index

#

in the pr

#

ok

dull magnet
#
<Menu.MenuCheckboxItem
  id="foo"
  label="foo"
  checked={checked}
  action={setChecked}
/>```
cursive plank
#

So like a lite version of electron?
(In comparison I mean)

near aurora
#

still the entrie chrome is running

#

slightly

#

not by much

#

id rather have everything that's possible as a pwa (in a perfect world)

#

that way only 1 main chromium process runs for most apps

#

and not 10 different ones

#

new tab is faster than a whole new Browser

cursive plank
#

I don't like PWAs bc often enough, you can't export your data

And if you change your browser nothing can be transferred over

near aurora
#

nico you can swap the checked and unchecked checkbox svgs for the button no?

#

sorry heart

cursive plank
#

Linux also has qt web engine and smth from GTK as well

near aurora
#

ok

cursive plank
#

Since discord already uses native code + js

Why not use tauri?

#

Native code for the overlay, dunno about any other place

#

Even tho I advocate for them

It still feels kinda early

dull magnet
#

there is wdym

#

show code

#

wha

#

if you need that then using a discord component isnt the right approach

#

make a custom component

#
function MyCustomitem() {
  return (
    <Flex>
      <Forms.FormText>Like</Forms.FormText>
      <Svg />
    </Flex>
  );
}

<Menu.MenuItem
  id="idk if u still need this"
  label="still dunno"
  render={MyCustomItem}
  action={isThisStillUsedOrShouldYouJustMakeUrOwnOnClickIdek}
/>```
#

smth like this iirc

cursive plank
#

@dull magnet can we please bundle a library?

#

Like Mantine or AntDesign

#

I really like Mantine's hooks

#

I really love Mantine

#

Been using it professionally since September

green vessel
#

thats a github moment actually because git does recognise you moved a file and edited it

#

youve chaged too many lines so it thinks it a new file

granite wharf
#

ts -> tsx

#

love

chrome folio
#

you deleted ts file and created tsx file (for git)

dull magnet
#

git recognises renames, but if you change the file too much it doesnt :P

#

like cloudburst said

#

original is 205, new is 295

green vessel
#

yes

cursive plank
#

Git is just basic

cursive plank
cursive plank
green vessel
#

hi

cursive plank
#

Hi

green vessel
cursive plank
#

Lmao

silver cave
#

Yop you will use git mv

#

forces it to do properly

cinder wigeon
#

works without dev mode on too

#

discord is weird

granite vault
cursive plank
#

@dull magnet the plugin settings modal has two buttons for exiting

One is "exit w/o saving" and the other is "save and exit"

Why not name the first one just "exit"? It is kinda obvious that it does not save since there is another button for that

#

Well, my concern is not that, it just looks ugly

#

And I gave an actual reason for why it could be renamed

granite vault
#

Name the first one cancel trolley

sharp lantern
#

how do i open devtools

austere gulch
#

ctrl shift i

#

you love

chrome folio
#

it also could be win+m

#

or win+L

elfin latch
#

f12

chrome folio
#

that’s web

elfin latch
#

f

#

12

near aurora
#

horror

#

how 2 fix????

dull magnet
#

theme issue likey

austere gulch
#

j

#

pick your poison

proud hollow
#

Cancel - Save & Close

austere gulch
#

option 3

simple folio
#

that one

granite vault
#

Option 3 best

#

Love

austere gulch
#

done

#

merged

#

exploded

granite vault
#

Pog

#

Based megu

austere gulch
proud hollow
slow charm
#

@austere gulch INSANE

#

just make it save

#

tf

#

save and cancel

#

like

#

save | cancel

austere gulch
#

no

#

save does not imply close

grim hare
#

this is the same thing that windows does with OK, Cancel, and Apply on all of its billion dialogs

#

and no one knows the difference between Apply and OK because everyone still clicks apply before OK

slow charm
#

functionally no one will cry if it's just save

#

apply and ok imples save and continue and save and close

grim hare
#

it's all ambiguous, yes, that's the point I was trying to make

dull magnet
#

ok = save and exit
apply = save
close = exit

#

unless deranged

cinder wigeon
#

I always press apply then ok

#

Idk why

lone panther
#

same

dull magnet
#

wha

#

show code lmao

#

why are their weird question mark boxes

#

gotta use funny arrow function

#

I see, probably there's a base item you should use

#

try to find an instance if discord using a custom item in the code

chrome folio
dull magnet
#

should help you find the right item

dull magnet
chrome folio
#

its me with thumbs up

#

it was on new year this year so was a bit drunk

dull magnet
#

I mean

#

it's so dark

#

I'm trying to figure out where what is

dull magnet
#

side view with u sitting?

chrome folio
#

yes

#

idk where the original img is

dull magnet
#

Also thanks owo

#

I will look soon

chrome folio
#

np

#

I always hate that you review stuff when I sleep

granite vault
dull magnet
#

wtf is LodashWrapper

wraith carbon
#

A erm wrapper for lodash

#

i guess - that's why i asked for someone to check

near aurora
#

i think the plugin with custom messages for startup is my favorite

dull magnet
#

feel free to pr more!!

#

im uncreative asf

near aurora
#

okay i was about to

#

how do i encode/decode the xor thingy hto

#

i know the key but what to run

wraith carbon
near aurora
#

no

#

the loading message

wraith carbon
#

aahh

granite vault
#

xor goes both ways lol

near aurora
#

good

granite vault
#
    xor = function(quote) {
        const key = "read if cute";
        const codes = Array.from(quote, (s, i) => s.charCodeAt(0) ^ (i % key.length));
        return String.fromCharCode(...codes);
    }
#

u can run xor('whatever') and it'll return the xor'd version

#

if u run xor with the xor'd version, you'll get back the original

#

ven will 1984 this because yes

dull magnet
#

yeah just run the message through the function trolley

granite vault
#

yop

#
const quotes = [
    "Eyrokac",
    "Rdcg$l`'k|~n",
    'H`tf$d&iajo+d`{"',
    "Sucqplh`(Eclhualva()&",
    "Lncgmka'8KNMDC,shpanf'`x./,",
    "Ioqweijnfn*IeuvfvAotkfxo./,",
    'Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao"bja&amdkge!RloƬkhf)hyedfjjb*\'^hzdrdmm$lu\'|ao+mnqw$fijxh~bbmg#TjmƮefd+fnp#lpkffz5',
    "h",
    "sijklm&cam*rot\"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>\"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$",
    'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',
    "Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n",
    "(!ͣ³$͙ʐ'ͩ¹#",
    "(ļ¾ˆā——ćƒ­ā—‘,ļ¾-2ļ½¬ļ¾•āœ¬",
    "Ynw#hjil(ze+psgwp|&sgmkr!",
    "Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-",
    "3/3750?5><9>885:7",
    "mdmt",
    "Wdn`khc+(oxbeof",
    'Ig"zkp*\'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed"wl`&Kangj igbhqn\'d`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb',
    "Tscmw%Tnoa~x"
];

function xor(quote) {
    const key = "read if cute";
    const codes = Array.from(quote, (s, i) => s.charCodeAt(0) ^ (i % key.length));
    return String.fromCharCode(...codes);
}

for(var i in quotes) console.log(xor(quotes.at(i)))
#

ez

silver cave
granite vault
#

yes

#

it's literally in vencord source

silver cave
#

Horror

#

Discord will plode soon

dull magnet
#

what

granite vault
#

I will implode

dull magnet
#

that's vencord plugin lmao

#

not discord

silver cave
#

oh I remember hearing discord also xors their quotes

granite vault
#

do they?

dull magnet
#

they don't I think

wraith carbon
#

lol

silver cave
#

Idk

average vencord contributor spreading misinformation

dull magnet
#

someone pr more quotes

granite vault
#

im retarded

chrome folio
#

@dull magnetcheck my pr before I go sleep again šŸ˜”

silver cave
#

Implod

wraith carbon
granite vault
#

huh

#

oh

#

lol

dull magnet
chrome folio
#

all good

#

I just usually go sleep around 9-10 pm and you check at like 4am

granite vault
#

average ven response time

dull magnet
#

I wish github had a way to disable the "pull requests from first time contributors need manual approval for workflows"

#

who cares if someone mines bitcoin in my repo

#

let them get the bag

chrome folio
#

who makes bit coin mining plugin

dull magnet
#

that's literally why they added that workflow approval lmao

chrome folio
#

lol

granite vault
dull magnet
#

because people would pr bitcoin miner workflows to random repos and mine bitcoin with their ci minutes

#

cause ci minutes are limited for some repos

#

idk I have infinite?

granite vault
#

oh?

dull magnet
#

so idec

viral roost
#

doesnt the ci run inside of your fork instead of the main repo?

dull magnet
#

it runs in the main repo

#

idk why it doesn't run in the fork it's stupid

granite vault
#

ven github edu or smth?

chrome folio
dull magnet
#

why don't u have infinite

chrome folio
#

idk

granite vault
#

2k minutes is for gh free

#

3k is for gh pro

#

lol

chrome folio
dull magnet
#

btw how do u check that

chrome folio
granite vault
dull magnet
#

I definitely don't have 0 ci minutes

granite vault
#

šŸ’€

dull magnet
#

GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners. For private repositories, each GitHub account receives a certain amount of free minutes and storage for use with GitHub-hosted runners, depending on the product used with the account. Any usage beyond the included amounts is controlled by spending limits.

granite vault
#

ah

dull magnet
#

public repos have no limit

granite vault
#

bitcoin mining in public repos it is

viral roost
#

so youre free to pr bitcoin miners and nobody loses minutes

granite vault
#

yop

#

lovely

chrome folio
#

@dull magnet bitcoin miner added luna_thumbs

near aurora
#

@dull magnet check dms for new loading quotes i wrote to approve them before i xor them

dull magnet
#

btw why is it called messageTags

#

wouldn't customTags make more sense

chrome folio
#

no

near aurora
#

vennn pls check epic and cool loading messages

chrome folio
#

and not a custom "Montag", "Dienstag" etc

#

this is totally not an excuse

dull magnet
#

LOL

#

CustomTag

#

Dƶnerstag

chrome folio
#

and then there is Mitwoch

dull magnet
#

can u change ur bio to "I am the official discord. everything I say should be taken literally and I truly mean it. I am a threat to society"

chrome folio
#

I certified mod in my server told me that I get germinated for using discord so thats why I added that lmao

dull magnet
#

lmaoo

#

certified mod as in discord mod badge?

#

btw how do u even call urself discord, I'm pretty sure they block that word from nicknames

#

do u have some funky characters in there

proud hollow
#

it's only a nick on the server, maybe it's not checked then

chrome folio
granite vault
chrome folio
#

no they dont even block in Nicknames

#

only bots, user-usernames and webhooks

dull magnet
#

oh only bots

austere gulch
#

that's been around for

#

ages

#

the annoying thing is you cant set the expiry

#

it's just always a week

#

you can only make it for yourself

dull magnet
#

there's a vencord plugin to create them

green vessel
opal fern
#

@dull magnet ^

granite wharf
#

send vid

#

@potent fox I have your token (vps nitro sniper)

potent fox
#

CLOSE AND FORGET IMMEDIATLY

granite wharf
#

I'm kidding

#

I'm at school

#

explde

#

you should enter your token manually after every restart and store randomized in memory

potent fox
#

lazy

granite wharf
#

I wouldn't store my token like that on a shared vps

#

guh

potent fox
#

only people that have access to that is ven and you

granite wharf
#

yeah ig

potent fox
#

and I trust to you two

#

NO NOT THE TROLLEY

dull magnet
silver cave
#

AND WHY DOES THIS WORK

#

oh that reminds me of you send a link to a message in a public server clicking the link joins the server without confirmation šŸšŽ

green vessel
#

discord is insane

silver cave
#

Wait what

#

So there's no ui for this I assume

#

is it experiment or something

#

veval explod

shrewd tundraBOT
silver cave
#

fix

dull magnet
#

theres vencord plugin for it

granite wharf
#

veval console.log(process.env)

shrewd tundraBOT
dull magnet
#

veval console.log("uwu")

shrewd tundraBOT
dull magnet
#

it doesnt even give u console output

#

i actually have fake console for eval

#

but was too lazy to format output

#

veval console.log

shrewd tundraBOT
granite vault
dull magnet
granite vault
#

You will explod

dull magnet
#

veval console._formatLines

shrewd tundraBOT
dull magnet
#

oop

granite vault
#

Ven exposed

dull magnet
#

veval "ba"+ +"tman"+"a"

shrewd tundraBOT
granite vault
#

You love N/A

near aurora
#

veval 120394871230984712309487120394817230948 + 123904871230498123740918237409

near aurora
#

lmfao

#

veval 2+2

shrewd tundraBOT
near aurora
#

real

heavy garden
#

@dull magnet better lazy scrollers when

dull magnet
#

veval 120394871230984712309487120394817230948n + 123904871230498123740918237409n

shrewd tundraBOT
heavy garden
grim hare
#

there's not really a way to make them "better"

#

that's just the way they need to work

#

dynamically sized items are hard to lazily scroll accurately

slender copper
granite vault
#

Explod

green vessel
shadow ruin
#

veval explod

shrewd tundraBOT
#

owo

green vessel
#

vexplod

dull magnet
#

return [4, r.Z.get({
url: v(t, e, i),
query: {
limit: a,
after: o
},
oldFormErrors: !0
})];
s = l.sent();
n.Z.dispatch({
type: "MESSAGE_REACTION_ADD_USERS",
channelId: t,
messageId: e,
users: s.body,
emoji: i
});

#

explod

wraith carbon
#

how do I get message item from a MESSAGE type command

#

can't find

dull magnet
dull magnet
cinder wigeon
#

i hate ui i hate ui i hate ui i hate ui i hate ui i hate ui i hate ui i hate ui i hate ui i hate ui

cinder wigeon
#

@dull magnet hi idk how react works well, I open the modal but I also want to use an async value for the dropdown default, how would I do that
this is my current code I just tried, but it doesn't work because "Hooks can only be called inside of the body of a function component"
https://hst.sh/qexukaceze.tsx

dull magnet
#

either put the fetchPronouns above the openModal and use regular await or use openModalLazy with an async function (you can find examples in code i think)

cinder wigeon
#

Oh I'm dumb

#

I thought I tried putting it outside the openmodal but I actually didn't so it still errored

#

Do those both do the same thing, only open modal after it's fetched

dull magnet
#

yes

#
function openModalLazy(modalFactory) {
  modalFactory.then(openModal)
}
#

this is literally all it does

#

anyway you can just do

openModal(props => <PronounModal {...props} userId={userId} />)
#

then inside that use hooks like usual

green vessel
cinder wigeon
#

what

#

may I introduce you to: half the people on the internet

green vessel
#

there are no women on discord 🄱

viral roost
#

he/they

green vessel
#

well it has boy in the name

#

point still stands

cinder wigeon
green vessel
#

who cares about quiltmc only good thing they made is that quiltflower thing

dull magnet
#

this server has more trans girls than males probably

#

and also other girls but they seem to be a minority at least in the active people I know

#

soon cloudburst will use she/they pronouns as well

granite vault
green vessel
simple folio
#

good thing i don't drink water

austere gulch
#

mm estrogen

cinder wigeon
deft hull
#

I kinda wanna add a plugin just because I wanted it but i'm too lazy too at the same time

dull magnet
#

do it bleh

deft hull
#

my status

#

i just realized there's no proper theme system

amber mantle
#

no but theres css trolley

#

to import themes from

viral roost
deft hull
#

@dull magnet can i submit multiple plugins in a single pr

dull magnet
#

I'd rather u do one pr per plugin

deft hull
#

rip k

#

welp time to do smth

#

uninstall production and install development :/

granite vault
deft hull
deft hull
#

what is the $&, part

#

also you're using js regex right

#

making sure

#

wtf, inspect doesn't prettyify the sources anymore

green vessel
#

$& inserts the entire match

granite wharf
#

oh would've been nice to know earlier trolley

#

I've been wrapping everything in multiple layers of groups

#

trolle

green vessel
#

ye I did that too before I knew about $&

deft hull
#

bruh simplemarkdown is messing up my head

#

i can't figure out how to style any of it

#

because there isn't any react shit

#

fuck

trail ginkgo
#

lol

normal forge
proud parrotBOT
trail ginkgo
#

from some debugging it looks like it means the client sent the message

#

more specifically i think its an event fired from the client to itself when it sends a message

#

rather than a message_create from the gateway

normal forge
#

does that include interaction (slash command)?

trail ginkgo
#

yea basically an 'optimistic' event is the event for when the client has initiated something but hasnt gotten a response from the server yet. eg: when ur message is first grey when u press enter

#

hm i dont think so but i can see if theres a dispatcher event for that

#

what are you trying to do?

normal forge
#

Just wanting to know if optimistic is necessary for my plugin.

trail ginkgo
#

that helps me none

cinder wigeon
#

So that grey message before it's actually sent

normal forge
#

So if my plugin only receiving dispatch (editing it later) and no connection or whatsoever for sending message, then I guess is not necessary?

trail ginkgo
#

it really depends on what you're doing

#

im not sure if u mean ur trying to edit a dispatch as it fires, or if ur just trying to grab data from dispatch

#

if ur trying to as it fires, theres likely a better way to do what you're trying to do

normal forge
trail ginkgo
#

do u want to edit the data if the original author is the currently logged in user

#

if so, include optimistic events
if not, exclude optimistic events

normal forge
proud parrotBOT
# normal forge So that means `optimistic` checking is actually not necessary in this plugin? ht...

**moyai.ts: **Lines 63-76

async onMessage(e: IMessageCreate) {
    if (e.optimistic || e.type !== "MESSAGE_CREATE") return;
    if (e.message.state === "SENDING") return;
    if (Settings.plugins.Moyai.ignoreBots && e.message.author?.bot) return;
    if (!e.message.content) return;
    if (e.channelId !== SelectedChannelStore.getChannelId()) return;

    const moyaiCount = getMoyaiCount(e.message.content);

    for (let i = 0; i < moyaiCount; i++) {
        boom();
        await sleep(300);
    }
},
normal forge
#

wait nvm, I get it now.

trail ginkgo
#

those if statements just make sure the boom sound doesnt play if the client is sending a reaction / message

#

that way if you end up not being allowed to send the message / react, it didnt play a boom for no reason

normal forge
#

Does anyone know how to fix this typescript error?
I deadass know for sure that getCurrentUser are returning avatarDecoration key. (image 1)

I tried to change the type to UserJSON (idk why i did this) and got this error. (image 2)
ps: i have 0 knowledge about typescript

trail ginkgo
#

i think the vencord typings are just outdated, avatar decorations havent been in stable for long i think

#

make a pr, ps: the type would be avatarDecoration: string | null

normal forge
#

vencord typings or discord-types?

trail ginkgo
#

if u ctrl + click getCurrentUser you'll find the typedef for that method

#

then u can ctrl + click the User return type

#

and you'll find out what is defining it

#

it looks like its coming from discord-types, and the repo looks kinda dead

#

@normal forge try this as an easier fix:

type UserWithDecoration = User & { avatarDecoration?: string | null };

const userData: UserWithDecoration = UserStore.getCurrentUser();
normal forge
#

Thank you!

viral roost
trail ginkgo
viral roost
#

genuine question cause im bad at typescript too

trail ginkgo
#

nah it is the same thing, im just more used to using the type keyword

viral roost
#

fair enough

trail ginkgo
#

it just makes more sense to me because interface just has extends keyword

#

but with type i can think in terms of any operator / generic

viral roost
#

it depends on who you ask ig

trail ginkgo
#

yea its just preference

#

i think i only prefer interface when im trying to overwrite a type

#

but you could probably catch me doing it anyways, the golang in me escapes sometimes

dull magnet
#

when you send a message, the client immediately dispatches an optimistic event even before the send succeeds. this is to render the greyed out pending message. then once the send succeeded it sends another event for the exact same message that isn't optimistic. so without the optimistic check it'd trigger twice

trail ginkgo
#

lol i missed that condition but thats obv a much more valid reason

dull magnet
#

vapo why did u do child src instead of worker src in ur armcord pr? what's the benefit of that other than allowing iframes which seems kinda unsafe

trail ginkgo
#

tldr was lazy but

#

the reaosn is the csp only replaces existing policies

dull magnet
#

lolz

trail ginkgo
#

discord doesnt set worker-src, so it falls back on child-src

#

i could just make another set for replaceoradd policies though

dull magnet
#

would probably be a lot better to use something like https://www.npmjs.com/package/csp-parse instead of regex replace anyway

#

deprecated sillytime

trail ginkgo
#

biug red bannge

#

bangner red

dull magnet
#

oh wait what

proud parrotBOT
# dull magnet https://github.com/helmetjs/content-security-policy-parser/blob/main/index.ts

**index.ts: **

interface PolicyResult {
  [key: string]: string[];
}

export = (policy: string): PolicyResult => {
  const result: PolicyResult = {};
  policy.split(";").forEach((directive) => {
    const [directiveKey, ...directiveValue] = directive.trim().split(/\s+/g);
    if (
      directiveKey &&
      !Object.prototype.hasOwnProperty.call(result, directiveKey)
    ) {
      result[directiveKey] = directiveValue;
    }
  });
  return result;
};

dull magnet
#

it's super easy to parse

trail ginkgo
#

cookie style

dull magnet
#

could just do that and do it properly instead

trail ginkgo
#

i think its literally

dull magnet
#

like parse, modify, join

trail ginkgo
#

oh no theres no key delimiter

#

but yea

#

sounds good

dull magnet
#

just space

trail ginkgo
#

wew

fierce tendon
#

thank you for your open source contribution

#

smh virus

trail ginkgo
#

thanks for the github secrets

fierce tendon
#

šŸ‘šŸ‘

dull magnet
#

thanks for merging token logger

fierce tendon
#

everything for you <3

wraith carbon
regal rune
#

formatting commit

deft hull
dull magnet
#

simplemarkdown is funny

#

what u trying to do fish

deft hull
#

Rce

#

Think powercord acronym not general coding acronym

dull magnet
#

Holy shit fish adding remote code execution

#

role colour everywhere right

austere gulch
#

le fishe

deft hull
#

Yes

cursive plank
#

rule #1: no illegal content
Ven: exists
rule #1: sweats

#

TL;DR Ven is illegal content

olive osprey
austere gulch
#

shiggy wiggy

dull magnet
#

yes i just fixed it

#

discord is really weird

wraith carbon
#

@dull magnet nice ui for the membercount plugin

#

I like it a lot

trail ginkgo
#

react hooks are being very weird

#

i have loggers here

#

and one right here

#

so the null null is when it tries to highlight before shiki has loaded

#

so there is no theme

#

and then the next log shows that its not ready because there is no shiki language def either

#

and then once shiki does init (loads langs and sets initial theme)

#

it updates the codeblock, currentThemeId has changed

#

which is one of the useEffect deps

#

so im wondering why the effect isnt being called again

#

also i forgot to commit this but, the only difference between my screenshots and the git file is that i changed ready from () => boolean? to boolean?

#

i'll commit it rn cus why not

deft hull
#

@trail ginkgo help with role-color everywhere

#

there's no react part to replace it with

#

I just need to update the style 😭

#

none of them have a react

trail ginkgo
#

wait what are u doing again

deft hull
#

role color everywhere šŸ¤¦ā€ā™‚ļø

trail ginkgo
#

can u link me the replugged repo

#

so i can see what it does

deft hull
#

for vencord...?

trail ginkgo
#

role color everywhere replugged plugin

dull magnet
#

the react part of that is elsewhere

deft hull
#

WGHUWEGHWE HUH

#

how did you find that

#

I loked everywhere

dull magnet
#

id is 258631

trail ginkgo
#

oh i see

dull magnet
#

that function is Vencord.Webpack.Common.Parser.defaultRules.mention.react

deft hull
#

ok

trail ginkgo
#

regex patch tho

deft hull
#

can I add custom css

dull magnet
#

yeah u can use css

#

for now there's no native support so you'll have to just create a style element and set its content to a css string

#

but there's a pr for proper css support

deft hull
#

I can't monkeypatch it though

#

can i

trail ginkgo
#
{ 
  find: 'className:"mention"',
  replacement: {
    match: /react:function\((.),(.),(.)\)\{/,
    replace: '$&return Vencord.Plugins.plugins.YOURPLUGIN.exposedRenderMethod($1,$2,$3);',
  },
}```
deft hull
#

oh

#

ain't no way that's the only classname:"mention"

dull magnet
#

it is

trail ginkgo
#

and then in ur plugin object exposedRenderMethod: (node, output, state) => { /* logic */ }

dull magnet
#

cause usually discord uses funny mangled classes but seemingly not that time :P

deft hull
#

that's replace, not after or before

dull magnet
#

yes

trail ginkgo
#

oh yea i see urs does after

dull magnet
#

it just inserts arbitrary code

#

you can do whatever u want

deft hull
#

yes, but I have to do what it does

#

but I have no idea what any of those functions are

#

in this

dull magnet
trail ginkgo
#

u could add a param

deft hull
#

it's a fork

trail ginkgo
#

thats a little messy

#

im not sure if theres a good way to do after patches

#

feels like you'd need bracket balancing

dull magnet
deft hull
#

wait what

#

oh shit

#

I never realized that it used simple markdown

#

i thought it used injection

trail ginkgo
#

oh i thought u wanted to do that with regex replace

dull magnet
#

looks like it wraps the return value in a span and adds a classname

deft hull
#

send me link rq, i'm too lazy to find it myself

dull magnet
#

i don't really get the point of the entire wrapping stuff

deft hull
#

it didn't really work without it iirc

dull magnet
#

cause u could just modify the original element

trail ginkgo
#

didnt u say it could be text too

dull magnet
#
// before
react: function(e, t, n) {
    var o = e.userId
      , i = e.channelId;
    return null == o ? (0,
    r.jsx)(k, ne(te({
        inlinePreview: n.formatInline
    }, e), {
        children: t(e.content, n)
    }), n.key) : (0,
    r.jsx)(X, {
        className: "mention",
        userId: o,
        channelId: i,
        inlinePreview: n.noStyleAndInteraction
    }, n.key)
}

// after
react: function(e, t, n) {
    var o = e.userId
      , i = e.channelId;
    return null == o ? (0,
    r.jsx)(k, ne(te({
        inlinePreview: n.formatInline
    }, e), {
        children: t(e.content, n)
    }), n.key) : Vencord.Plugins.plugins.RoleColorEverywhere.Mention(e, (0,
    r.jsx)(X, {
        className: "mention",
        userId: o,
        channelId: i,
        inlinePreview: n.noStyleAndInteraction
    }, n.key))
}