#🧩-plugin-development
1 messages · Page 41 of 1
ohh fire
okay I installed accessories api how do i add a button
or I could use interactions
yesyes
finding a bug in a closed source video game that you didnt make and patching it yourself feels so powerful
@dull magnet https://fxtwitter.com/dr_cintas/status/1734604588282794237 web developing will be dead soon alhamdulillah
The new Screenshot to Code from Vercel v0 is insane.
I just took a screenshot of a pricing table and it was converted into code using AI in seconds!
It even outputs the code and allows you to modify any specific parts.
nop
so I'm trying to give the catppuccin theme a translucent background
except none of the quickcss I'm using does anything
I even tried * { background: transparent } and it still doesn't work
I mean if you can feed primary secondary colors to LLM by just creating a design you can create the app ig
animations are still one thing tho
anyway do aoc
ok so
setting color works for anything that hasn't had its color explicitly set it seems
which I'm guessing means theme happens after quickcss
ah
ok interesting
it did something
but the window itself still isn't transparent
Ah I haven’t read what you’re trying to do :3
alright so
everything is indeed transparent
except the window
but the window should be
it has HUD vibrancy
and it's transparent for about a second during start
I need help what do I add here to make a modal
addButton("comment", message => {
return {
label: "Comment",
icon: InfoIcon,
message,
channel: ChannelStore.getChannel(message.channel_id),
onClick: () => {
openModal(props => {
return ();
}
);
}
};
}
);
I tried all findable examples it only errors

look at other plugins that open modals
I did it still yells at me but I try looking again
they all use a modal class
const key = openModal(modalProps => (
<LogModal
modalProps={modalProps}
close={() => closeModal(key)}
/>
));
for example
stilll brings me no where as idk how to define that
ayy I did it
once again look at other plugins
now
just do the same they're doing
is there a way to change background opacity while keeping the rest of the background color?
well I been doing that for ages now I keep getting errors likely just as im stupid
wait I got it
i should mess around with thius more i got access to it a couple days ago
hell
ok v0 sucks
without an image ref it makes every result look like vercel
webdev is saved 🙏
also not even ai can figure out how to align shit properly
okay it was the extension
I made it a tsx and now it shows

I also hacked in discord messages
into the modal
im using the embed html of discord
https://github.com/Vendicated/.github/pull/1 @dull magnet ITS BEEN A YEAR
merge already
is there an existing plugin to hide actions on hovered messages? like reply and create a thread. migrating from betterdiscord and it's the only replacement I've been unable to find
sorry if wrong channel to ask
css
u don't need a plugin for that
99.9% of the times u wanna hide something, you can do it with just css
ah yeah true
any chance you know the names of the message hover buttons? and/or where to find that out myself
inspect elements
jfc that definitely would work thanks completely forgot I could do that 
you'll have a hard time selecting them because they only show on hover, f8break is your friend though
oh I got it sorted dw, brain just short circuited for a moment
is there a way to make custom labels like these?
the Tooltip component
ty
❯ make std_spec compiler_spec
Using /usr/bin/llvm-config [version= 17.0.6]
./bin/crystal build -D strict_multi_assign -D preview_overload_order -Dwithout_interpreter --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/std_spec spec/std_spec.cr
Using compiled compiler at .build/crystal
.build/std_spec --order=random
.build/std_spec: symbol lookup error: .build/std_spec: undefined symbol: __libc_start_main, version spec/std/float_printer/shortest_spec.cr:192
make: *** [Makefile💯 std_spec] Error 127
FEAR
Makefile💯
I lovr 
makefile errors

