#🧩-plugin-development
1 messages · Page 9 of 1
if you're inserting a stylesheet that's why
that says it was deleted
thats really good
boner material
How can i get user id when i click on their profile?
also, right click is cool
nice i made it so the webview is gray when loading
now i just need to make it gray when the app is loading
guys is there any guide of how plugins work? like a how to make a hello world plugin
yes
yes
where?
oh true the megumin guide
Ok How can i get the user id with UserStore when i click someone profile?
yeah your not getting me
@muted thunder you get the wrong answers bc you asked the wrong question
the user store has nothing to do with the UI
it doesnt depend on it
you included the UI in your question
so you get UI answers
your question needs more refining
do you want code to execute whenever you click on someone's profile?
what do you exactly want to do?
if this is what you want, a patch is probably the way
i want to give me the user id so i could use it for a api
that gave me zero new information
do you even know what you want to do?
lets start with that
can you break down the thing you want to do into small steps?
set some small objectives
you wont achieve anything if you dont do that
so you want to get the user ID, to use it on an API
possibly an API that has info about that user i would assume
what will you do with that data?
will it be displayed to the user?
if so, a command might suffice
Ok firstly i want to do add Global Badges to vencord
im using my api for this https://api.obamabot.me/v2/text/badges?user=
When i click a user profile it should automatically fetch the user badges and add the corresponding badges to set user
great
this is a great step
so what you want, is to make a patch
I'll help ya a bit and look into it
a patch something like this?
{
find: "Messages.PROFILE_USER_BADGES,role:",
replacement: {
match: /src:(\w{1,3})\[(\w{1,3})\.key\],/,
replace: (_, imageMap, badge) => `src: ${badge}.image ?? ${imageMap}[${badge}.key], ...${badge}.props,`
}
}
this is from
https://github.com/Vendicated/Vencord/blob/bad96b78879f296d5b9e7adacb03756b0f58427a/src/plugins/apiBadges.tsx#L67-L76
**apiBadges.tsx: **Lines 67-76
{
find: "Messages.PROFILE_USER_BADGES,role:",
replacement: {
match: /src:(\w{1,3})\[(\w{1,3})\.key\],/,
// <img src={badge.image ?? imageMap[badge.key]} {...badge.props} />
replace: (_, imageMap, badge) => `src: ${badge}.image ?? ${imageMap}[${badge}.key], ...${badge}.props,`
}
}
],
yes yes, looks like there is already an API for that
first step is import { addBadge } from "@api/Badges"
if you look into it, there is a shouldShow callback
that is where you get the user ID
(you should cache the badges ofc)
if you are lost, this is the basic code
i wont do much more to not steal the joy of making a plugin
good luck!
thats the good part of having standardised APIs
although, from what I understand
you will want to have an array of badges
cause the code i sent is only for one badge
dunno what the API you use for the badges is
is quite simplier
but i think i might need to change the code on the api side
this is how the data look
all of that are badges
roles is a place holder i had but never changed it
Aliu = Aliucord
entitty: {}
it hurts that the api uses like 3 different styles of displaying badges
- string array
- boolean
- objects with booleans
this looks way more cleaner now
bd is uppercase and not an object
what even is bd's badge
guh?
What plugin is that?
is that badge that BetterDiscord users see on Zerebos profile
Enmity badges are cursed need to make it better but this so far what ive gotten
is a api
add vencord badges when
already on the works
How can i get a store when i need to get it when its available and i cant use lazy?
why cant u use lazy 
because it is undefined
the lazy methods basically make a dummy object
and it only finds the value when u do something to it
like call it, access a property, etc
try putting the Proxy in a variable
and going val._isInitialized
returns true even when it isnt cached
How to use a react.createElement in openModal()
it isnt globally cached
its only cached for that proxy instance
whats showmodal o.o
oo
i think u can just use jsx/tsx syntax
without importing anything
the jsx factory is set to a global in the build options iirc
I need a react component to dynamically update the modal
u can use a function component
theres a forceupdate hook in utils somewhere
its probably best to use states appropriately
i can write an example if ur trying to get the hang of it
That'd be nice :)
https://github.com/SammCheese/invisible-chat/blob/NewReplugged/src/components/EncryptionModal.tsx#L65
I have a variable that checks for text changes every time you type something. Based on that I want to toggle the disabled attribute of the button.
**EncryptionModal.tsx: **Line 65
<Button
ah i see
hold on im looking at where buildEncModal is used
ChatbarLock.tsx is assets
Alright, thank you so much 
sike hastebin is broken
import { ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { Button, React, TextInput } from "@webpack/common";
function EncModal(props: ModalProps) {
const [secret, setSecret] = React.useState("");
const [cover, setCover] = React.useState("");
const [password, setPassword] = React.useState("password");
const valid = secret && cover && cover.match(/\w \w/);
return (
<ModalRoot {...props} size={ModalSize.MEDIUM}>
<ModalHeader>
<div style={{ color: "gray", fontSize: "30px" }}>Encrypt Message</div>
</ModalHeader>
<ModalContent>
<div style={{ color: "gray" }}>Secret</div>
<TextInput
onChange={(e: string) => {
setSecret(e);
}}></TextInput>
<div style={{ color: "gray" }}>Cover (2 or more Words!!)</div>
<TextInput
onChange={(e: string) => {
setCover(e);
}}></TextInput>
<div style={{ color: "gray" }}>Password</div>
<TextInput
defaultValue={"password"}
onChange={(e: string) => {
setPassword(e);
}}></TextInput>
</ModalContent>
<ModalFooter>
<Button
onClick={() => {
if (!valid) return;
const toSend = encrypt(secret, password, cover);
if (!toSend) return;
webpack.common.messages.sendMessage(
webpack.common.channels.getCurrentlySelectedChannelId(),
{ content: toSend },
);
props.onClose();
}}>
Send
</Button>
<Button
style={{ left: 15, position: "absolute" }}
onClick={() => {
props.onClose();
}}>
Cancel
</Button>
</ModalFooter>
</ModalRoot>
);
}
export function buildEncModal() {
openModal(props => <EncModal {...props} />);
}
basically
useState will make the component keep track of a value between renders
and returns a [currentValue, valueSetter]
and when u set the value it will rerender for u
it knows which value is which by the order that hooks like useState is called in the component, so avoid putting hooks like that in if statements
also the modal props has its own onClose so u can call that to manually close im p sure
yaa
the only errors in that file are gonna be missing encrypt import, and you'll have to do a findLazy for sendMessage and getCurrentlySelectedChannelId prob
That's fine, I can fix that up :D

what version of react is discord using?
its not the version
like it has to be the same instance
in runtime
and also u have to be initializing the component with createElement or jsx or something
which i though this was for vencord but idk how replugged has their jsx factory set up
and i really hope they arent bundling react xd
i removed react from bundle and plugin not loading anymore
this makes it seem like
i love
like ur using one runtime to create the component
and another runtime to create the states
idk how that would work
i will read replugged source code
they do not customize the jsx factory
i think thats for when it was added to react
oh
thats when they added hooks
how do i fix
are u doing import React from 'react' in ur imports
this makes me wonder what would happen
if u replaced discord's react with react development
discord uses 18.2 so theoretically nothing bad should happen
other than probably 5x memory usage

and a very slow client
i will not try that
wait so this is for a plugin?
yes
how is the plugin going to access react if its an asar
and replugged doesnt use discords react
dont tell me, tell that the geniuses at replugged
ok i will ask because middleman is cringe
okay :D
you might get an answer in 4-10 business days
but looking at a plugin from one of the main developers, its exactly that
it builds into renderer crap if it helps you in any way
i love vapcord + vencord = replugged
vancord
WHY IS OVER HALF OF IT A SOURCEMAP
WHY DOES EACH PLUGIN USE ITS OWN REACT RUNTIME
HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR
HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR HORROR V
AND THEY ARE ALL IN DEVELOPMENT MODE

this is officially a figure it out moment
cant figure this hell out
but while im at it, i can port what i have to vencord
thats probably pretty easy
very easy actually
you will probably have less code in the end
i will still push my stuff to window because fuck you
your pr will not survive
you love
it will merg
is that for the patches
aye
you will put those values in the definePlugin({ ... })
husk
if my pr was merged ur patch could use $self.popoverIcon
it is not merged yet though
aight
guh
This conversation is making me wish I had read more of what the others added to my code before green-lighting the release of the dev preview
xd
I am already aware of this, and I’m not sure exactly how messing around with types ended up getting React bundled in every damn plugin
Fuck it, this takes higher priority to fix than the settings API that I want to gut
🙏
i would suggest using a global like replugged.React
and using the jsxFactory option in esbuild
and there may be a esbuild module to replace module imports to constants
Went to do a quick fix on that, and uh, our common modules implementation is so bad 😂
Shut up dumb bot


||I think I should have just made this into Fificord and avoided allowing a dev team to partake in design decisions||
Ven seems to have figured out how to not be saddled with that
I’m kicking myself a bit for not doing the same
Anyway, enough of me complaining about the others who work on my mod
you got this fifi 
Yayyyy it works
No more React bundled in the mod
Presumably pushing this should also trickle down to plugins
React is currently a dependency of the replugged npm package
But yeah ig
Gotta update the template
And finalize where I want to put the React global, if I want it global or whatever
Idk it’s 4:30 AM and I should have been in bed hours ago
well it should be
for typings
We have @types/react
oh then LOL
Ya
so plugins will update their replugged dependency
and i assume plugin code will do require('react')?
either that or esbuild will error
I believe plugins are supposed to be able to import from common modules or something?
Honestly I’m not sure what the plugin dev experience is rn, I’ve gotten used to working within the confines of the mod
oh when u say trickle down to plugins i thought u meant they wouldnt have to do anything
but yea they will def need to change the way they import react
Actually you are supposed to import react from @webpack/common
Oh
It was about replugged
Nvm then
xd
it works
did you do it
and don't turn this server into replugged dev please, stick to replugged server else it becomes confusing 
friends did
scary
do you promise me that Vencord will not explode if I merge ur pr @trail ginkgo
:3
i mean yea
if \i doesnt show up
and $self doesnt show up
anywhere else
just TEST it
turn on EVERY plugin at ONCE
I'm lazy to test rn

Well I'm on phone
I also wonder how the performance impact of it is
since you're stringifying and recompiling every regex
maybe do it on demand instead of on initial plugin add? as in, only do it once the regex is consumed
how would one go about programmatically closing the settings UI?
(im talking about the entire settings UI)
eh, this works ig
document.querySelector(`[class^="toolsContainer-"] [class^="closeButton-"]`)?.click()
if it works then it works
alr so its gray now when loading
ig i should add some kind of spinner now
woohoo did it
alr
ig i should pr now
I also added an applicationIdSuffix of .dbg for the debug buildtype
the text input component is misusing the onChange callback
it is supposed to be called after the settings are saved
not as you are typing
I made a pr :D https://github.com/Vencord/Android/pull/4
my first pr ever :p
Why are the screenshots so huge lmao
It also adds .dbg as an applicationIdSuffix for the debug build, as it is very useful to be able to have a stable and debug build at once.
I love that, thanks
👍
could you make this still support light theme?
Use the dark colour when the system is dark theme
ok
and light colour when the system is light theme
time to figure out how to do that :p
NO
LIGHT THEME SO BAD
IT SHOULD BE NEVER SUPPORTED
yeah alr 👍
Understanding the color choice of every pixel is important when optimizing power. This talk provides a primer on display considerations, describes why darker pixels save power, and what app developers can do to help users save battery life.
Presented by: Chris Banes & Alan Viverette
Android Dev Summit '18 all sessions playlist → http://bit.ly...
this explains it
alr ty
(timestamped)
i already found a way i think but if it doesnt work will take a look ty
nvm
yeah will take a look
I think just specify values/colors.xml and values-night/colors.xml
specify the colours in the respective folder then use the variable in the theme
i assume i also need to change @android:style/Theme.Material.Light.NoActionBar to be daynight and not light
but maybe not
hmm ok
let me do that then.
alright should be done, let me test
alr it works :)
gonna push it now
@dull magnet done :D
why not use discords white?
i did
its #FFFFFF
i think
i used a color picker
i dont have one on my phone so i took an ss on my phone and sent it to my pc and did it there
but it said #FFFFFF
i can try again
let me see
yeah it is
#FFFFFF
at least when i set vencord android to light mode its that color
ig i could be wrong
but every time i tried it was that
so idk
are you testing?
also @dull magnet i may make another pr soon that opens links in the external browser if thats ok
bc rn links just open as plaintext html with no way to get back
yes
that's just an oversight and I haven't gotten around to fixing it
so that'd be appreciated
alr
shouldnt be hard
so @dull magnet are you gonna merge my pr?
oh nice you did!
it's not even because it hurts my eyes, it's straight up ugly
I think light theme is fine
wait a second i want to refresh my memory
yeah just as i remember
it looks like someone applied a negative filter to discord
and called it a day
im still stuck
Alr yeah IMA start on that external links thing soon
**ReadMe.kt: **Lines 130-136
override fun shouldOverrideUrlLoading(
view: WebView?,
request: WebResourceRequest?
): Boolean {
if(request != null) ctx.openLink(request.url)
return true
}
is it that easy lol
just add check for discord.com authority and you're good
openLink is util function for a view intent with url as data
markdown is rendered as html
agree to disagree
you will kt ctx.ext.openLink()
nop
actually openLink uses custom tabs
well it does now
eventually there'll be an option to disable that
Yeah, ik its pretty simple.
Oh nice im a contributor and a cool person :p
@dull magnet contributor role NOW
PLEASE
I applied too much thermal paste help
verge says apply more
not enough
guhh what subreddit is this @dull magnet
this is my pc
STOP WATCHING LINUS
ltt
Linus posted that
smart
FUCK YOU
horr
PLEASE BRO
wait
is this the thing used to prevent nitrogen from damaging motherboard
its like vaseline or something
this one doesn't load
@delicate totem
HOW
to prevent water from condensing
close
need a good heatsink for crazy cpu 
Commit of session 2002015650 failed: Failed reading AndroidManifest.xml in java.util.jar.StrictJarFile@1a85f5e0: META-INF/MANIFEST.MF has invalid digest for AndroidManifest.xml in AndroidManifest.xml
@dull magnet fix
@delicate totem @delicate totem
@dull magnet do you know of any other jar/apk signing libs
that's such a curse
what the fuck
I feel like my PC is gonna explode magically
@dull magnet GUHH SUBREDDIT NOW
battery
by doing this i get my own id coool
wtf do you mean "battery?"
I like this
you know
when batteries fail they get big like that
it also happens on phones a lot
swollen battery (its extremly dangerous)
ok thats alot of people
oh hey it's me
Google swollen battery

