#🧩-plugin-development
1 messages · Page 1 of 1 (latest)
first
first
second
69th
@faint swan
hejekemeshsjske;;[. wiwowjwoemw.. wwiwi
WHAT
treble
@faint swan
@faint swan
yes thx
70th
#👾-core-development better
when development isnt in nerd corner 😔
I l o ve beung drunk
I just spend 15 mij
Figuring outnwy i couldn't dm someonr
Turns out
I jihad d I Spotify oprn instead of discord
💀
cause we balling
straight dick balling?
uhhh did your pfp just got flipped
no
ok it ddidnt then
no
should I make a gay porn chanel
waiting for you to send me the 2 hot twinks
i need it
Also I lied there wasn't any but I have plenty of it bookmarked lol
you will send
bro really sent
me
lick feet
i will suck his cocjk dry
what has this become
uhm thats actually me so 🤓
development
no proof
nvm
youve seen
is coffee
ay neko maid
damn go outside
im in class brah
fair
Ye ye totally
nsfwe channel in general so i can send foob cum without worries
literally just make this a nsfw channel
#🌺-regulars rather
no
What if plugins had a "NEW" badge when they're added, just for a few days/weeks?
why tho
that would be annoying as fuck to implement, plus if you wanna know if a plugin was added just look at prs
because I'm too lazy to look at PRs
lol
It's relatively simple, I just did it in a few minutes
The complicated thing would be to do it automatically
it's not that hard to do automatically
I got this far
check the files stats to see when it was created
but adding new: true
oh hmm
but if someone just installed vencord then all files will be new
no?
require plugins to add creationDate to the manifest 
no
yes
lmao
git diff --name-only
look for ones in plugin folder
ezzzz
Well we're trying to avoid git actually so nvm
oh
just stat the file lmao
fs.stat or whatever
let me see if I can do this
first time using ts properly and it's fricking annoying
lol

I just need to get used to it
it's very simple
ts good
ts super good
it gives errors because I didn't set type correctly and it's just like uh frick of I know what type it's gonna be
it's gonna work.. trust!
then set the type lol
if you don't know what type it's gonna be then that's pretty bad...
i know what it's gonna be just didn't specify it
and it didn't work auto idk
I think that interfaces are classes all the time and they're not
i'm confused on where to give the plugin an isNew(): bool function someone help me I'm being very dumb rn
edit the plugin type in types.ts
the one with dependencies and enabled and stuff
put it in there
not the defineplugin one
because that's in renderer
it has no node
patcher.ts & ipcMain/* = main process, this is where you should do node stuff like fs, childprocess etc
preload.ts = node & browser, no need to touch this
everything else = renderer, this runs in the browser process and has no node
the way you do node stuff is via ipc
basically go into ipcMain and add a handler for an event via ipcMain.handle(IpcEvents.YOUR_EVENT, () => { return "yop" })
then u can call that method from renderer via VencordNative.ipc.invoke(IpcEvents.YOUR_EVENT)
you can find plenty of examples in the code
ic
but also u should do that in the build script
the statsync you mean?
plugin age
is this a general dev channel or just vencord
🤷♂️
i'll ask in bd dev then
ask what
oh alr
(completely mod unrelated) say i have a message with variables i want to fill in, the way i tried doing it (replacing the key names in the content with the value), doesn't seem to work, it just spits out unedited content
const memberVars = {
author: [author.user.username, author.user.discriminator].join("#"),
aID: author.id,
aNAME: author.user.username,
aCURNAME: author.nick ?? author.user.username,
aAVATAR: author.avatarURL ?? ""
};
const guildVars = {
guild: guild.name,
gNAME: guild.name,
gID: guild.id,
gICON: guild.iconURL ?? "",
gBANNER: guild.bannerURL ?? "",
gCREATED: `<t:${Math.floor(new Date(guild.createdAt).getTime() / 1000)}>`
};
const channelVars = {
channel: channel.name,
cNAME: channel.name,
cID: channel.id
}
for (let i of [memberVars, guildVars, channelVars]) for (const val of Object.keys(i)) content.replace(new RegExp(val, "g"), i[val]);
return content;
yes
something like that yeah
const vars = {
GUILD_ID: 42
}
"welcome to {GUILD_ID}".replace(/{(\w+)}/g, (m, name) => vars[name] || m)```
const re = /\{(\w+)\}/g;
String.prototype.substitute = function(map) {
return this.replace(re, (m, name) => map[name] ?? m);
}
const s = "Today is {DAY} and the current server is {GUILD_NAME}".substitute({
DAY: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][new Date().getDay()],
GUILD_NAME: "trolley"
});```
stop talking about BALLER
lol
iirc ||= and &= are bit value things
oh yeah google exists my bad
a ||= b is a shortcut for if (!a) a = b
|= and &=
not ||=
oh
a ||= b /* - - - - - - - */ a = a || b
a ??= b /* - - - - - - - */ a = a ?? b
megu ??= min
ye
wdym
looks like it's not gonna work if you const a ||= b;
?
it's a language feature
it's similar to +=
js just has shortcuts like that for many things
normal arithmetic
+=
-=
*=
/=
**= pow
logical assignment
||= Assign rhs if lhs falsy
??= Assign rhs if lhs nullish
&&= Asssign rhs if lhs truthy
bitwise
&= AND
|= OR
^= XOR
<<= left shift
>>= right shift
>>>= unsigned right shift
^ isn't arithmetic?
for pow its **
ohh
**= also works
i'm learning more and more about js everyday
there might be even more than this
rhs/lhs = right/left hand side
wait I forgot some
there should also be
<<=
>>=
>>>=
yes
the hell do those do? true or false on greater/less than?
bit shifts
it shifts all bits
100110111 << 2
=> 10011011100
1011 >> 1
=> 101
you don't really have a lot of use cases for bit manipulation in js so it's no wonder you've never used them
though you probably did use them in bot libraries
intents: Intents.MESSAGES | Intents.GUILDS | Intents.PRESENCES
discord loves magic numbers because of bit shifts
this is a bitfield, it's an efficient way to store a lot of booleans in one single number
each bit stands for one flag
so you can store 8 booleans in one byte
32 booleans in one single int
i did lol
1 = 00000001
1 << 1 = 00000010
1 << 2 = 00000100
1 << 3 = 00001000
1 << 4 = 00010000
1 << 5 = 00100000
1 << 6 = 01000000
1 << 7 = 10000000
here each bit stands for a specific flag so by combining them you can do a custom combo
and then later check if the value contains a specific bit with the AND (&) operator
you can combine them with the OR (|) operator
bitwise is also useful when working with hex numbers
const r = (color >> 16) & 0xff
const g = (color >> 8) & 0xff
const b = color & 0xff
bitstupid when
Or is that just normal boolean logic
bitwise is also cool for decryption
xor decryption is awesome
function xorEncrypt(data, passwd) {
const out = new Uint8Array(data.length);
for (let i = 0, passwdLen = passwd.length; i < data.length; i++) {
out[i] = data.charCodeAt(i) ^ passwd.charCodeAt(i % passwdLen);
}
return btoa(String.fromCharCode.apply(null, out));
}
function xorDecrypt(data, passwd) {
data = atob(data);
const out = new Uint8Array(data.length);
for (let i = 0, passwdLen = passwd.length; i < data.length; i++) {
out[i] = data.charCodeAt(i) ^ passwd.charCodeAt(i % passwdLen);
}
return String.fromCharCode.apply(null, out);
}
const data = xorEncrypt("some very secret private shush message", "some key of sufficient size");
console.log(data);
console.log(xorDecrypt(data, "some key of sufficient size"));
Hey i have a quick question im trying to add my own plugin to vencord but in plugins it doesn't show up in plugins tab
and i don't see any error in console...
did u rebuild
oh...
(Disclaimer: While being very cool this is not actually secure, it's basically just a more sophisticated caesar cipher, for it to be secure your key must be longer than the encrypted message)
i should put that to plugins folder yes?
i don't see userplugins
or i should create it
create it
did you refresh discord after building
ye
like from taskbar or ctrl+r
i think so only something from spellchecker and spotify my plugin
but i had it before
too
yeah you can ignore that
check warnings too
i'd just show all instead of filtering to only errors tbh
ye but still i don't see anything related to my plugin
and i don't think it had any error its just a bit modified more commands plugin
oh i have it now lol
you need to enable ur plugin
just run pnpm watch
oh
sounds good
thanks for help i will try to do something usefull ;))
just wanna ask if really simple plugin that just adds some kaomojis have chance to get accepted?
personaly i like to use them sometimes but searching them isn't really something i like to do :))
something like
(゚ο゚人))
mreow
you can add to morecommands i guess