C can be fun
beleve it or not its the second coding language I ever touched and the first one I did more then goof around in
no C
yea I learned to dislike it an little bit after finding better coding languages that are easier
it is quite funny how I first started with pascal then directly moved to C/C++,then java and later python and javascript/typescript
unlike the C++ that I learned so long ago that I do not know how I did it I still remember the first day I touched python
as well as some early bot projects I learned JS for
@stark topaz would likely remember the SWR Moderation bot me and her sister worked on
it long is gone but it was fun
we really need to make a new bot I want to code discord.js stuff like her
well you know typescript so you know JS how did you even learn it
I tought you only know HTML 
sis teached me
makes sense
line 100 executed command which couldn’t be found
(that’s what 127 means)
no
…or missing lib?
it literally says undefined symbol: __libc_start_main
which means it tried to run/compile/link (dunno) something that doesn't have an entry point (main method)
"better" is very subjective and it depends on how you want to use it
hey this isn't technically a vencord question but all the smart ppl are here so i'm gonna ask. i'm connecting to discord's voice gateway in a browser and im successfully doing everything until i get to opcode 4 (session description), where i'm trying to call setRemoteDescription on my RTCPeerConnection, but it throws with the following error:
Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to parse SessionDescription. m=audio 50001 ICE/SDP Expect line: v=
looking at the sdp which the voice gateway provides, it doesnt start with v=. am i using the wrong method? i'm unfamiliar with webrtc so go easy on me lol
can't help with your exact issue but https://discord-userdoccers.vercel.app/ might have more info
this is what i've been following, unfortunately there's no details other than "you can use the server's sdp to connect"
true I mean easier tbh
anyone good with java here that can tell me why should i use a Condition object over an AtomicBoolean? they seem to be the same thing, the former having more context aware methods
ive never heard of condition before
but always just used AtomicBoolean
seems subjective? just use whichever you prefer
what are you trying to achieve?
im writing a custom discord client and i wanted to implement voice
for now, just receiving
ah
after some more reading, apparently discord uses some fucked up form of webrtc which isnt actually p2p? im so confused now
how did they implement it in the web app then
it uses webrtc
their desktop app uses some other stuff
@clear parcel will probably be able to help u
i just dont get how you actually connect via webrtc
both chromium and firefox are refusing to parse the sdp provided by the voice socket
oh thats the umm!! person who wrote userdoccers right
i think
yes
cool lol
this webrtc thing is still stumping me, are there any example implementations of it?
for discord, i mean
i cba to doc webrtc
i dont blame you
this shit is a nightmare
mozilla couldn't be bothered to write proper docs for it and half of the api remains unimplemented in firefox
i suggest not using webrtc (for the time being)
aaand also hold off voice for now, discord is switching to e2ee
a lot of people are asking for it, there's no option for holding off
udp looks more complicated anyway
unless it isnt? i wouldnt know
i wanted to doc voice and gw but i have studies to take care of
it really isnt
you just have to handle rtp and rtcp packets
a bit of decrypting and opus
you can use https://github.com/webrtc-rs/webrtc as a generic webrtc impl reference
there's also a chrome thingy for debugging webrtc
chrome://webrtc-internals
ok so i've been looking into using udp instead, i've got ip discovery working (i think? the server seems to respond with my ip and a port so) but i dont understand how you actually begin to receive voice data
oh im not sending select protocol, i forgot to lol, sorry
yeah you do select protocol after ip discovery and you have a connection
https://github.com/imayhaveborkedit/discord-ext-voice-recv this should be applicable for users too
Voice receive extension package for discord.py. Contribute to imayhaveborkedit/discord-ext-voice-recv development by creating an account on GitHub.
@glass oracle any idea why its refusing to decrypt? everything looks ok (all data is the right length, nonce is there, sequence is there, timestamp is there, etc)
im using libsodium.crypto_secretbox_open_easy, and the encrypted audio im trying to decrypt already excludes the nonce
oh does it only support xsalsa20_poly1305?
I FIGURED IT OUT
THE NONCE NEEDS TO BE PADDED WITH 24 NULL BYTES IF ITS UNDER 24 BYTES LONG
yes the nonce is 4 bytes and there are null bytes to conform with the required size as per the encryption algorithm
although different encryption algorithms have different payload structures (excluding the rtp/rtcp headers, that's universal)
there are some unknown encryption formats like aead_aes256_gcm and xchacha variants
aead_aes256_gcm is what the client uses (if you're able to figure out the payload format then I'll be very happy if you contribute that knowledge to userdoccers :))
i can barely figure out the known formats lol
maybe if i ever get some more experience, i'd love to contribute to userdoccers sometime
opus is the same as ogg right? im so so so close, ive managed to decrypt the audio data but i dont know how to play it back to verify that its working
ok ok so
im receiving the voice data
im decrypting it
i think
it doesnt error and gives all the proper data
but the opus it outputs seems to be invalid, unless im missing something
Ffmpeg
but unfortunately it seems to think the data is corrupted
Hello, is there an bigger plugin dev documantation other than https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md ? I have a problem with plugin dev, and i don't think anybody likes my (possibly) easy to solve problems
even though it isn't, and i know it isn't because the decrypted audio is 0xF8, 0xFF, 0xFE when its silent
Thank you very much
im gonna just like
re explain my issue
since like
its gone from the chat now
ok so basically:
- i am connecting to discord's udp voice servers
- this is all successful
- all data received is decoded properly (the timestamp is a timestamp, the ssrc is correct, the sequence number increments properly, the version and flags + payload type are fine)
- the audio is successfully decrypted using
xsalsa20_poly1305, the nonce being everything before the audio data as a buffer, padded with zeros after the data if its less than 24 long - using discord.js's
OpusEncoderto decode the decrypted audio complains that its corrupt
so why is it complaining about that?
also, for some reason, it successfully decodes silence (which is always 0xF8, 0xFF, 0xFE as it should be per userdoccers)
Opus__Encoder__ to decode the data 
has a decode method, i don’t make the rules 🤷♀️
sorry wasn’t fully awake when i said that so i couldn’t actually respond properly
is this not what i’m supposed to be doing? how can i play the audio data
Voice is a pain tbh, i have an old thing that barely worked iirc
Let me find it
Oh its for receiving, misread, mb
there's also discord.js-self-v14 (13? 12? i forgor) which you can take a look at for voice
i have everything working other than actually playing the audio though
which i don’t think it’d handle
haven't really tried audio playback myself
damn
any idea how u might get it to play? any more details about the format other than that it’s 48khz stereo opus?
even just writing it to a file would be enough for me to know what to do but obviously writing the raw audio packets decrypted shows as invalid
@glass oracle figured out the decoding issues, i had to remove the first 12 bytes
trial and error goes hard
lol
i’ll put my findings on userdoccers when i’m home since examples can help a lot of people
👍
how possible are folders inside favorite gifs tab?
or a random gif selector
the random gif selector shouldn't be too hard, Discord stores your gifs right?
@glass oracle alright final findings
after some more tinkering
the header size is 8, not 12
so subarray 8 and the decrypted buffer length
kinda differs for different formats
the udp socket only uses 2 channel opus at 48khz
you have to strip the header before letting it decode
https://github.com/Vendicated/Vencord/pull/2063 genuinly hope my plugin gets added