hmm
do i need to do something when i click someones profile to get there info or something like that?
FUCK
@delicate totem
Ive been looking and there no profile modal or close to it exactly
oh ok yea
what is a patch/replacement predicate
i didnt notice this earlier
whether it should be applied
as in js predicate: () => Settings.plugins.MyPlugin.featureEnabled
ah i see
makes sense
ok time to test this comit
yup these all successfully patched
wtf is wrong with ur font
wdym
it looks so squished
yea it does
lol maybe that's why
ah okay it was the zoom lmao
so true bestie
cant even use React elements in plaintext patches😔
shit platform smh
patches: [
{
// Minipopover Lock
find: ".MESSAGE_TODOS_MARK_AS_DONE",
replacement: {
match: /.\?(..)\(\{key:"reply",label:.{1,40},icon:.{1,40},channel:(.{1,3}),message:(.{1,3}),onClick:.{1,5}\}\):null/gm,
replace: "$&,$3.content.match(Vencord.Plugins.plugins.InvisibleChat.INV_DETECTION)?$1({key:\"decrypt\",label:\"Decrypt Message\",icon:Vencord.Plugins.plugins.InvisibleChat.popoverIcon,channel:$2,message:$3,onClick:()=>Vencord.Plugins.plugins.InvisibleChat.receiver($3)}):null"
}
},
{
// Indicator
find: ".Messages.MESSAGE_EDITED,",
replacement: {
match: /var .,.,.=(.)\.className,.=.\.message,.=.\.children,.=.\.content,.=.\.onUpdate/gm,
replace: "try{$1?.content[0].match(Vencord.Plugins.plugins.InvisibleChat.INV_DETECTION)?$1?.content.push(Vencord.Plugins.plugins.InvisibleChat.Indicator):null}catch(e){};$&"
}
},
{
// Chatbar Lock
find: ".activeCommandOption",
replacement: {
match: /.=.\.activeCommand,.=.\.activeCommandOption,(.)=\[\];/,
replace: "$&;$1.push(Vencord.Plugins.plugins.InvisibleChat.ChatBarLock);",
}
},
],
using React works (at least on replugged)
on vencord it either kills webpack or tells me react is undefined
i am
import {React} from "@webpack/common"
thats an example from a working version on replugged
lower case vs upper case
it's a bit annoying that you're only showing snippets so I can't see the whole logic
xd#
yeah you dont export anything called Indicator
you do export indicator tho
popoverIcon should work tho
it does
gimme a sec, ill try again
changed the other ones to the correct capitalization but uhhh afais it still doesnt do much
anyway if you are doing this that's why
you can't use React on the top level
yes that means you're using React too early
figure out where you're using React too early (this would either be top-level jsx, or a top level createElement or you're attempting to destructure React)
top level creatElement
yea nothings working, ill add some console logs to see if its doing the thing it should
i am
Filter for Vencord and see if there's any warnings
Also did you write the patches with patchhelper to make sure they actually work
search for InvisibleChat in the sources tab
Also dumb question but did you enable the plugin
🦆
yes
otherwise the minipopover icon wouldnt show
its pushing what i want it to but... wrong format
wdym wrong format
i dont need a function i need the direct react component thingy
i need the Symbol(react.element) thingy but got Indicator()
holy fuck
its there!