i think adding them in other plugin is better idea not everyone will like to have maybe 10 or more commands like that :))
copilot loves to suggest me more kaomojis lol
how to regex
i gtg in a bit but i think i can do a pretty easy explanation
go to https://regex101.com/ and drop in the part of code you want to select,(dont forget to set the flavor to ECMAScript) then just mess around and write shit until you got a regex working
its not that hard
how 2 quick build & inject
when making a pr
without picking the same discord instance for injecting every time
ye
just CTRL+R in discord
is enough
also you can use pnpm watch which will rebuild it automatically when you make a change
<svg aria-hidden="true" role="img" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"></path></svg>
apparently
just put it into a react's return thingy?
like this?
or define as const at top
and use interpolation to add it in
i don't really use react but i know svelte so im kinda making educated guesses on what to do. im expecting to make some mistakes, so i'll gladly take feedback & edit the pr until it's mergeable
that's a component so you can just use it like any other react element
you could even do
const SettingsIcon = <svg aria-hidden="true" role="img" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"></path></svg>
and just use it like <SettingsIcon/>
okay
is there a way i can directly use this component? i wrapped it in a button but it's really wide lol
i have this but the switch won't toggle
do i maybe need to debounce the value assignment or something?
(ignore the settings btn it's wip) this is what the switch does
@near aurora fart
ok
epic
works
still have to somehow fix styling of settings button and switch
why the switch so tall lol
how can i open pr from vs code
git
ye but i need to fork it first and switch to that remote?
- Fork on github
- Open terminal
# Add your fork repo
git remote add fork YOUR_FORK_URL
# check out feature branch
git checkout -b my-feature
# Add and commit
git add .
git commit
# push to remote "fork" and branch "my-feature"
git push -u fork my-feature
# if you want to pr a second feature
# first, follow the second code block below to get a clean Vencord. You won't lose your first feature assuming you made a new branch for it
# now go to step 2 in this block and just use a different branch
Later to return back to clean Vencord main:
# checkout main branch
git checkout main
# fetch origin (original repo)
git fetch origin
# reset your local clone
git reset --hard origin/main
thx, you can pin this (delet this msg if interferes)
https://github.com/Vendicated/Vencord/pull/140
lmao?
can u show a screenshot
yes
i can remove the border
from bottom
but idk how
also the colors are from my theme
that looks kinda weird with how the settings cog is a bit smaller than the switch
Also they're basically making out with how close they are
how 2 remove????? lol
discord likes seperator
i can just apply a css rule on it but crinj
uhh
how did you even add the divider
can you show the source code of the component?
i didn't
i just used the Switch component
and the switch component has the border by default
okay sec
i quite like u
i quite like u too
the heart reaction burst is nice
its experiment
ah that's why i was confused
i was looking at Switch but this is SwitchItem
i was gonna say i remember there being a hideBorder sort of thing
any propaganda
children: any ;)
lol
feel free to fix the "click on card to open modal" bc in the pr only way to open the modal is the settigns icon, i had to remove the onclick so the switch would work
i have to go do other stuff but add comments to the pr where something needs to be changed kthx
https://github.com/Vendicated/Vencord/pull/140
to be honest the clicking on te card was a nice side-effect but wasn't actually intended originally
thing is
we dont want the settings cog on every plugin
only ones with settings
i had it so it shows another icon but it was wierd
and idk where discord had an i icon
i had this icon
god this reminded me of https://github.com/exhq/shitty-png-to-svg
or a ( i ) icon
yeah
can't u hide if plugin doesn't have settings
we just discussed that
but also
there's a modal with more info about plugins
so we'd still need a way to open that
good news
there's an i icon
@near aurora without us having to add the SVG ourselves, we can import from discord using filters.byCode
can get them by searching for:
cog wheel: 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069
info icon: 4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16
some random extracts from the svg
it's unlikely to change
someone please help me understand why is handleActivityToggle fired when you over the button and not when you click it
install it and it's the second button in the Registered Games tab
sure lemme check
I'm really trying to reuse this component as much as possible instead of making it by hand 
@cedar olive nice easy fix
basically uh
your handleActivityToggle function is run immediately
"() => Vencord.Plugins.plugins.IgnoreActivities.handleActivityToggle(gameProps)");
use that instead
and it should only log on click now
xd
lmao I'm so dumb
lmk if it doesn't do what you expect tho
np
:)
got some example code for searching for an icon like that?
@dull magnet how call extension api
uhhh
honestly i cheated to get the info icon and don't know where it is in the ui , but if you find a icon you can always view it in devtools and just copy a snippet from the d="some text" section
fair
meow
what did u install
i don't remember if they're enabled by default or not
no goddamn clue
replace words
with funny xkcd
this is amazing im keeping this
send link
literally the link i sent
for firefox or chrome
oh @near aurora just realised u might've meant searching for the module
let CogWheel;
wp.waitFor(wp.filters.byCode("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069"), m => CogWheel = m);
should probs work
ah wait
im an idiot
wrong func
uhghg i feel like my brain is frying atm
ok fixed the code
and for icon i use the same thing but icon snippet?
nah since it's not used much, just have it at the start of pluginsettings/index.tsx
you could use lazyWebpack like these if you wanted
and just change the stuff inside byCode to be the SVG stuff instead
const CogWheel = lazyWebpack(filters.byCode("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069"));
ig
const CogWheel = lazyWebpack(filters.byCode("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069"));
const InfoIcon = lazyWebpack(filters.byCode("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16"));
and i just did this
hm
filters.byCode is the filterFn
oh wait
i just saw how you're using it
you have to use it like a component
{plugin.options ? <CogWheel/> : <InfoIcon/>}
@vital torrent
lmfao sry
you can give it a width={16} and height={16} as a param
16 being the size number
try making bigger maybe? idk
i wanted w and h 24
owo
feel free if it looks okay
hm
i mean its your code
<Text variant="text-md/bold" style={{ flexGrow: "1" }}>{plugin.name}</Text>
what do u wanna style about it
just edit the style={{...}}
nonono i wanna edit the switch's inner wrapper that wraps the text + switch
i wanna create what i made in the mockup
separate header which has the switch and title + cog
probbly have to reimplement from scratch for that
border is easy tho
actualy
the switch takes a style prop
just pass ur custom style
interface SwitchProps {
value: any;
disabled: any;
hideBorder: any;
tooltipNote: any;
onChange: any;
className: any;
style: any;
note: any;
helpdeskArticleId: any;
children: any;
}
i like the big button that says enable
I like ur mom
toxic
omg I did it
the new thing
it works
it's so easy
but took me ages to figure out 
what's the new thing
the "NEW" badge
for plugins
where is the guideline for PR titles (if there is one)
I see most prs have feat: x or feat(plugin): x
theres none
ah
the guideline? explode
explode i will
i think i don't wanna do the separate header. id have to style the child which im not capable with inline styles on the parent
https://github.com/Vendicated/Vencord/pull/140 the pr is ready. feel free to comment on what needs changing / merge. thx
ok ven did the thing
s
wait i broke it lol
looks good by me
now its fixed ven
ngl it actually looks good
No overload matches this call.
The last overload gave the following error.
Argument of type '(_: string, lang: any, code: any) => void' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
Type 'void' is not assignable to type 'string'.
pussy
types
you're misusing replace and typescript doesn't like that
figured forgor to return string
function balls(balls: { balls: { balls: { balls: boolean } } }) {
return { balls: true }
}
brah
oh wait
it did
only one error left prettier and prettierPlugins global
should i just ts-ignore it
ok the switches are better
Me gusta switches
theme?
pls drop theme i like it
here is how you use it without usercss #🧊-off-topic-iceman-only message
this is my current quickcss
@import url("https://xmc.c7.pm/modular/scheme/amora.css");
@import url("https://xmc.c7.pm/modular/font/unifont.css");
@import url("https://xmc.c7.pm/modular/textarea/mobile.css");
@import url("https://xmc.c7.pm/modular/9x_bot_tag.css");
@import url("https://xmc.c7.pm/modular/unread.css");
@import url("https://xmc.c7.pm/modular/nyantro.css");
@import url("https://xmc.c7.pm/modular/cozy_compact.css");
@import url("https://xmc.c7.pm/modular/old_roles.css");
@import url("https://xmc.c7.pm/modular/status_icons.css");
@import url("https://xmc.c7.pm/modular/old_titlebar.css");
@import url("https://xmc.c7.pm/modular/hide_tag.css");
@import url("https://xmc.c7.pm/modular/left_reply.css");
@import url("https://xmc.c7.pm/modular/base.css");
/* Hide Gift Button */
[class^="channelTextArea"] [class^="buttons-"] > button {
display: none;
}
because it looks like you're on the clicked hidden channel
that's a bug that should be fixed
as for the collapse issue, that's probably because he doesn't check whether the parent is collapsed so shows regardless
yeah
@thorny solar do u wanna fix the collapsed issue in ur pr as well?
it's pretty simple
let CollapsedChannelStore;
waitFor(["isCollapsed", "getCollapsedCategories"], m => CollapsedChannelStore = m);
...
CollapsedChannelStore.isCollapsed(channel.parentId)```
it might also be parent_id
for userstyles
wouldn't be way simpler to just implement usercss
how
ur the dev
if the extension works then that's easiest
you need to toggle options
ig
horror
real and true
lmfao
just check channel type silly
or only do the collapsed check when the channel is hidden
why do u even do it for all channels
how did you get that theme?
there's a THIRD hh?
is it just quickCSS?
{
find: ".prototype.shouldShowEmptyCategory=function(){",
replacement: {
match: /(\.prototype\.shouldShowEmptyCategory=function\(\){)/g,
replace: "$1return true;"
}
},
to fix categories disappearing when they're collapsed
scroll down
what is the || !can(CONNECT, channel); for ?
hidden voice chans
if they're not minified that's fine
you can even rely on e
since it's always e
but any other minified variable names are a big nono
would anyone who knows how 2 inject react shit be willing to help me make spotify plugin?
i could do the Spotify api communication but i need someone 2 help me inject the ui for it
basically trying to re-implement SpotifyControls from powercord/replugged
is there a way to add an option to a command thats either a number or a specific string
I want to let the user pick a specific thing or randomize it
actually it would probably be easier to just add a second option

yeah makes more sense
ok so im trying to make this xkcd comic fetcher but discord is being super mean about it
set the fetch to no-cors
ok that works but i messed up even harder now
this is the one case when you should turn off the discordo noise
ok i also finally figured out how the options are going to work: theres the integer comic and boolean random, and if you use neither it just does the latest comic
according to way too much googling its because im trying to parse non-json as json but its literally the xkcd json page??? why is this not working
that won't work
why not
well it depends
if you want the response in javascript it wont work
cause opaque responses dont give u the body
if you want the response in say an html img element, that will work
so if i wanted to get the response in js how would i do that
ok so no xkcd command then
does he not have an api with cors policy
maybe shit like https://corsproxy.io/?https%3A%2F%2Fxkcd.com%2Finfo.0.json
that will work but it's a very ugly solution
i could expose a non cors fetch api
or anyone else who wants to pr
but need to research how to do that in browser extension and won't work in userscript
if the image permalinks were done with numbers i could've just used those instead of fetching the json
are they not
no the actual images are based on the names of each comic
something like imgs.xkcd.com/comics/bubble_universes.png
although that may log people's ips
so it would be way better if you could message the guy and ask him to add cors
aired
the only downside is that I'm still really bad at typescript
bro is gonna reply "ok"
in the meantime the vercel.app one works fine
ok xkcd-fetcher 1.0 is finally complete (that took way too long)
@vapid latch sorry for ping but please consider this: porting GM's SpotifyControls to Vencord? (if needed i could do some boring grunt work just i am not able to do it myself)
but I probably won't merge that
cause ip logger potential
we don't know the guy who runs it
yeah once xkcd guy fixes the cors thing ill go back to actual xkcd
hope he does
in the meantime im just gonna keep this to myself
eventually™️
have you tried jsonp callback to xkcd?
iirc it should bypass cors issue
jsonp?
someone used that route like over a year ago for his smart mirror and he said it worked idk
lemme find source
how would I do that here
it uses a script tag
thats horrible
isn't that literally xss danger
also csp exists
so the obvious answer here is to somehow get a script tag into my typescript file
ok agreed in the context of client mod, using jsonp is gross and risky
its easy but a very horrible dangerous solution and won't work in userscript
until john xkcd fixes the cors im just gonna keep using this proxy thing
jsonp my beloved
in the meantime you can host the vercel app yourself to avoid ip logger risk
on ur vercel account or somewhere I mean
funny this xkcd cors issue is going since or before 2019, assuming that handful of people wrote to xkcd dev to fix this and it still isn't fixed , hopefully he responds at least
I found https://getxkcd.vercel.app (which source lies at https://github.com/khalby786/getxkcd)
doesn't that still have the same issue
what if massive lookup table of names and convert number xkcd to xkcd image link directly
build script that pulls the latest table
man i hate that discord still shows the new message thing even if the only new messages are from someone i have blocked...
sure wish someone could fix that..
🫰
^snapping fingers
WHY DID YOU WRITE THAT TO EVERY SINGLE CHANNEL
thanks for sending that in 3 different channels, I am now 3x as likely to make that
oh, it just led me to block them.
cuz if i send it in 3 different channels, people will be 3x as likely to make it
you are all my monkeys and you will dance as i please
I was being sarcastic
you just made everyone 3x less likely to make it
i am now 3x more likely to ban you
you're 3x more likely to explode
(100%)
Nobody fix this
Actually
I'll make a pr that will have that fix... Buuuut keep it a draft
And make sure it never prs
@hasty cypress
@slow charm
@opal fern
@wanton sierra
When third party plugins are a thing and Chara can just download the plugin file
the exit is calling your name
jsonp sucks ass because you can't have uri encoded shit as js function name to call it
so any query with a space or non ascii char is invalid
looking at you imdb suggest api
why in the world are you giving it non ascii characters to use in the function return
oh, they encode the search string in the callback, that's dumb
in any case, jsonp was a good tool for its time but anything that still relies on it is pretty silly
google's undocumented autofill api supports jsonp you love?
@near aurora loves 
how do i not give it them
like i want to search
"a million ways to die in the west"
there are spaces
it encodes them no matter what i do
and the jsonp returns a%20million etc
so unusable garbage
do i just replace with underscore??
@grim hare
katlyn will first reply to me guhhhh
use the decodeURI function
y
any sane jsonp api (as sane as a jsonp api can be) would let you provide your own name for the callback, which is why I assumed you were giving it something weird
i cannot modify a resource before putting it in a script tag
o
guhh katlyn is upset with me 😦
oh I missed your ping
I do use a somewhat undocumented google jsonp api for work and I don't love it too much but it does the job at least

@grim hare imdb b like
waltuh
hey farm
just causing a little mayhem, like usual
kara@hasty cypress
: 😈
do userplugins work in subfolders too (just making sure)
yes

i will make discord update back to babel
we will male babel faster than swc
@hollow inlet
no
You are evil
As long as there is a file named index.xyz (where xyz is the file extension you want) and it exports the plugin objects
what
this.schedule
then you're doing it wrong
onClick:h?void 0:(...args)=>this.handleClick(...args)
is the stage channel one a real onClick btw
wha
cry
how
yeah
how
@austere gulchguide on injecting react when 
huskkkk

It's easy
- Find another element to piggyback off of
- Replace with a wrapper element or an array
- Profit
soon
Is there like a way to determine when settings are getting saved and then do validation on them? So basically when pressing this blurple button
Been checking the code and was only able to find stuff to check when a specific setting is getting changed unless I'm misinterpreting the code
useSettings() is a hook and you should be able to watch that
in components at least
but
iirc onChange should only run when you hit save @oblique viper
i should probably add a generic "onSettingsSave" somewhere
hm let's see
You are correct, should have tried that before asking, was just so used to component onChange which is live changes

it should show their name
huh
it isnt now
i'll have to look into it
maybe discord changed smth
Main issue with this is, that this still saves it and has no way of preventing the save. I have a credential input which I want to check on save to make sure the credentials are correct and if not tell the user about it. I also tried using isValid but that seems to be invoked on live updates to the input
hmm
i can probably add a beforeSave thing
entering username and pw on discord tho 🥴
what is it for
Discord's support tickets directly in Discord
lmao nice
zendesk 
i like that
i'll add a prerun hook
for now, leave it as it and I'll get aroudn to that
(fwiw you can also do custom components)
Yeah there's three options for authentication on Zendesk. First two are out of question since they are admin only stuff
Yeah I know but I'd much rather use an in-built solution rather than doing a custom component so the plugin gets fixed automatically when you make fixes in Vencord rather than me having to update the plugin myself to account for the new changes
👍
Probably best if you make it promise and non-promise, so there's the option of async validation if necessary
oh that's what you meant
I thought you came to the realization it doesn't have to be a promise or something lol
lol
but yeah LGTM
just finding a good place for the error :>
aight
youre storing peoples passwords in settings as plain text?

Yeah, sadly their auth is via basic auth
generate a key with crypto.subtle.generateKey, store it in indexeddb (via Vencord DataStore api)
then (en|de)crypt password with that
would hashing be easier
right, that'd be an option
still not much safer but at least random malware/stealers etc won't easily be able to steal it
you can't reverse the hash silly
zendesk
I will still probably encrypt and put in the IndexedDB just to be safe
@oblique viper just for u https://github.com/Vendicated/Vencord/pull/161
thanks 
:h:
cool it works
storing the key in IndexedDB i mean
ignore the errors inbetween im dum
nice
Wonder how I want to integrate it exactly. Contemplating whether I make it a fake guild like Favorites or make it like Inbox or Threads
Well I wouldn't wanna do a modal, more like a popout like this
j
However I may just do the home page tab idea
Is there any guide or wiki for developing plugins?
||& Also pls don explod me||
there's links in the repo readme
they might be a tiny bit outdated with the recent big updates we've had but they're still a good starting point
Simple docs: https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md
Slightly more complicated docs: https://github.com/Vendicated/Vencord/blob/main/CONTRIBUTING.md
That button is special
The discord dev tools are accessed using it
he probably knows
Does he?
I doubt he has isStaff enabled in the first place
I mean...it is not shown here
mf
what does that do
COPYING AND PASTING!
LMAO
do you know who that is
he 100% knows
Yes
PS: I did not look at the name when I sent that message
LMAO the icon
run via terminal
thats how to debug
what
what
why is ur Windows scuffed
Nop that's just how windows apps work ootb
lmao how does ur vm not support opengl
winshit
Talking mad smack for having a carrd bio
the user for their windows is called winshit
whats wrong with having a carrd bio
you will PR the console allocation
it's just wrong
that's like setting yourself up for internet bullying 
ok
LOVE THE ICON
we should actually ship that as the real icon
@dull magnet supports
yop
I do
why do you think that's the icon
when no embed
oh wait I have disable previews
lol
i know way too much about this app
e.g. when setting GLOBAL_ENV.RELEASE_CHANNEL = "staging" there's a banner down here
marvin has your token
oh no not my precious token let me just
@lost geode @graceful fractal @thorny solar you guys are listed in showHiddenChannels so ill just mention all of you.
Once you click a channel, it shows on the sidebar as if you were actually in that channel
yeah it's only visual i'll see if i can fix it later
probably
I brought that up a while ago 
How the fuck do I use functions from a plugins file
Thought I did it right but apparently not
ignoreBlockedMessages is undefined 🗿
your plugin name starts with a lowercase ? 🤨
case sensitive moment?
Vencord.Plugins.plugins.{yourplugin}.function(...)
I believe
at least looking at the AnonymiseFileNames plugin
that's what was done
ok
yeah
it was fixed
now my messages are being delayed by a few hundred ms tho
where microsoft edge string go


perfect