I did my best on the modal it is kinda bad looking 
what is it even for
like I get what it does
but how do you... make use of it
its for commenting on messages
yeah that much I know
its handy for channels you cant talk in or to add notes to a message
later I wanted to make it sync
the icon can be used for other stuff
so I just updated Icons.tsx
so it's basically user notes but for messages
though not sure why you'd need more than one note
also MessageNotes would be a way less confusing name if that's what it's for
I don't get why you'd want a comment-like UI for it either
it somewhat implies that the comments are public
Hi! i was wondering how the muteNewGuild plugin worked, especially how does it mutes channel exactly? i want to make the same plugin but instead of muting guilds it enables the "Show Alll Channels" discord feature when an user joins a guild.
i'm a beginner btw lol
i know... but i don't understand how it modifies notification settings
what is updateGuildNotificationSettings and is there something like it to not modify notification settings but the show all chnnels setting specifically
yes
updateGuildNotificationSettings is a function from discord
reverse engineer the show all channels toggle to find out how to do it
react devtools will help
is there a variable to see the discord install location
I wanted to make a saving system for comments
or I could use datastore
oki thanks :D
omg rust
codegen backend cranelift
fear
oh that's neat actually
checks docs
unstable
LET ME HAVE FAST COMPILES
Updated my PR for my plugin
I made the comments save and the UI look not like it been designed by a idoit
there's still like a million things wrong with the ui
I tried my best

