const avatarUrls = HARDCODED_DATA;
const images = await Promise.all(
avatarUrls.map(async urlString => {
const url = new URL(urlString);
url.searchParams.set("size", "64");
const res = await fetch(url);
if (!res.ok) return null;
return res.arrayBuffer();
})
).then(images => images.filter(Boolean) as ArrayBuffer[]);
const IMAGE_SIZE = 64;
const IMAGES_PER_ROW = 20;
const imageCount = images.length;
const width = IMAGE_SIZE * IMAGES_PER_ROW;
const height = Math.ceil((imageCount / IMAGES_PER_ROW) * IMAGE_SIZE);
const CanvasKit = await initCanvasKit();
const canvas = CanvasKit.MakeCanvas(width, height);
const ctx = canvas.getContext("2d")!;
let col = 0;
let row = 0;
for (const img of images) {
const decodedImage = canvas.decodeImage(img);
ctx.drawImage(
decodedImage,
col * IMAGE_SIZE,
row * IMAGE_SIZE,
IMAGE_SIZE,
IMAGE_SIZE
);
if (++col === IMAGES_PER_ROW) {
col = 0;
row++;
}
}
return fetch(canvas.toDataURL());
#🧩-plugin-development
1 messages · Page 38 of 1
cool
oh wait
my code isnt exactly right
it shouldnt be ceil
i need to ceil to nearest multiple of IMAGE_SIZE
const rowCount = (imageCount / IMAGES_PER_ROW) * IMAGE_SIZE;
const height = Math.ceil(rowCount / IMAGE_SIZE) * IMAGE_SIZE;
this should do
yop
REAL
github default pfps so silly
should i ignore default pfps?
yeah i would
seems kinda useless to have maybe
how would u tell tho
this guys pfp is insane
ven 
that pfp so fire
right no idea
ok i take it back
i didnt know it existed til today
i might use it somewhere
cloudflare alternative to next/image soon
why is cf dashboard sooo slow
basically just fetch the avatars at some size less than 420
WTF
LMAO
unusable
imagine
😎
because default pfps ignore ur size parameter
ehj it doesnt matter i'll leave them in
true
they have a name??
that url says everything 
and for some reason I still opened the page
stupit cloudflare failed build
FSIOJJFIOEDJIKOJIKOGEFDJIOEGJIOGE
oh
HARDCODED_DATA 
for now
oh its just
how do i make the bundler not bundle the node half
its cause the code is like
const isNode = "object" === typeof process && ...;
if (isNode) {
require()
} else {
browser
}
runtime check
if i hardcode isNode t o false it works
wow thats awesome :o
patch-package
SAD
rate
i think wrangler supports pnpm'
dont the workers not install anything
wrangler just upload one big js file
amybe not idk
Do I need approval to release a userplugin in #1032200195582197831
nop
😢
im gonna cry
why is bundling this so fucking paiiiin
i think im gonna have to turn it into a separate thing
and not cf worker
what if i just turned it into shithub action that runs once an hour
?
i always call github shithub
@trail ginkgo skia canvas is like IMPOSSIBLE to bundle
whjy
so second best option: make a simple nodejs script and run it with a cronjob
hmm thatd actually be better maybe, they actually have webhook
is it cus the wasm
yes
and its code is insane
it uses XHR
not support on cf workers
and have to patch its code to even bundle cause of node requires
**main.c: **Line 20
static void *get_proc_address_mpv(void *fn_ctx, const char *name)
**main.c: **Line 72
.get_proc_address = get_proc_address_mpv,
yea
fungus
yop use it
sad
I need to figure out what sdl get proc address calls
wtf they allow that
the one i made for cobu
commander so good
rini can't spell
IMFUKBIC
what
DRUGDEd
@austere mauve
this is how you solve the problem of error popups 
you just push them off the screen
horror[
i get too many now
i cant click on "open with" bc it crashes file explorer. probably a power toy plugin pranking me 
@dull magnet help
error: lvalue required as unary ‘&’ operand
42 | {MPV_RENDER_PARAM_ADVANCED_CONTROL, &(int){1}},
idk how to do this in C++
they do this in C
same thing in C++ doesnt work
the second field is a void ptr
not even const_cast<char *>?
what that
cast as char pointer
has to be a void pointer though
tbh it's from a random repo i found
is that c++
yes
oh
oh yeah instead of char * do int *
where

the cast
Const_cast from 'int' to 'int *' is not allowed
a
Cannot initialize a compound literal initializer of type 'int *' with an rvalue of type 'int'
no errors
someone help
trying to make a container component
experimenting with it rather
dyn Any is horror
i am just experimenting right now
whatever struct implements Component already could have the state in it
this is the flow of components and the component trait
it works well for components with a single level of Drawables but for anything function i'd need containers to provide nesting so i'm experimenting with it
i might just do type erasure
local state of component isn't retained on next render loop
ideally container would be generic
what if i want the container to be heterogeneous
like
Container {
children: vec![Button::new("Click Me!"), Text::new("Meow")]
}
wouldn't work with generic right
(yes)
fuck your website is laggy on mobile
oh yeah i wanted to fix that, 3js is bloat
guheg
the blob in the background is a complete 3d render
i guessed as much
Is it Astro
yes
hey uh how come the Erase All Data button is this large.. i cant find whats they using to make it large uh
sorry i am very dumb,
last time i touched my website was 6 months ago 
my websiye is still pure html lol
if anyone has a better way to optimize this for mobile devices https://github.com/arHSM/arhsm.github.io/blob/main/src/components/Blob.astro then please help 
clearMessageCache: {
type: OptionType.COMPONENT,
description: "Clear the linked message cache",
component: () =>
<Button onClick={() => messageCache.clear()}>
Clear the linked message cache
</Button>
}
I mean this is the "clear cache" button from MessageLinkEmbeds n that looks like this
i think because its just a single button as an option
it has its own line
and makes it larg
o ok
buttons just take up the space theyre given generally
also id v-appreciate if some people could quickly take a look at this before i update my active PR with it on main
https://github.com/ant0n-0x0000/Vencord/pull/1
github is giving me a headache
looks good to me but is there no way to parse the whitelist once as opposed to on every message
Yeah I've got another version that caches the parsed one dw
Good thought tho
cool
there tested n done
should b a lot more efficient now
you are already filtering by isValidUserId in parseWhitelist so wouldn't this statement always return true
i mean false
That’s the exact sorta insomnia driven dumb stuff I need to notice haha
Thanks

@ashen axle double toasts
yeaaa dw that was an accidental sync
mmm such clin
do
onChange: newValue => {
const parsed = parseWhitelist(newValue);
if (cachedWhitelist.some(id => !isValidUserId())) {
showToast("Invalid User ID: One or more User IDs in the whitelist are invalid. Please check your input.");
} else {
showToast("Whitelist Updated: Reply ping whitelist has been successfully updated.");
}
cachedWhitelist = parsed.filter(isValidUserId)
}
// -- other stuff --
function parseWhitelist(value: string) {
return value.split(",")
.map(id => id.trim())
.filter(id => id !== "");
}
/*
* Vencord, a Discord client mod
* Copyright (c) 2023 Vendicated, MrDiamond, 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, showToast, UserStore } from "@webpack/common";
import { MessageJSON } from "discord-types/general";
let cachedWhitelist: string[] = [];
export const settings = definePluginSettings({
alwaysPingOnReply: {
type: OptionType.BOOLEAN,
description: "Always get pinged when someone replies to your messages",
default: false,
},
replyPingWhitelist: {
type: OptionType.STRING,
description: "Comma-separated list of User IDs to always receive reply pings from",
default: "",
disabled: () => settings.store.alwaysPingOnReply,
onChange: newValue => {
const newWhitelist = parseWhitelist(newValue);
if (newWhitelist.length === 0 && newValue.trim() !== "") {
showToast("Invalid User ID: One or more User IDs in the whitelist are invalid. Please check your input.");
} else {
cachedWhitelist = newWhitelist;
showToast("Whitelist Updated: Reply ping whitelist has been successfully updated.");
}
}
}
});
export default definePlugin({
name: "ReplyPingControl",
description: "Control whether to always or never get pinged on message replies, with a whitelist feature",
authors: [Devs.ant0n, Devs.MrDiamond],
settings,
patches: [{
find: "_channelMessages",
replacement: {
match: /receiveMessage\((\i)\)\{/,
replace: "$&$self.modifyMentions($1);"
}
}],
modifyMentions(message: MessageJSON) {
const user = UserStore.getCurrentUser();
if (message.author.id === user.id)
return;
const repliedMessage = this.getRepliedMessage(message);
if (!repliedMessage || repliedMessage.author.id !== user.id)
return;
const isWhitelisted = cachedWhitelist.includes(message.author.id);
if (isWhitelisted || settings.store.alwaysPingOnReply) {
if (!message.mentions.some(mention => mention.id === user.id))
message.mentions.push(user as any);
} else {
message.mentions = message.mentions.filter(mention => mention.id !== user.id);
}
},
getRepliedMessage(message: MessageJSON) {
const ref = message.message_reference;
return ref && MessageStore.getMessage(ref.channel_id, ref.message_id);
},
});
function parseWhitelist(value: string) {
return value.split(",")
.map(id => id.trim())
.filter(id => id !== "" && isValidUserId(id));
}
function isValidUserId(id: string) {
return /^\d+$/.test(id);
}
whole thng is diff now
i got rid of parseWhiteList
wait no other one
MAN im so tire
d
@glass oracle could you reply to me with pings off
meow
the validation fails if there's atleast 1 valid id
replyPingWhitelist: {
type: OptionType.STRING,
description: "Comma-separated list of User IDs to always receive reply pings from",
default: "",
disabled: () => settings.store.alwaysPingOnReply,
onChange: newValue => {
const originalIDs = newValue.split(",").map(id => id.trim()).filter(id => id !== "");
const validatedIDs = originalIDs.filter(isValidUserId);
if (originalIDs.length !== validatedIDs.length) {
showToast("Invalid User ID: One or more User IDs in the whitelist are invalid. Please check your input.");
} else {
cachedWhitelist = validatedIDs;
showToast("Whitelist Updated: Reply ping whitelist has been successfully updated.");
}
}
}
try that for the setting
yop that works
you can avoid creating 2 arrays by
const originalIDs = newValue.split(",").map(id => id.trim()).filter(id => id !== "");
const isInvalid = originalIDs.some(id => !isValidUserId(id));
if (isInvalid) {
showToast("Invalid User ID: One or more User IDs in the whitelist are invalid. Please check your input.");
} else {
cachedWhitelist = originalIDs;
showToast("Whitelist Updated: Reply ping whitelist has been successfully updated.");
}
ty ty
W plugin @ashen axle
i hate when people have reply pings off
like what’s the point in replying if i can’t see it
yea same, I never notice
xliem uses tuples
but you can only do so much with tuples
What the fuck is this macro hell
just gonna do type erasure
rust turple annoying
INSANITY
rust need a better thing than macros
no one knows how to write them
i sure do
rust macros are such a great feature
i love writing proc macros 
(not sarcasm)
procmacros insane
me adding 4 crates just to write one proc macro that calls a single function to transform smth during compile time
this counts as proc macro right!!
this is a real use of proc macros (converting rust structs to typescript definitions (with wasm-bindgen))
idk, swc types were in rust and i cba to convert each and everything to ts individually
javascript C abi when
qhar
wdym
i mean you have native node modules, isnt that basically it
i was joking
you want to access js in c?
it would allow to access everything that supports c abi

it does but that requires having #[wasm_bindgen] proc macro on the struct, the ast node structs from swc dont have that so i'm abusing typescript_custom_section
horrifying
yes but it works and it gets pretty much fully yeeted after compile
@austere mauve i have committed war crimes
had to dig through erased-serde to figure out rust type erasure
overall i'm pretty happy with this but i still feel like it could be made better
svelte
jquery
(jokes aside vue if you want to not bang your head on the table over stupid errors)
Vue
all of them are the same shit learn whatever u can figure out the others later
they r not the same shit
ok idk enough about vue to talk shit about react comparing it to vue
Tbf my main goal is to land a junior job as fast as I can and gain some experience
Sadly I looked around and I didn't really find any for uni students only a few webdev jobs
Well react has more jobs for sure
my reaction to that information
quite sad innit
Is there anyway to just intercept and block certain URLs?
devtools
Discord devtools or browser devtools
type Tag = 'job' | 'education' | 'projects' | 'web dev' | 'mods'
const tags: Tag[] = ['job', 'education', 'projects', 'web dev', 'mods']
is there a less dumb way to do this? I don't like how this has every tag twice
const tags = ['job', 'education', 'projects', 'web dev', 'mods'] as const;
type Tag = typeof tags[number];
yeah
thanks
as const does the magic
what does as const really do?
it stricts the type signature of const tags
from string[] to 'job' | 'education' | 'projects' | 'web dev' | 'mods'
ahhhh
how long does setting up a vencord dev env take, say until getting to hello world?
Not long
like 5 minutes
git clone
pnpm install
pnpm watch
add plugin in userplugins
and you have hello world
Gotta install pnpm too
And maybe node aswell?
yes
So like 10 minutes
or 30 if building node from scratch
or one hour if formatting your hard drive and reinstalling your os
13.7 billion years if you first invent the universe
well that escalated quickly
is there a way to move user profile in settings to left or right?
still dont understand what im doing wrong
i have bindings as a non-dev dependency
doesnt bundle its dependencies
so dum
manually adding it as a dep fixed trolley
oh my god pnpm issue

I have lost 90% of my braincells trying to remake react-like hooks for pure html
and it works
help
also yes this is fleet
why,,,,
trying to make things simple for myself
are react hooks considered simple now
no
never
I just don't want to deal with event targets and query selectors too much
I now have a function to render a settings page (wtf am I doing with my life)
I wrote a simple plugin to add some transitions when switching channels
🔥
Oh this is nice
Are u talking about the light mode ?
wow you're so funny /s
and yeah that’s possible and surely not hard
Ikr
first light theme joke on discord
this article is really cool @trail ginkgo https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html

lmfao
lol u just made me look at the scrollbar
it has some good stuff but its ultimately not really worth anything
well
its interesting to know that
nullable keys might be more cache-friendly than optional keys
what the fuck
wait
jesus fucking chrsit what is that link
ok well unconclusive
im gonn rewrite that lmfao that code is horrible
now it doesnt show results at all
where’s the fun in that
@proud cargo this is more what i was wondering
but still seems like its not a huge difference
atleast for just [[Get]]
maybe youre not doing enough?
IC has space for multiple
it might just be polymorphic
oh u mean i should test megamorphic
ya
not sure if this is fair
because youre straight up leaving out the properties on the others
no?
?
hhh
megamorphic array is just an array where every item is a different shape
yea but
wouldnt you have to fill every possible key for id with null/undefined for that to be fair?
i dont see how but i can try that
this is cursed
const monomorphicManyKeys = Array.from({ length: N }, (_, i) => Object.assign({
id: "a",
data: Math.random() > 0.5 ? { balance: Math.random() } : null,
}, Object.fromEntries(Array.from({ length: N }, (_, i) => [megaIds[i], true]))))
LOL i think i hit the shape size limit
monomorphic all mega's keys VS megamorphic VS poly VS mono
yea i think its cus ur using find
so its not really measuring the performance of the lookup
or maybe not because the find is matching the last items
ur megamorphic is assuming that v8's cache limit is before degree 10
8
i mean i tried it with 32 before but that didnt seem to work either
im confused cus all ur objects have the same degree
are u testing same degree with many shapes vs one shape
[e % shapeSize]: true, this is making all ur arrays polymorphic
it shouldnt be
the filledWith always have all of the possibilities where it could be set
oh true
lolol its fun to learn about v8 optimizations
this i still dont understand
its half as fast just because the object is large?
i mean the others are literally the same aside from propertyvalues
the test you made is actually good though
eh ok i reran it and no difference
shig
if i had to guess
if ur talking about the one from my test
im guessing i hit the max shape size so it doesnt cache as monomorphic
nah i mean my tests
filling the object with false was half as fast as filling with nulls
<ref *1> WriteStream {
connection: false,
}
idk how to test ansi highlighting
it's not highlighted on plain discord either
#🤖-bot-commands message
oh
it's working nvm
h stands for husk
who tf wrote this code
horrible
be nice!
is there any events in electron that run similar to preload
wdym
Can we not do this?
It works if I use normal selectors like '.messageListItem__6a4fb'
class=^
Do I need some kind of escape character?
^= not =^
(idk what you were expecting to happen here, highlighting-wise o,o)
does ansi work on mobile by now?
nop
frickin Discord man
even the pc ansi is very limited, it's sad cus ansi is so powerful
it is what it is ig
yeh -_-
working code
dynamically typed languages were a mistake
hell nahhh
Imagine enjoying writing so much boilerplate for a project only you will use
what is bro saying
you suck thats a fact
Well... Hm, your mother?
What is asm

Assembly?
In assembly everything is an integer and it’s up to you to treat it as something different
asthma
i mean that is the case for any language, we just get abstractions
I can probably argue against that with quantum assembly
i do not have a counter argument, you win
Very unnecessary to go there though lol
💀
i think you should go back to school where you learn what those words mean
If it wasn't a fact then why is it correct, checkmate
Jokes aside idt neither is better cus it's a preference
Huh?
i'm guilty of doing this a bit too much
overcomplicating "projects" i will only use twice in my whole life
Lmao
oh my god what the fuck https://youtu.be/rJuRTZOE99g
In this video, I go over the features and commands currently available to Starcel.
https://starcel.net
Sometimes I think more about my videos after posting them, these are my Post-Thoughts:
- Though it is more of a desktop environment, I can call it an operating system because I wrote some code into Starcel to interface with a hardware device:...
Typing is a double edged sword. It's neat but can slow you down so yes that statement is wrong but it doesn't mean the opposite is right
static is to the right in your message so it clearly is right
🗿
what is happening
i don’t understand ||how this was not invented earlier it is so useful|| ||/j||
is webstorm good with Svelte or should I stick to vscode
i have the jetbrains stuff so if its good ill use that
dont think it matters
might switch to ws since vsc ts lsp has slowed to a crawl
mov rax, money moves
yeah looks cool. Feels kinda
being replaced by ai but would be kinda silly not to ig, ai is just better at most things already
owo true
mov rax is in fact also an integer
DONT USE WEBSTORM
ITS FORBIDDEN TABOO
Sounds like you should use webstorm
Webstorm is dumb
did you try using the installer to reinstall
uh i just downloaded the plugin on chrome web store
64bit register because my money too long
also, a byte is just bits n nibbles which in turn are also just 0 and 1's which are booleans more than anything
or as i like to call em
minecraft levers for ur cpu
I need to know, what's better:
for(let i = 0; ...; ...){...; }
or
for(var i = 0; ...; ...){...; }
But on the mozilla dev website it's a var, I always use let but this made me doubt
Ok thank :3
Never use var unless you want to die
hmm in that case i think im gonna use var every day
use const :3
const in a for loop is so genious
:'(
Wow it work now !
for(const e = 0; e < 1; e){
console.log(e, ":3")
}
thank !
0 :3
what the fuck are you on about
What mobile modified client should I use except aliucord
vban @green vessel spamming same message in 5 different channels
Done! 
```js
[code here]
```
for syntax highlighting
what line
and position in the line
what are you using?
it should show
client.login('bot_token_not_telling>;3);
is no ending quote intentional?
why the 3
and no end quote
just show the full error
idk what ur running that in
but it should show the line number and column number
any decent code editor should show a red line below where the error is
yeah
what editor are you using
program
what program are you using to edit the file
what text editor
for example, notepad
vim user \j
ok what os
ubuntu
get something like vscodium
no i do not mean vim
why are u so strange
a lot of these terms arent exclusive to that
like "text editor"
i recommend going to a website called "codecademy"
also whats with the extra pluses infront of (parseFloat
get vscodium
ok but like
the error should show the row
a number
there should be a number in the error
or somewhere on the screen
just screenshot the whole window
just screenshot the whole window with the error
there has to be something
show the error
the whole window that has it
how did u get this?
run it and show the window with the error
yes that
Free/Libre Open Source Software Binaries of VSCode
wtf is that text editor
it is, I want to believe
the only difference between the 2 is libadwaita and some settings
uh huh
Nice emoji
👑
Ce
rifi∊
ed D
⊃um
did u write all the files listed there?
internal/modules/cjs/loader.js?
what files did u make tho
are u using the latest version of node?
node -v
broo
when did u install node???
thats wild
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
cuz ur on some old lts version
prob because you used the apt package
update your system
how did u even manage to install ubuntu
how many years since u updated
you gotta be on some early 2021 version
wait that is real 💀
yes
explod
How
The
Actual
Fuck
Is
This
An
Actual Domain 
Chapters:
- 0:00:00 - Announcement
- 0:01:07 - Introducing emoteJAM
- 0:01:28 - Fixing emoteJAM lol
- 0:02:41 - Demoing emoteJAM
- 0:04:35 - Problem with emoteJAM
- 0:04:51 - Service Workers
- 0:05:57 - How do I get ideas for streams
- 0:06:24 - squoosh
- 0:07:08 - How to Test Offline Web Apps
- 0:10:29 - Recovering Knowledge about emoteJAM
- 0:...
Huh

oh thx
mhm!
u able to update it?
You can update node pretty easily:
Install nvm by running curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash on a terminal
restart the terminal
type nvm install 20.5
then type nvm use 20.5
node too old
do what i posted
also ur npm is old
nvm should update npm for him i think
this will most likely fix ur issue
.
ask your dad
nothing needs sudo. just login as root
hack it
what's your dad's birthday. that' sprobably the password
if not try your own birthday
cant u just boot into an installation usb and use the terminal there to change password
if my kid touched my computer i'd murder them. (note: i do not, nor will i ever, have kids)
Depending on the Ubuntu Revision he has that might not update to >=20
Type this into a terminal: cat /etc/os-release
What is the output?
remind me to not open coding channel ever again as long as mushroom is here
- {display: none;}
plugin that has a 2% chance of replacing your message with your own token before sending
Njg3NzMxMzYwMTQzNzY5NjI5...
good. alw use const
https://i.imgur.com/pmJPRIR.png
an option for attenuation being enabled when you're in a call
thank for the tip :3
anytime brotherfam
have anyone figured out if it's possible to set custom rpc with something like Playing on Xbox, or you need some ids that are created on microsoft servers? i've been trying to find what's needed because my activity works fine as long as i keep "platform": "xbox" commented out
#plugin-requests i think unless thats not a feature reques
if i wanted to find the code where this thing is rendered
in order to add more to it
how would if ind that
searching the strings gives me nothing at all
grats?
goated
use react dev tools
i seem to did it without react dev tools
makes it way easier tho
i did not know react dev tools existed until now
will probably use in the future
yummy
ok im about to give up on this shit
i wanna make my custom thingy actually do something
but i cannot for the life of me find the code that actually checks which item has been selected
there is one single function that sets some variable "currentTab" to a number, and i know setting a bp and changing the number right there has the exact desired effect of setting the tab
but trying to search "currentTab" through all the sources gives me absolutely 0 hint of anything happening
does anyone have a clue on something i could do to help me find it
use a breakpoint and you can see the call stack
tried that too
welp then idk
well maybe im not breakpointing in the right location
trying to set breakpoint on whatever thing constructs this
bc it only appears in the "unreads" tab
and im just getting a bunch of nonsense
ok it has to do something with the USER_SETTINGS_PROTO_UPDATE event
but there r so many things handling that event idk how to narrow anything down
u may be right
not gonna lie to you it's extremely sucky it uses the value of the settings proto to know the selected tab
yeah its a little weird
trying to save a non existent tab value will likely not work
wdym?
i can make it store the nonexistent tab in the settings
it just kinda bugs out the menu
oh cuz you need to add your tab here
yeah this seems like a different place
what the hell is InboxTab.TODOS
setting my thing to the todos id makes it bug out even more
it's an enum for the numbers
yeah but like there is no "Todos" in the menu
use it to find the code lol
its like an unused thing
why, it persists the tab state across devices/sessions
I know
and yes changing the proto with unintended data will likely cause a crash in other client logged into the same account
it's a feature for employees
message reminders
it used to be public back when the experiment released, now it's employee only
🤨 how do you have it
oh lol
ok i think i figured it out
is there value in creating an api for the inbox tabs
for everyone to use
cuz i might do that too just for funsies
ok this isnt exactly what i wanted but its close enough
idk what that is
someone suggested an inbox tab for keyword usage
so im trying to make that now
oneko sleeping in the corner?
oh you have to enable it
in settings
what does it actually do
how would that be useful
idk you tell me
but i want it in the inbox tab cuz it would be nicer
ok i need help w something again
say theres this module that i need
and the only way the module seems to be accessible is with one of these thingies
how do i access this thing in my plugin
findByPropsLazy
that'll break as soon as some modules get moved and the manged name changes
you write a find for that module
just do const headerItem = findByCodeLazy("useInDesktopNotificationCenterExperiment)(")
yeah that
that gave me the function for the entire module
but the import thing
i think it caches something
:thonk:
findByCode(Lazy) searches exported functions as opposed to the module function
in this case default
💀
what have i done
wait how do i actually use the function
this is how its used in the source
so i assume its like a jsx thing ofc
same as <g.default tab={i.InboxTab.MENTIONS} />
so i tried that
and it didnt show anything
but if i call it manually like this, at least some things start showing
so now im confused
<> <React.Fragment> ???
<> is a fragment
oh my b
either way even without the extra fragment it still didnt show anything
and the function call did
so im just straight confused
why this didnt do anything
in jsx only capitalised names are treated as components
ohh
try that maybe
megu wrote that code not me
text replace and spotifyControls have valid reasons for using React.Fragment over <>, thay have props
yea i was reading docs and they're the same except you can specify keying
but the others idk what they're cooking

horror
why does the space feel bigger than the other buttons
it shouldnt be
but idk maybe it is
ok the webpack thing is not finding the module
i know it exists
and yet
it needs to be a portion of code from an exported function
how do i know whats exported
every module has this at the top
[3rd param].d([2nd param], { /* mappings of exported property to getter function */ })
[2nd param] corresponds exports prop of a module
[3rd param] is the mangled __webpack_require__ function
some of these usages are valid
the ones where they need to set fragment props
others... ehh
what if i'm trying to get a function that isnt exported
is it impossible
no but yes
you can export it by patching the module
so i basically just make a dummy patch
u dont really export it tho
solely for export purposes
nah you call it exporting, you dont want them to know you're stealing their components :^)
both of these patches obtain unexported funcs
oh i see...
vencord has such great DX tools 🥰
we patch function prototype to allow ANY function soon
show patch
like the diff?
na the object of the patch
variable, parameter, and body
1 moment
i konw why its erroring now
i just dont know what ima do to fix it
ok i think i fixed it
find: ".default.guildFilter:null",
replacement: {
match: /function (\i)\(\i\){let{message:\i,gotoMessage/,
replace: "let $1 = $self.renderMsg = $&"
}
nvm
smt like that
btw $self.renderMsg=x;function x(){...} works
js is a lil sily
does that really?
yes
it gets hoisted
lets go
nice
gg
that is pretty awesome, goodjob!
are u sure ur passing the right args
yeah thats why i do the + "" to force it to a string
and why would i check it's your plugin 
no i mean like
check the screenshots
ok so apparently messagestore is just bad
it just pretends the message doesnt exist if you haven't loaded the server it was in
js hoisting kills me :dead:
i want the thing to auto-update when theres a new message
and im trying to use the react state thing or wtv
and its just like
not updating??
maybe im doing it completely wrong
idk hwo else i would do it
ive been creating a theme and this feels so illegal to do. opinions?
did another approach of making individual files unlike most popular themes
that's a lot of css
around 190 kb :p
yikes
If it's just for maintenance purposes, it's probably better to just use something like Sass or postcss for bundling instead. Imports kind of suck
ive made something
pretty cool
what are our thoughts
was an absolute pain in the ass to make that menu bc theres like zero docs on how to mess w the inbox thing
but i did it in js one night 💪
wdym badges
i assume they mean ping indicators