Thank you so much for helping my stupid ass 
that should actually be everything, the plugin is fully functional now
did they finally add mv3
FINALLY
manifest v3 good
but my adblock :(
other than that
regex sometimes is crazy
cause match is to get the match
whereas test is to test if it matches
thats javascript for you
Ven, when will you review my PR?
We are not talking about speed
Or memory efficiency
wha
he asked why .test is better than .match for this use case
I answered
using .match to test for whether a string matches a regex is an antipattern
does it actually affect the memory if u use match?
only use match if you actually need the match
Sometimes if (djdjd.match(/bdd/)) is false, when it should be true
yes? it allocates memory for the matched part of the strings, the groups array, etc
using match wastes memory, does unnecessary allocations then unnecessary garbage collection
If you use it in a hot block like a loop, then yes
The garbage collector slows shit down
you're wasting memory and cpu cycles
the more u know wow
it usually shouldn't matter but if you use it in a hot spot like teal said it might start to matter

interesting
Me when if ((lol = "".match(regex))) { /* use lol */ }
Bad code pattern, but you can save a line that way
Lol
it's not bad tbh
it makes sense if you want all matches in a string
const re = /.../g
let match;
while ((match = re.exec(string)) !== null) {
Blah
}```
I do this a bunch
and how would i go on about importing the lib?
Just download the file via js on plugin start?
Nah
**dependencies.ts: **Line 28
export const getGifEncoder = makeLazy(() => import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js"));
You just add a dependency like that
@dull magnet
https://github.com/Vendicated/Vencord/blob/main/src/webpack/common.tsx#L26
Shouldn't this be import type?
**common.tsx: **Line 26
import { User } from "discord-types/general";

it doesn't matter much
if anything it will just waste like 20 bytes
I'm sure there's more similar non type imports
Also, that file is a mess
We should refactor a lot of shit in there
refactor how exactly?
There is no need for waitFor
if you mean migrating everything to findLazy then no
waitFor is much more performant than findLazy
Hmm
What if waitFor returned a promise?
And we directly saved that
Instead of using a callback to update the exported value
i hate remote libs 
why
const smth = waitFor(...) is better than
waitFor(...)```
and not possible lol
unless you wanna have to await every webpack common in your plugin
there's just no good way to do that lol
you'd have to await every waitFor which isn't really doable without being even uglier than waitFor and more unstable because now if one single module isn't found all modules will be uninitialised
you're trying to import a commonjs file with esm
it also won't work because that file doesn't bundle its dependencies
so what do i do now
make ur own cdn release
make ur own npm package stegcloak-dist or smth and just push esbuilt esm bundle 
shouldn't take longer than 5 minutes if you've ever used npm

I can do it for u if u want
that would be nice, i have 0 idea how npm works outside of npm i
maybe a nice learning experience
it's really easy tbh
make npm account, add account to npm cli, run npm publish in folder with package.json with proper data filled in
done
could someone tell me what it is?
this is confusing me :p
my current code is java @Override public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { var url = request.getUrl(); if(url.toString().contains("discord.com")) { view.loadUrl(url.toString()); } else { Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl()); view.getContext().startActivity(intent); } return true; }
But that means the app crashes whenever i open quick css :p
it's about:blank
hmm
Also check url.authority instead of url.toString
i tried this but it didnt work java @Override public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { var url = request.getUrl(); if(url.toString().contains("discord.com") || url.toString().contains("about:blank")) { view.loadUrl(url.toString()); } else { Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl()); view.getContext().startActivity(intent); } return true; }
oh sure
url.getAuthority()?
you'll figure it out
use the debugger to figure it out
yeah alr.
even for the view.loadUrl call?
no lol
using that instead of tostring fixed it i think thx!
A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. URIs may be used to identify anything, including real-world objects, such as people and places, concepts, or information resources such as web pages and books. Some URIs provide a means of locating and r...
Read design > syntax
urls consist of SCHEME://AUTHORITY/PATH?QUERY#FRAGMENT
alr thx :)
ah i see
so i want to use authority there
but to load the whole url i just use tostring
https://discord.com/channels/blah
scheme is https
authority is discord.com
path is /channels/blah
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
yeah
i see
thanks
this is my code now: java @Override public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { var url = request.getUrl(); if(url.getAuthority().contains("discord.com") || url.getAuthority().contains("about:blank")) { view.loadUrl(url.toString()); } else { Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl()); view.getContext().startActivity(intent); } return true; }
you can just do equals instead of contains
Also your current code has an anti pattern
now i just need a way to get back to the main screen after going into quickcss
wdym?
replace view.loadUrl with return false
oh
should this be the same pr or a seperate one?
uh feel free to add
there's a back press handler in res/raw/VencordNative.js
you would likely just need to store the return of window.open()
and call window.close() on it on back press
ven when stegcloak-dist :<
soon
™️
the ide is telling me i shoudl use Object.equals() instead of ==
because its null safe
so ig i should do that
seems like weird syntax tho
where
oh
you can't compare strings with == in java
you need to use .equals
"discord.com".equals(url.getAuthority())