it is functional
even after reloading
i'm a crystal contributor now, we ball https://tenor.com/view/thats-it-yes-thats-it-that-right-there-omg-that-thats-what-i-mean-gif-17579879
i tried looking at more issues to contribute but they're mostly confusing 
based
does discord do somethjing weird with the mic mediastream under the hood ?
i override getMediaDevices to return a webrtc stream and i can hear it fine in the audio test
but others can't hear me in vc
sometimes if i play around with it a lot, turning audio stream on and off they can hear me
but then it breaks again
voiceActivityInput in the mediaengine becomes null sometimes
just to be clear, stream is always active and track is always enabled and unmuted
so it's not messing with those at least as far as i can tell
oh nvm it sets the track to disabled wtf 
look at how rnnoise did it before it was removed
does anyone know how exactly discord records your voice to be sent?
im using a udp connection instead of webrt
c
wdym by that?
like how it records the audio from ur mic?
yeah
aside from just
using the web audio api
i understand that part
but atp ive committed to using udp
and ive got it all working but not with speaking
well probably some audio recording library
im assuming theres some rtc api which does it for them
smth like https://crates.io/crates/cpal might work
would be perfect if i wasnt writing in js
https://github.com/Aleph-Alpha/ts-rs i mean i guess i could use this?
is it too late to admit that i dont know rust
^
lmao so ok i was able to narrow it down
basically, besides audio test muting the track sometimes idk whats up with that
for some reason in vc, other's can't hear me
unless someone else speaks in vc first
like if someone else triggers the green ring, then my "mic" works
and it has this problem on both ptt and voice activation
this makes me wanna pierce my eyes (avid fan of FOP, I should try haskel)
also is it just me or does crystal's syntax look like python?
nvm python is nowhere near that level of actually functional code
(anything is better than python imo)
where does it say that
oh
crystal/ruby are good oop
oop but you can write purely functional code
just like js
it's cozy
and they're very callback / inline func based
nvm cant figure out whats wrong lol
btw @dull magnet i threw out all the weird hacky steam proxy code i was doing so custom vencord build isn't needed anymore
and webpack should never break again
hell yeh
hello so im having a NEW issue with voice
so i've got the mic data sending
apparently its recording at 48khz, 2 channels and a bitwidth of 16
but it only plays in the right ear on the official client and is also low pitched
if i change it to 48khz / 2 the pitch is corrected but its still in one hear and stutters even worse
what the fuck twitter
JSON
okay so
const id = await getVirtmic();
if (id) {
const audio = await navigator.mediaDevices.getUserMedia({
audio: {
deviceId: {
exact: id
},
autoGainControl: false,
echoCancellation: false,
noiseSuppression: false,
channelCount: 2
}
});
audio.getAudioTracks().forEach(t => stream.addTrack(t));
}
i did this in the console and confirmed that audio is indeed stereo @trim cedar
but it doesnt actually work
Probably a discord limitation then?
Or what do you mean
but smth is going wrong
Yeah not sure if it's something I'm doing
But I just forward the channels as is
So I don't think that venmic is the problem here but I'll have to test if there some pipewire quirk at play
Will do in a sec
noo
like i said it works
i tested in console
its stereo
issue in the js somewhere
Wait you tested it in the stream?
And the stream was stereo then
Sorry my brain is dead today lmao I think I misunderstood your message the first time xD
navigator.mediaDevices.getDisplayMedia = async function (opts) {
const stream = await original.call(this, opts);
const id = await getVirtmic();
if (id) {
const constraints = {
deviceId: {
exact: id
},
autoGainControl: false,
echoCancellation: false,
noiseSuppression: false,
channelCount: 2
};
const audio = await navigator.mediaDevices.getUserMedia({
audio: constraints
});
audio.getAudioTracks().forEach(t => {
stream.addTrack(t);
t.applyConstraints(constraints);
});
}
return stream;
};
this is what i got rn
no luck
Is stream.addTrack also called twice?
Just wanted to make sure that audio.getAudioTracks also yielded two tracks in case the tracks are split into FL/FR
hmm
try it urself
Will do in a sec I'm too dumb to calculate the poly lines for an arrow placement rn lmao
const a = new Audio();
a.srcObject = await navigator.mediaDevices.getUserMedia({
audio: {
deviceId: {
exact: (await navigator.mediaDevices.enumerateDevices()).find(d => d.label === "vencord-screen-share").deviceId
},
autoGainControl: false,
echoCancellation: false,
noiseSuppression: false,
channelCount: 2
}
});
a.play()
it works
so theres smth wrong with our patch
or smth in discords code
heres the patch
i added channelCount: 2 in constraints
inb4 its actually a discord limitation
Is it stereo on windows?
True
nop
Is it stereo there?
i was doing soundboard on web
with the same thing rnnoise did
Don't have Windows, I can install a VM real quick tho
Or maybe easier
Is anyone here using Vesktop on Windows right now?
no but i think i could get it real quick
that would be amazing
i dont know js/ts is that ok
yeah doesn't matter
no
or is it screenshare related or
screenshare
alr I'll join join = explod feel free to join and just screenshare this video: https://www.youtube.com/watch?v=6TWJaFD6R2s
You can check your Headphones (Kopfhörer) or your speakers (Lautsprecher). This ist thought of being useful for 2.0 or 2.1.
You can find other Sound Tests in my channel or my playlist.
My 2.1 Sound System: https://amzn.to/2Fohap1
My Bluetooth Speaker: https://amzn.to/2K7GkXB
My Headphones: https://amzn.to/2DqX3Ee
My Midi-Controller: https://...
yeah
Alr thanks!
i hate this music now
lol
i listened to it for like 30 minutes alr
Lmao xd
did u find that independently or from me
just searched stereo test on youtube
xD
🍄
I'd happily take that mushroom
anyway uhh
idk how to proceed
its really hard to know if this is a limitation from discord's side or smth in their code or what
Yeah
do u know how to debug webrtc
No idea lmao
like how to check what packets its sending
so we know whether it's sending stereo audio at all
I think one of the "easiest" approaches would be to just port the Windows module
huhh
Problem is that on linux all of the modules functions are stubbed
They literally do nothing so I can't even port it
do u mean like use their native thing
Yeah
Well I mean
@tall kiln reimplement discord_voice 
I only need to hook the screenshare stuff I suppose
nop
i dont think so
on web it uses WebRTC
you have two connections, one for mic, one for screenshare / camera
on desktop it functions differently
We can have some frankenstein thing where we only make the screenshare go through the module
Depending on how fucked that is
@gritty sparrow @clear parcel does Discord's WebRTC channel for screenshare accept stereo audio
we're trying to make vesktop screenshare have stereo audio but it's failing and i'm unsure if it's a discord server limitation or smth in their client code
if for some reason you want me to test a windows build then i'll be up for at least like 4 more hours
just @ me then
Could you maybe get me this folder from the normal (not vesktop) discord client?
I think it's in appdata somewhere on Windows
yeah i know
1sec
That's only voice though
Not screenshare right?
it functions the same
Ah alr
do i just 7z this and send it in dms/here?
DM would be fine, and yeah any archive is fine
alright
Thanks!
if i miss a message then you can @ me i don't mind, i almost didn't notice
Remote Debugger if nothing else works xD
horror
sent
do you like, need help reversing the node module maybe?
yeah i just don't know node or anything
how do u debug webrtc in devtools
i'm pretty bored i might as well see what i can find idk
UC File Analysing should've paid off enough to get this done lmao
Yeah saw that
which is pretty nice
Already grabbed it
But I'll need to harden my bottles flatpak for that before I use any of that lmao
bingo
Nice
well i could reverse the module but i don't really know what i'm looking for sooo
pog
Yeah dw I'll have to play around with it anyways
alrighty
hmmm
idk how to read this
so it seems to send stereo
which would mean server side restriction?
Not sure if this helps at all
But judging from that so question
the sdp thingy should include some info on stereo/mono as well
does anyone here know what might be causing stuttering when sending voice packets
like stuttering on the client side not from the sender
hm yeah that looks good
so seems to be server side restriction maybe?
Probably
holy shit this is good music
i clicked some random video
🎼 | Listen on Spotify, Apple music and more
→ https://fanlink.to/ChillSynthwave
🎶 Subscribe to this channel for more synthwave music
→ https://bit.ly/synthwave-channel
🌎 | Lofi Girl on all social media
→ https://fanlink.to/lofigirl-social
👕 | Lofi Girl merch
→ https://bit.ly/Iofigirl-shop
🎭 | Create your lofi avatar now
→ https://lofigir...
can u confirm @glass oracle
define stuttering
wait
noah can u stream smth to me
sure
less stuttering, more cutting out for about half a second every half a second
maybe i can check ur stream in the debugger
and see if its sending me stereo (doubt)
i’m probably getting a lot of the parameters wrong for sending voice packets because there’s such little docs on them
Got it
can u start and stop ur stream
does anyone know how to change the text color of my username
@trim cedar
ye
xD
a=rtpmap:111 opus/48000/2
a
this is audio
well idk if thats urs but whose else would it be
hey sillyvee can u help me rq
yeah can only be mine
That looks like stereo
What the fuck
Are discords servers merging this?
the thing is it doesnt look any different from mine
window selection for me only shows the windows on the current desktop
do u need official client screenshare to compare against?
so good
would that be of any use
That's actually a pretty good idea
well uhh
i can do that
I have no idea how to get that up
go into src/main/mainWindow.ts and slap this under initArRPC:
const w = new BrowserWindow();
w.loadURL("chrome://webrtc-internals");
@ me if you're ready i'll screenshare whatever i'm watching on yt or the stereo test or whatever
its quite funky
using the official client with vencord installed
Guess I should be looking out for the audio transceivers?
they dont contain much info
setRemoteDescription is the one that has the stuff
but its like identical for yourself and others ?
idk how to use the dashboard tbh xd
xD
its so weird
there will be two
one is just audio (the first one) the other has both video and audio
u can easily tell which one is which by scrolling down and checking codec
maybe we should check whether discord-screen-audio has stereo
I realldy doubt that
**userscript.js: **Lines 56-57
// By default Chromium sets channel count for audio devices to 1, we want it to be stereo in case we find a way for Discord to accept stereo screenshare too
channelCount: 2,
does this mean it doesn't
Yep
apparently it works on firefox
oh wait nvm
is this issue saying other people's streams are mono
in dsa
i skimmed too fast xd
yeah according to https://github.com/edisionnano/Screenshare-with-audio-on-Discord-with-Linux#the-problems
Although it is pretty interesting to see that it works fine with Firefox
This is really interesting
Wanna do a BigBlueButton Conference to test stereo this week lmao
i think the person who opened the issue means other people's streams are mono
cause why else would fhey refer to a music bot
Maybe they meant soundboard?
yeah
i think everyone misunderstood
malte as well xd
anyway soo it's probably just a server side restriction when using webrtc
i pinged dolfies and friends, maybe one of them can help
probs
i can still do this btw, not going to sleep anytime soon so if this is even remotely helpful then i can do it, not an issue for me at all
Thanks! But I think this is something that'll be harder to get to the bottom of
i see
well if i can help test something then let me know! im not gonna be doing anything important i don't think
@potent fox use https://github.com/asterite/crystal
it’s shocking how bad the udp voice server docs are
what exactly is the timestamp and increment supposed to be? why does the increment start on a different value for each user? what format is the timestamp in??
like official docs?
its formatted in dumb
yes
though userdoccers doesn’t list any more detail about what exactly is supposed to be sent
i get the feeling the stuttering comes from the timestamp and increments being wrong somehow because the stuttering changes when i change the timestamp increase rate (which is a temp thing while i figure out wtf it is)
huh
music bots and screenshares can have stereo audio tho
whaa
yes
oh i was misreading
no clue sadly
the timestamps are from totally different well calibrated clocks
they're really only for ordering packets
this is stated in the spec somewhere
the ts doesn't need to be unix afaik
The timestamp reflects the sampling instant of the first octet in
the RTP data packet. The sampling instant MUST be derived from a
clock that increments monotonically and linearly in time to allow
synchronization and jitter calculations (see Section 6.4.1). The
resolution of the clock MUST be sufficient for the desired
synchronization accuracy and for measuring packet arrival jitter
(one tick per video frame is typically not sufficient).
An implementation is not required to run the Network Time Protocol in
order to use RTP. Other time sources, or none at zall, may be used
(see the description of the NTP timestamp field in Section 6.4.1).
However, running NTP may be useful for synchronizing streams
transmitted from separate hosts.
lmao ntp will wrap to 0 in 12 years
overflow-y: scroll in a HEADER
kill
oh the header is an rfc?? that's why theres no info lol
yes the header is a well defined spec
how does one add an indicator like the invisible chat plugin for a certain messsage by id?
like this
Check source code
message accesssories
this is what i got but is there any way to dynamically do it by message id?```tsx
INV_REGEX: new RegExp(/\bhello\b/),
indicator: ErrorBoundary.wrap(Indicator, { noop: true }),
patches: [
{
find: ".Messages.MESSAGE_EDITED,",
replacement: {
match: /let{className:\i,message:\i[^}]*}=(\i)/,
replace: "try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"
}
},
],
i also want to ask how to do something when you open a dm channel
i recommend using top level variables instead of storing everything on ur plugin instance
s
what kinda indicator? for what?
consider using message accessories instead of a patch if you're fine with having it below the message
where would it be below the message?
i will take a look at that
as for how to render it for specific messages, look at the translate plugin
in short it uses react state and stores their setters in a global map
so you can obtain the setter for a specific message
someone better at rust needs to explain
v low margin

but also debug builds are usually 10x slower somehow for me
i would try not using cranelift if my compile times didnt sky rocket to half an hour
sane
me when im working with bevy
thankfully the incremental build is a couple of seconds instead
cranelift gets me ~2 mins to compile from scratch
and 4~8 secs when incremental
ive been really cutting on dependencies and have been making tons of optimizations
BUT swc is such bloat
yop
huh
had no clue there was even a gx partnership
if this works that's really dope
interesting
all of them are just already "claimed"
they added ratelimits now too (thanks @ntts)
nvm it works but i think its only if uve never had nitro before
yes
you have to not have Nitro for more than 12 months
i think i didnt have it in over a year
but it just says its claimed
while the same link works for a friend
another friend of mine who hasnt had nitro in the last 12 months says it says its claimed too
how do i get the channel id when the messages has loaded? ```tsx
flux: {
LOAD_MESSAGES_SUCCESS: () => {
},
},
it gives you the event as argument
LOAD_MESSAGES_SUCCESS(event) {
console.log(event)
}
it says claimed on an account that's never had nitro