btw, unrelated to vencord how would i fetch ComponentDispatch via getByProps/getBySource
replugged issue
yeh
Anyone else have an issue where the debugger decides to just not work? looking at the debugger console it spams Waiting for application to come online: dev.vendicated.vencord.dbg, and then eventually says Could not connect to remote process. Aborting debug session.
waitForModule 
Tf do you mean it doesn’t exist
it doesnt
I’ll head back to Replugged to figure out if you guys are blind or trolling, or if I need to go kill someone
it wont
it simply will not
It is unable to will
soon
shoggy!!
yes inside the guild
"just 200kb"
487324957x the size of vencord bundle
you love
(vencord is like 220kb or something)
a measly 200kb
you'd be doubling the size of vencord bundle
NOP
balls
balls
What in the devilbro
Is there something like onStart?
thx
how would i store the return of window.open? isnt that handled by vencord itself rather than the android part?
yes
I can do the quick css
oke sounds good :)
just made a pr
(@PresentMachine)
why does that not ping 
@dull magnet
When Vencord/iOS
never
ios shivers
How do i post my third-party plugin on #1032200195582197831 ?
contribuitor role
thats dumb
u have role
well its unlikely that someone without contribuitor role know what theyre doing 🤓
Do i need to do a pull request to this so it shows im the author on the plugin info?
no
you can directly put userinfo to devs
got it
idk what im doing either
what does the No RPC plugin do?
disables rpc
sorry wrong question, what is RPC used for in discord, i googled what RPC is but not sure the usage
rich presence
the "Playing somthing..." ?
anyways i found a tiny bug. If you go to the plugins tab, enable one that requests a reload, and you disable it, the message doesnt disappear and when you leave you get the popup to reload
Stupid bug
pretty late but more specifically it's used for external programs controlling the client, this includes rich presence as well as invite links opening in app and local OAuth granting (for games/programs that integrate with and control discord)
ya 
YHANK UOH
THABK UOH
@dull magnet is there a reason the release workflow is manually caching the golang build cache
rather than using the cache option in actions/setup-go
idk
did u write them
ya
m
i wonder why the builds take ~10m if ur still caching the build cache
i'll cehck it out later when i stop being scared of imgui
who the fuck still uses www. subdomain
legacy sites
even i do, but it’s just a redirect to the root
look in general 
no
@viral roost Why are you using props.decorations[1]?.find(i => i.key === "new-member")?.props.message?.author instead of props.message?.author for getting the author in PlatformIndicators? This breaks the Indicators for the chat in DMs
i think there's no reason lol
only after the pr was merged i went like "oh wait, the message is a prop"
i just somehow found that before the pr and just ctrl+c ctrl+v it
oh lol
pr time
does anyone know where the client does the req to /api/v9/activities/guilds/{guild.id}/shelf, to lazy to find it, but been thinking about mocking the endpoint and seeing if custom activities are feasible, should be since it's just an iframe
oh nice this was also on my todo list
I'd be down to do all the backend stuff needed tbh, I just cba to mess with electron and all that crap
backend guy through and through
i'd imagine its almost all frontend
just a lot of RPC through postMessage
from what i remember when i last looked
although thats kinda just a library
go to sleep bro
yeah but the idea is to just mock the api so that people can PR their own activities which are then merged with actual array of activities
otherwise you'd need to hardcode all custom activities
if ur talking to me SHTU UPT
i plan on napping in like 4 hours
yea but thats very little work
just compared to the rest of what custom activities need
also: reminder that the network tab has an Initiator column that u can hover over for a stacktrace
@pulsar zodiac
ugh i have to type it out because i forgot to copy it
{
find: "dispatch({type:\"EMBEDDED_ACTIVITY_FETCH_SHELF_SUCCESS\"",
replacement: {
match: /(\i)=\i\.body\.activity_bundle_items;/,
replace: "$&$self.injectActivities($1);",
},
}```
how tf do I add items to the settings menu
Ive come here seeking for help and i wanted to ask how can i get this?
do i need to use regex to get it?
and if so i need to match what i exactly want to replace with my own?
do you ever just wana tear out your lungs
uhh, depends
do you want to get the module? do you want to edit the module?
we need more info
looks like a component to me
so you most likely want to edit it?
i just need the user info
wha
huh
i want the user id when i click there profile
what do you want to do with it
to do a get request to the api
https://api.obamabot.me/v2/text/badges?user=
badge list?
use the badge api??
using badge api
it does
dont worry docs will fix
you can just make your badge component use the normal async flow
probably
with useAwaiter
oh yea if the display check happens inside teh component that'd work
uhh so
if i have an array like this
[ programmers, services, art, people ]
wheere each is a variable
is there any way to get the strings of the variable names?
[ "programmers", "services", "art", "people" ]
like this
(in js)
what
yop
literally change braces and you'll get an object with exactly what you want
{ programmers, services, art, people }
this is why we need cpython in js
is there a way to match the text
just to make sure, it's okay if i make a plugin for replugged that loads vencord, right?
that generally sounds like a bad idea to be honest but there's nothing stopping you from trying I guess (that said I am saying this purely from a licensing perspective and cannot give you the Ven Seal Of Approval™️)
I'll wait until I get the Ven Seal Of Approval™️ before I publish it then (if I do finish it).
does the replugged rewrite plugin api even let you load plugins early enough to be able to inject vencord
no clue™️
update: it works™️, but barely. Loading vencord works, but breaks replugged, and anything that requires the webpack breaks discord entirely
that's about what I expected to be honest
same
at the very most i could probably make an rp-compat for vencord or vc-compat for replugged
loading it is a really bad idea because they will conflict in multiple ways
both of them monkeypatck webpack


proud
make 200% smaller