(done with DiscordTokenGen v5398539 totally not script kiddie edition)
it seems random, me and my friend didnt have nitro in well over 1 year and it did not work, while the same link works on another friend's account
and they have nitro now
ruby user readable error challenge
(The error should have ended after method_missing': undefined method action_mailer)
lol
Thanks
Will show this to the next person that complains about C++ compiler errors being "unreadable" lmao
yeah, i that should have been fixed in the latest push. it turns out they implemented a hidden requirement where the partnerUserId had to change each request
the links are working for me (on my alt since) and not my friend so i think there's some inconsistency's, im trying to find out a way to bypass them
it might be that its only working if you've never had nitro before
thats possible, cool script btw!
thank you
tbh im just doing it for fun, its probably gonna get patched in like 2-3 days
probably
friend of mine made it send a random uuid instead of sha256 and it works now
didnt try the sha256 method but he says its probably the same result
but opera supposedly sends a uuid instead
it appears to me that this only runs whenever the channel is first opened but i need it to run everytime i open a channel ```tsx
flux: {
LOAD_MESSAGES_SUCCESS: (event) => {
console.log("Loaded")
}
}
Guys is this a W misskey fork??? Is this a W fedi client/?////;;; Is this blazingly fast>>:::???
https://github.com/authenyoo/authenkey
btw do plugins start after login or smth ?
yes, by default
you can customise when it's started
lmao i gaslit a lot of people because of this :')
how do i make it start on load instead of login
startAt property on ur plugin
and what values can it take ?
try it and see
i have a way but its not good (use SetInterval and recursion 😈

you're too used to python where you have no way of knowing
vencord is strongly typed...
🤺
literally me
im not making "vencord plugins" either im making an abomination lol
i guess DOMContentLoaded is what i want tho
thank god for that one plugin that used it
yall havent seen the shit i made for an enmity plugin
its just a plugin to show a toast when you enter certain channels
and
it’s delicious
??????
for the love of god get the python virus out of your brain
open vscode and in your plugin add startAt: and see what autocomplete or type information tells you
you're heavily overcomplicating this for yourself for no reason
i dont have any of that, my """plugin""" is literally a js file i inject via some obscure cdp method that calls on global Vencord
i look like fucking whats his name uhhhhhhhhh yanderedev with the elif
its definitely able to be improved
that's horrible why would u ever write that code
there's an event for channel switches and searching a webpack module takes a lot of time (multiple ms) so doing it in an interval will add insane lag
why would u do that.. set up bundling and use the <@&1015072428843601962>encord/types package and you get full type info
it will tell you that startAt takes a StartAt enum value and the enum contains everything you need..
it adds up
also i know i can do better i just dont feel like looking through the discord mobile jsbundle
im too lazy
the desktop code is nearly identical for non ui things like this
okayy

its name is a bit misleading, it's on login
so is there an actual webpackready regardless of login ?
no
you write code with many files, optionally using typescript or jsx and libraries, and the bundler takes care of bundling it into one or more js files that can be consumed by the browser
isn't that for building a plugin along with vencord though ?
so you can stop writing a 3000 lines js file unable to import libraries
you can bundle your code independently
can i somehow export only my plugin as an iife or smth
yes ofc
you can use this https://github.com/Vencord/plugin-template
it will need a few modifications though
lmao i realized this little oversight made me improve this shit A LOT
the tza of 2 days ago would not have put in the work if he knew it was such an easy fix
people were complaining my thing was stuck on initializing (since the plugin never ran to send the loaded event)
and i naturally assume something webpack beyond my understanding broke again and i sat down and rewrote a lot of it to not use the weird proxy stuff that broke webpack
Is it possible to add soundboard too vencord?
why are u checking if signal is true then setting it to true? i dont know js but cant u just remove that middle if
no
its to prevent the toast from constantly sending
but like youre doing if (!signal) else if (signal)
kind of
idk im sleepy maybe im wrong
wouldnt this be the same```js
if (currentChannelId === desiredChannel) {
if (!signal) {
Toasts.open( ..... );
}
signal = true;
} else {
signal = false;
}
ig its not that different in the end but the fact u checked currentChannelId === desiredChannel in both if statements confused me a bit
the middle signal = true is useless at least because its already true if the condition for the if statement is true
idk minor nitpick i was just curious i hope this doesnt seem like im just shitting on your code or something
sry if it does
Hi, How can I import effect snow to discord?
there are a few ways to achieve that, easiest would probably be adding a snow gif in css to the background or with a pseudoelement on the foreground
if you want more dynamic/randomized snow you could maybe do it with a js snippet
I know there are many js snow snippets online, but not sure what it would require to make them work in discord, I know next to nothing of js
like that ?
I have no idea
go to dev portal and copy paste discord's code
you have the link to the page I can't find it ?
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
for import my code
i needed to make a request to an endpoint but i figured it out
i just cant figure out the damn accessory things
ive been looking at the translate plugin and i feel like i kinda understand but not really
so apparently, windows 10 and 11's virtual desktop feature has an api
gnome desktop on windows ain't dead yet!
https://github.com/Vendicated/Vencord/actions/runs/7288013267/job/19860119478?pr=2065 why is this happening?
lint your code with pnpm lint:fix
what code editor are you using? vscode should do it automatically
vscode
wait
it minified the copyright ;-;
yeah it's supposed to do that
oh oki so i can just commit?
yes
done ty :D
tried pnpm test again and i get this:
return new Error(`Invalid plugin ${fileName}, because ${reason}`);
^
Error: Invalid plugin src\plugins\showAllChannels\index.tsx, because authors array contains non-property access expressions
at fail (c:\Users\username\Desktop\dev\Vencord\scripts\generatePluginList.ts:97:16)
at <anonymous> (c:\Users\username\Desktop\dev\Vencord\scripts\generatePluginList.ts:136:67)
at Array.map (<anonymous>)
at parseFile (c:\Users\username\Desktop\dev\Vencord\scripts\generatePluginList.ts:135:51)
at <anonymous> (c:\Users\username\Desktop\dev\Vencord\scripts\generatePluginList.ts:216:40)
at async Promise.all (index 99)
at <anonymous> (c:\Users\username\Desktop\dev\Vencord\scripts\generatePluginList.ts:212:5)
Node.js v20.10.0
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Test failed. See above for more details.```
make your plugin consistent with other plugins
pls SOMEBODY break this down for me im desperate
Im getting this error when making a request, my friend says the CORS policy is set to global so anyone should be able to make a request```
Access to fetch at 'Insert endpoint here' from origin 'https://discord.com' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
nvm he fixed it
aight so i got an accessory working somewhat its supposed to only do it to a single message but it does it to every message even when i switch channels it just goes on every message
export function SeenAccessory() {
return (
<span className={cl("accessory")}>
<SeenIcon width={16} height={16} />
{" "}
(Seen)
</span>
);
}
addAccessory(message_id, SeenAccessory)```
yeah because that's what it's supposed to do
the id field isnt for the message id
take the props passed from addAccesory and add logic inside your component to only show it on the message ids it applies to
you're using it wrong
like i said look at other plugins using it
yah im trying 🙏 sorry for my stupidity
You know you will need a backend right
i got everything except for the accessory thingy
do you want other people to be able to see this? or just for yourself
just me
so someone looks at your message and you see the read indicator?
yep
i already got everything
yeah you'll need a backend for that
yea i have backend already
ok good for you
i just cant figure out this damn accessory thing
show some code
this is what i think im supposed to do```tsx
export function SeenAccessory({ message }: { message: Message; }) {
// backend here?
// only return if message_id matches?
return (
<span className={cl("accessory")}>
<SeenIcon width={16} height={16} />
{" "}
(Seen)
</span>
);
where are you using the element
addAccessory("message-id", props => <SeenAccessory message={props.message} />)
i get error here ^
what error
is this the full code of the function
just the function
oh wait
sorry i cant read
i mean no the backend is there and the function is closed properly
error is pretty obvious
pls im illiterate help me 🙏
"its return type void is not a valid jsx element"
don't return void
you need to return a react element, or null
istg i am
this may not be the best way to do it but it works
hoylk shit im an idiot
oh mah god
well that explains a lot
yeah i think i got it
my bad
im acc blind
and stupid
alr i got it working thank you guys for being patient and dealing with my stupid ass 🙏
can someone help
what do you need
my friends codes not working
he said he restarted discord and the custom plugin went away
bro
if you keep begging us to help you with this pointless plugin then you'll get banned too
k
LOL
me making a very in depth python tutorial
im learning how to animate
but i made this animation in python as animation software costs money
blender...
blender is 3d
I tried with blender it was just too much for attempting 2d animatio
i just made these assets in figma
and tweended em
i think krita has a 2d animation function
krita is a drawing software, i want something more like, after effects
im trying natron but i got AMD APU so its giving me issues with OPENgl
i mean it has animation functions and you can use it but other than that most of animation softwares cost money so..
oh my bad
alright then
you do you and gl hf
the devs of natron told me to use fusion but i dont have to storage space for it lmao
i tried default codegen backend (it was sloooow) but the output binary small by a large margin (like ~30mb -> 8mb)
i ended up making a different profile for cranelift so i can do optimized binaries in ci and fast compiles localy
@glass oracle you
me
pulled out
cuz we were talking in the middle of another convo
ah
./run ```rs
use std::rc;
println!("{}", std::mem::size_of::<rc::Rc<str>>());
println!("{}", std::mem::size_of::<Box<str>>());
Here is your rs(1.68.2) output @austere mauve
16
16
DISCORD
😔
arc rc and box all give 16 for str
im gonna get real fatphobic
lmao
&str is also sixteen bytes cuz its not just a pointer, it also has the length stored
*const str is also 16
thicc
simply use 32bit so its 8 bytes
lol
crack it
hello, it's my first time creating a plugin, how do I create my own installer for my version of the code so I can test it?
there isn't really much documentation available 🙂
have a read through https://github.com/Vendicated/Vencord/blob/main/docs/1_INSTALLING.md
how do you plan to block arbitrary urls
just patch whatever function is called when clicking a url and replace the action if it's a rickroll
or just dont be a party popper
i'm running an interval that looks for new messages, checks rickroll gifs/videos/links and if there's a rickroll appends a small icon next to the link.
i'm not actually blocking rickrolls, just detecting them and warning you lol
probably overthinking for such a plugin
but blocking would require maintaining a list of rickroll urls
someone can just re upload and circumvent that
I already have a list of them for a project I made some time ago.
and yeah, there is no way of detecting all rickrolls, but I can detect some.
you're acting like clicking a rickroll is the end of your life
I have followed the instructions in https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md, but my plugin is not showing. any idea what might be happening?
i'm doing this just for fun 🙂
Is there a way I can change my display name thru a JS snippet
did you run pnpm build and put that plugin in the userplugins folder?
check the console with CTRL + SHIFT + I see if you find any errors
yes, by making api calls to discord's api
but I would advise you not to
why not
no errors
u can spam the api from the ui itself it'd prob be fine, as long as u use the method that the frontend uses and not a manual http request
not fine to spam fine to use, theres probably a long ratelimit for that one anyways
he was never seen again
is there a way to change a setting value through like a command or smth? or is there some standardized place to store data?
yes there is, you could also do it in the vencord settings json
you got time to show me an example? i am both blind and very illiterate
right i was gonna do that but forgot
vf theme
right
#🤖-bot-commands message
this disables quickcss and themes
oh i ment like plugin settings like ```tsx
const settings = definePluginSettings({
placeholder: {
type: OptionType.STRING,
default: 'none',
description: ""
},
});
oh idk then
ah alr thanks for trying anyways
i don't understand what u mean
settings.store.placeholder = "banana"
that's all u need to do
huh i swear thats what i did mustve fucked smth up then
how do i make a js snippet
like the code block?

