#🧩-plugin-development
1 messages · Page 51 of 1
True xdd
Since they have no need for writing foreign symbols
horror
why
i use right alt for € @
and its useful for norwegian letters
æø
also u can type micro with altgr
µ
and þ
↓↓↓→→→→←←←
how arrow up
it doesnt have arrow up
zui = ←↓→
Micro is def. needed 😵💫
qwertzuiopü @ſ€¶ŧ←↓→øþ¨
asdfghjklöä æſðđŋħ.ĸł˝^
yxcvbnm »«¢„“”µ
funny
horror
my main hatred about german layout is that it sucks for coding
cause {}[]~| are altgr combo
and ()?! requires shift
idk which of those also require shift on US layout
all of the keys you mentioned that require Shift on the German layout also need it on US and UK
Never
(i usually use UK
)
it needs shift
I use a mostly us-ascii layout, with åäö on altgr+aeo because I use those less than brackets
it's weird, i find it hard to say whether something needs shift but my hands definitely know xd
i just see what my hands do
I moved escape to the <>| key (between shift and z) because vim uses that key a lot
Caps lock is my compose key
As for the physical esc key, that one is ime toggle
okay who tf types & with ctrl + altgr + k we need to have a talk
im not devloper :3
on german its ctrl + altgr + u
Make a autohotkey macro for it
Profit
yeah but the other one is on my keyboard
Is this how it's supposed to look
ßalls gaming
yes
that doesnt even require shift on german
Doesn't look very sus to me
its a little crewmate
how do u type öäüß
on other layout
also did u buy a qwerty keyboard or do u use a qwertz keyboard with different layout
this is kinda cursed
That looks swedish
Swedish :D
It is
bastard child of qwerty and qwertz
Or well iso nordic
doubt
The layout is called that smh
They put æ and ø on the same keys I think
yea
Or maybe they're swapped around
ae
They’re not though 😭
norwegian keyb is same just with æøand the blahaj a
å
idk how to type blahaj a on german layout
They're different unicode symbols
Yeah that circle is beyond me
Copypaste a å I guess
But blahaj is fine, really
you need to use compose key
blohaj would be a more accurate latinisation
but it looks cursed
Def closer
blaohaj
Fancy
Evil webm sender 
but then it also switches mz y and z
SEEEEEEEEEEEEEEEEETHE COOOOPEEEEE
bro how did zou get used to qwerty
i tried multiple times it drives me crayz
im so used to z being up
ZESSS

OTHER KEZS ARE NO PROBLEM
but the fucking zy
its unreal how hard it is to break zour muscle memorz
okay im back on german
i think cause most special keys you consciously type
while typing normal text is a flow
where you dont think about it
its mostly muscle memory
i am working on a plugin that converts all videos to webm before sending
gonna make it a required vencord plugin
webm doesn't embed on ios
it's funny
you can bully ios users by only sending webm
not possible
xd
unless you compile a decoder to js
which might be possible actually
anyway im not even sending webm on purpose it's just that gnome records as webm
Back at the computer, here's my layout ```
1234567890-= ¹²³⁴⁵⁶⁷⁸⁹⁰–≡
qwertyuiop[] ∀wäℝ⊤y∪∈öπ⟦⟧
asdfghjkl;'\ å★δƒ↔←↓↑→↕'λ
zxcvbnm,./ ℤ×ℂ∨bℕμ,…÷
!@#$%^&*()_+ ₁₂₃₄₅₆₇₈₉₀—≠
QWERTYUIOP{} ∃WÄℝ⊥Y∩⊆Öτ«»
ASDFGHJKL:"| Å☆ΔƑ⇔⇐⇓⇑⇒⇕"Λ
ZXCVBNM<>? ℤ·ℂ∧B∅μ≤≥?
because guess what webm is a really good format with good compatibility on anything that isn't crapple
it's so weird that it does power digits for everything
on my keyboard it does a few of powers then it does fractions and other random shit
oh
is that not the default
im not saying it's bad
but also you can just type ^ and then type a normal digit
and it should turn it into a proper power
I don't have any dead keys because they suck
⛩️
the only good keyboard layout https://math.berkeley.edu/~serganov/ilyaz.org/keyboard/
it actually fucks up (most) uwp apps if you install it
I used it for a while lol
entirely based on dead keys and keybinds that shouldn't be possible (it even rebinds the nav cluster and function keys to be used in character combos)
I'm gonna stick with my compose script for anything not in the layout
rust is c++ for javascript users
C++ is rust for masochists
wut
mobile
Mobile just does that
ok this is weird, i'm trying to get the globalName property of a user (i know it exists because i logged the user to console and it had the property, AND when i actually read it the code works fine, but vscode just insists it doesn't exist and keeps giving me an error??? weird asf
Yeah the ts types aren't accurate
Or send a pr to discord-types
I just ignored it for now. Anyway, i made an upgraded version of showmeyourname, should i pr it?
i hear this is a pro gamer channel
💯
is it possible to use node.js modules like "fs" in a plugin?
and/or any way to communicate with the outside world?
worst comes to worst, I suppose could ping a local web server. but I'd like to avoid that if possible
use a native script. take a look at how xsoverlay does it
i'm sure the current version of ShowMeYourName already uses globalName
it just does (user as any)
Ah
But have you seen the contributions tho? 
Hmmmmmmmm
Maaaaaaybe

OH MY FUCKING GOD SOMEHOW I MANAGED TO MOVE IT BUT NOT FIX IT 💀
It is expanding, quite rapidly at that too
I fixed it 
oh and it just breaks vencord whenever i try to use openContributorModal
lovely
yeah this is really weird, as soon as i try to call openContributorModal in the plugin, my discord just appears as stock discord until i rebuild with the line removed or disable the plugin
So you made a
button

just extend the interface / type
you're likely importing from src/plugins/index.ts
you can't.
use the global Vencord.Plugins
this breaks my whole vencord for some reason
find: "codeBlock:{react(",
replacement: {
match: /codeBlock:\{react\((\i),(\i),(\i)\)\{/,
//replace: "$&return [$self.renderHighlighter($1,$2,$3), console.log(\"custom\")][0];"
replace: "$&return $self.renderHighlighter($1,$2,$3);"
}
is there a way to wrap the render react function?
safer way
let me define "this breaks my whole vencord" #🏥-vencord-support-🏥 message
Check what the shiki plugin does I guess
it replaces the function. I want to wrap it, so I get the render before the actual function
I can't even test the plugin because it breaks, I need to use the ui version of the installer to fix vencord, this doesn't make sense. repair does not work either.
i am putting the code here
import definePlugin from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Parser } from "@webpack/common";
const CodeContainerClasses = findByPropsLazy("markup", "codeContainer");
const old_react = Parser.defaultRules.codeBlock.react(props, null, {});
export default definePlugin({
name: "minbutton",
description: "min button test 11v",
patches: [
{
find: "codeBlock:{react(",
replacement: {
match: /codeBlock:\{react\((\i),(\i),(\i)\)\{/,
replace: "$&return $self.renderHighlighter($1,$2,$3);"
}
},
],
//start: async () => {},
//stop: () => {},n
renderHighlighter: ({ lang, content }: { lang: string; content: string; }) => {
console.log(lang+content);
return `<div className={CodeContainerClasses.markup}>
WWW :)
</div>`;
},
});
I suspect that it's the old_react function that's spooking, because Parser is lazy-loaded and noy available yet
Put that in start() instead
*sob* It's b e a utiful *sob*
hello, guys. is there a way to only make patchs if only if a setting is on? or are patchs safe from other plugins and don't affect them when two plugins make the same patch?
Patches have a predicate
If two plugins make the same patch they will most likely conflict, but if they are in different places in the same file or are compatible they will work
heyo im gonna send my page not found sites code, need help with smth
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>what did you do.</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
<style>
@import url('https://fonts.googleapis.com/css2?family=Rubik+Glitch&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anta&display=swap');
</style>
<script>
var timeleft = 5;
var downloadTimer = setInterval(function() {
if (timeleft >= 0) {
document.getElementsByClassName("countdownTimer")[0].innerHTML = timeleft;
timeleft -= 1;
} else {
setTimeout(() => document.getElementsByClassName("dude")[0].src = "https://files.catbox.moe/g4w56a.png", 50)
setTimeout(() => window.location.replace("https://madelinemaid.neocities.org"), 1000)
}
}, 1000);
// why are you snooping? credits to ashley for the code cause i cant code javascript for shit
</script>
</head>
<!--DUDE STOP SNOOPING-->
<body> <style>
body {background-color: black; color:red;}
</style>
<h1 style="scale:1.5"> <center> <div class="countdownTimer" style='font-family:"Rubix Glitch" !important'></div> </center> </h1>
<img class="dude" src="https://files.catbox.moe/m2k7n4.png" alt="how." width="auto" height="400">
<style>
.dude {
filter: contrast(999999999);
display:block;
margin-left:auto;
margin-right:auto;
}
a:link {
color:red;
text-decoration:underline
}
a:visited {
color:red;
background-color:transparent;
text-decoration:none;
}
a:hover {
color:red;
background-color:transparent;
text-decoration:none;
}
a:active {
color:red;
background-color:
transparent;
text-decoration:none;
}
</style>
<p><center><h1><b><h1 style='font-family:Rubik Glitch'>404: INVALID PAGE</h1></b></h1></center>
</body>
</html>```
i cant seem to get the countdown to have the font itself (the 5 at the top)
any idea what i could do to make it have the font? 5 IS supported
all numbers are supported with the font im using
id suspect its because the countdown is from the script
but even then i really cant code js for shit
Try spelling the font name right
Also that code is terrible and you should be either ashamed or proud, your choice
im proud fuck you 
im actually fucking stupid
i didnt notice it wasnt spelled correctly
yeah that definitely fixed it
i cant believe it was cause of my stupidity
thx
is that a plugin? you don't mind if I used it, this looks cool
what 
nvm, I didn't notice the uri

cough i am gonna steal it anyways and put it on discord cough
its a basic website not found page, i dont even think you physically can 💀
don't disappoint my lil brain like that 😔
💀
Lol
What the fuck is that language anyway
str.tostring(), "{{time}}", no json library?
is there lazy patchs?
but for some reason, my patch is creating a problem, when i reload discord, it doesn't render anything. I must close it and open it
And how would lazy patches, whatever that would mean, solve that?
Fix your broken patch instead
What should the payload sent to Discord Gateway look like to indicate that the user is active via Desktop App? (not Web Browser)
I managed to determine that it should look like this for Mobile, but need also Desktop:
op: 2,
d: {
token: "token",
intents: 513,
properties: {
$os: "iOS",
$browser: 'Discord iOS',
$device: "iPhone"
}
}
A useful option, but don't see the payload details I need there
Imagine trying to code in whitespace in a program that replaces tabs with spaces
wait i think that's what actually happened here lmao
best domain
@clear parcel fix...
I'm just looking for identify/properties corresponding to the desktop app
it's not doc'd yet lol
yo, how would i put together a simple default discord mod
i wanna replace this with a gif of an oc i have
DEFAULT DISCORD SUCKS
TAKE ME BACK
OH GOD PLEASE TAKE ME BACK
okay guys, why does it have a tumor
oh are you the one writing these docs
i must say
1: thank you
2: funni domain
Are golang's maps mutable?
Because if they are, it makes sense that they're invariant
uh, is it safe to open this without mommy finding about it?
hey
you could ctrl+shift+i
don't press it once, spam it lol
YES the same feeling it
so discord really is a web browser
Was there ever any doubt?
than you will get used to it than you could press it once
ok so
how do i click on something and be directed to it in the little
menu
inspect menu
Should be button like this
where do i find that
I dunno where it is in chrome/download, in firefox it's top left corner
oh
well its there too
nice
i dont know how to do it properly and i fucked it up
HAHAHAHAHA
what if i delete everything
There's a plugin for turning that shit off
Discord deliberately removes that from the global object
Use vencord's DataStore instead

Just grep it
?
Check how other plugins are doing it
Oh no
is there a way to view it in client?
View what?
await Vencord.Api.DataStore.entries() perhaps
How do I get the user object of the current user?
E.G. When the user executes command
/startGroupit sends a message containing the executor's username
UserStore.getCurrentUser() would be my guess
Perfect! How do I send them a DM?
Dunno
lmao
You want to send yourself a dm?
vencord does not work like discord js
neither does discord itself
I’m aware, I’ve fixed the problem by calling the /channels/@me/whatever endpoint, which returns the channel id
rust is based
i fucked up my arch install the other day
just unfucked it through the power of archiso chroot black magic n shit
(i accidentally overwrote libs with 32 bit versions so my system died)
on it rn
Look at MessageTags
is it possible to do a variant of sendBotMessage that doesn't look ephemeral?
You have been infected by the propaganda of rust
that is not true
and never will be
Yes, try searching this channel for receiveMessage
Is there a way to get message props if you reply to a message with a command?
gnome on arch
disgusting
can't you just
install it
on other des
i always use spectacle on everything
i should use hyprland and all the silly random stuff
lmao
Why would one use something that is not maim for screenshots
wait can you modify the requests from the plugins?
hey, i want to fix the cutting off shown on my friend page on my site but I don't know whats causing it
@steady knot wake up
What cutting off? The scrolling?
Easiest would be setting width: 100% on the iframes
that helps, but its still a tad bit cut off
i blame vee
they created the widget,,,
joking of course its more than likely something in my site causing it
Is dat da tf2 font????!?!?!???!??!

yes
Oh mah gahhh
https://tenor.com/view/tf2-gif-23415706
my brain really read all the white text but the colorful ones, lol
<!DOCTYPE html>
<html>
<head>
<title>Image Editor</title>
<style>
#imageContainer {
max-width: 500px;
margin: 0 auto;
text-align: center;
}
img {
max-width: 100%;
margin-bottom: 20px;
}
input[type="range"] {
width: 80%;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div id="imageContainer">
<input type="file" accept="image/*" id="uploadInput">
<br>
<label for="sizeSlider">Size:</label>
<input type="range" min="0.1" max="2" step="0.1" value="1" id="sizeSlider" onchange="updateImage()">
<br>
<label for="rotateSlider">Rotation:</label>
<input type="range" min="-180" max="180" value="0" id="rotateSlider" onchange="updateImage()">
<br>
<label for="hueSlider">Hue:</label>
<input type="range" min="0" max="360" value="0" id="hueSlider" onchange="updateImage()">
<br>
<label for="saturationSlider">Saturation:</label>
<input type="range" min="0" max="200" value="100" id="saturationSlider" onchange="updateImage()">
<br>
<button onclick="saveChanges()">Save Changes</button>
<br>
<img id="uploadedImage" src="#" alt="Uploaded Image">
</div>
<script>
var originalImageSrc;
function updateImage() {
var img = document.getElementById('uploadedImage');
var size = document.getElementById('sizeSlider').value;
var rotation = document.getElementById('rotateSlider').value;
var hue = document.getElementById('hueSlider').value;
var saturation = document.getElementById('saturationSlider').value;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
canvas.width = img.width * size;
canvas.height = img.height * size;
ctx.filter = `hue-rotate(${hue}deg) saturate(${saturation}%)`;
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.rotate(rotation * Math.PI / 180);
ctx.translate(-canvas.width / 2, -canvas.height / 2);
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
img.src = canvas.toDataURL();
}
function saveChanges() {
var img = document.getElementById('uploadedImage');
var a = document.createElement('a');
a.href = img.src;
a.download = 'edited-image.png';
a.click();
}
document.getElementById('uploadInput').addEventListener('change', function (e) {
var file = e.target.files[0];
var reader = new FileReader();
reader.onload = function (event) {
var img = document.getElementById('uploadedImage');
img.onload = function () {
URL.revokeObjectURL(img.src); // Release the object URL
}
img.src = event.target.result;
originalImageSrc = event.target.result;
}
reader.readAsDataURL(file);
});
</script>
</body>
</html>
lets never make code with chatgpt

how do i mak e a plugin
you writ e cod e in a plugin fil e and then compil e it
wow
what? they gave you your answer
does enyone know where the plugins directory is located in windows?
Vns
thanks
no vencord for mobile?
Vns
when ever i try to use this im getting an error with a red underline under "timestamp" any and all help appreciated
<Timestamp timestamp={moment(currentUser.plays.at(-1))} />
Timestamps don't use moment anymore, just plain js dates
so how should i use it then?
Give it a js Date object
ok ty
There shouldn't be any cases where changing let{message:a}=e to let _props={message:a}=e should cause crashes, right?
is that even valid
cursed
Guess I'll try { match: /(\i)=>\{/, replace: "$&let _props=$1;" } instead
As in, e=>{ into e=>{let _props=e;
But I genuinely can't figure out why the previous patch doesn't work
why can you not use e? is it being shadowed?
I don't like hardcoding variable names
Yeah but my patch is much later in the function
is flux is wrapper for the discord builtin event handler?
you can use a lookbehind or you can use arguments
Can't use arguments in an arrow function
well find the nearest use of e and capture it with a lookahead/behind
oooh than me dummy, does this description exist in the repo any where?
cuz if is, I should review myself
The nearest (and only) use is 332 bytes before, which imo is a bit too big for a patch
So I'm gonna stick with declaring an alias
it absolutely isn't
use a lookbehind
you can just stick it at the end of your patch and use .+?
**index.tsx: **Lines 171-172
match: /innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,
replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"
look at that lookbehind at the end
That's a pretty cool way of doing it, ngl
it first matches the normal match, then walks back until it finds {channel:\i,message:\i}=(\i) , then captures the the last one. finally it walks forward up to 400 characters again no matter what they are (just to still match)
it's a really cool way to do it yeah
Currently I have ```js
{
find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL",
replacement: [
{
match: /(\i)=>{/,
replace: "$&let _props1=$1,_props2;"
},
{
match: /(0,\i.useForumPostAuthor)/,
replace: "_props2=$&"
},
{
match: /children:(\i)/,
replace: "children:$self.wrap({..._props1,..._props2},$1)"
},
]
},
Which is admittedly a bit hacky but it works fine
that's incredibly dangerous
if your first replacement fails, but the others still succeed, they will refer to undefined variables and crash discord
That's true, but don't patch groups make sure all of them need to happen?
yes
(But yes, discord did crash several times)
but you don't seem to use them
Isn't the replacement: [] a patch group?
Oh
for it to group them
Good to know
So I guess without that it's just shorthand for several independent patches
usually it's desired to have as many patches as possible still working even if one breaks
since most of the time they don't rely on each other so only minor functionality will break
so it's opt in
also the lazy ? operator is very important
if you use the lazy operator it will find the nearest match
otherwise it will find the match furthest away which is obviously undesired
How about ```js
{
find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL",
replacement: {
match: /children:(\i)(?<=}=(\i),{(user:\i,author:\i)}.{0,350}?)/,
replace: "children:$self.wrap({...$2,$3},$1)"
}
}
I recommend making the actual match more specific
children:\i is too generic
then instead of {0,350}? you just do .+?
That's true, the actual thing being matched is (n.Fragment,{children:S}) so matching that should be pretty easy
(Don't ask why they have a Fragment with only one child)
function (e, t, s) {
"use strict";
s.r(t),
s.d(t, {
default: function () {
return c;
},
});
var n = s("37983");
s("884691");
var a = s("414456"),
l = s.n(a),
i = s("77078"),
r = s("232259"),
u = s("680986"),
o = s("782340"),
d = s("159177"),
c = (e) => {
var t, s;
let { message: a, channel: c, renderColon: h, hasUnreads: f } = e,
{ user: m, author: g } = (0, u.useForumPostAuthor)(c),
S =
null !==
(s =
null !== (t = null == g ? void 0 : g.nick) && void 0 !== t
? t
: null == m
? void 0
: m.username) && void 0 !== s
? s
: "",
p = (0, r.useUsernameHook)(
null == a ? void 0 : a.author,
c.id,
c.guild_id,
!0,
o.default.Messages.FORUM_POST_AUTHOR_A11Y_LABEL.format({ name: S }),
)(null != g ? g : void 0)(
(0, n.jsx)(n.Fragment, { children: S }),
c.id,
);
return (0, n.jsxs)(i.Text, {
tag: "span",
className: l(d.author, { [d.hasUnreads]: f }),
variant: "text-sm/semibold",
children: [p, !0 === h ? ": " : null],
});
};
}
you can likely match a class name or a Messages.SOMETHING then do.+? to reach your children
That's the whole module, it's pretty small
ok yeah use that Messages
Messages.SOMETHING.+?children:(\i)
then normally how you are already doing
Something like js { find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL", replacement: { match: /(?<=\}=(\i),\{(user:\i,author:\i)\}=\(0,\i\.useForumPostAuthor\).{0,400}?\(\i\.Fragment,{children:)\i(?=}\),)/, replace: "$self.wrap({...$1,$2},$&)" } } then
nono
{
find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL",
replacement: {
match: /(Messages\.FORUM_POST_AUTHOR_A11Y_LABEL.+?children:)(\i)(?<=}=(\i),{(user:\i,author:\i)}.+?)/,
replace: "$1$self.wrap({...$3,$4},$2)"
}
}
wait 1 sec
okay like that
Why would that be better?
it's trying to match less stuff
if you use only children as the first match it will try the look behind on every children it finds
this one it only tries the look behind on the children after Messages.the thing
I changed it to look for \(\i\.Fragment,{children: though
yes but that is generic too
it's a bit of bias from me but thats generally how I write my matches
The module is tiny, I don't see the point tbh
and they tend to be very stable
would trying to remove spam warning be unwise
Does anybody know how receiveMessage works?
ILoveSpam
Oh I need that, if you do know how I can get my hands on it lmk
i really love spam
what are you trying to say?
From what I can tell, it turns a json message into a proper message object, possibly with some caching
do you know the fields that should be in the json?
Pretty sure that's in the rest api docs
Discord ratelimits messages, closing the dialog would not let you send messages faster anyway afaik
THERE'S DOCUMENTATION?!?!?!??!?!?!?!?!!?
makes sense
why do you need to send messages that fast
to spam
I remember doing it to "test" a Discord bot (which wasn't mine, on a public server with thousands of members) :3
I would not recommend it as you risk the staff getting mad
what is even being made in here today
Hey, is there a way to listen to messages received on discord ?
I've kinda figured it out, but it's sending them as if they're ephemeral, I want them to look non ephemeral
add a listener to the Dispatcher for MESSAGE_CREATE
Hmmmm ok I'll look into that thanks !
there's probably a plugin in vc that does it so i would search the github
not the same event but similar usage https://github.com/Vendicated/Vencord/blob/main/src/plugins/quickReply/index.ts#L62
Yup, I'll use that thanks mate ;)
?
forgot it did that lmao
How would I do a patch for when the user receives a DM?
What exactly are you trying to patch?
It might be easier to use flux events depending on your use case
The message receive event, hopefully one that contains content
Yeah but to do what with
parse and do other things (like send a reply for example)
I've not used patches before.
.
If you want to actually modify the react component, you'll need to patch it, but if you just want to listen to a message and do whatever with the props, you can use the MESSAGE_CREATE flux event
Look at vcnarrator for a good flux example
ty
That's working, but my script to send messages seems to be bugged ```js
await MessageActions.receiveMessage(groupChannel, await createMessage(message.content, sender.id, groupChannel, 0));
async function createMessage(message: string, senderId: string, channelId: string, type: number) {
const sender = await UserUtils.getUser(senderId).catch(() => null);
if (!sender) return;
return {
content: message,
author: sender,
channel_id: channelId,
timestamp: new Date().toISOString(),
type,
};
}
createmessage definitely returns the correct object
but receiveMessage is not sending any content
It just looks like this
Uhhhhhhhhhh i'm not sure what you're trying to do there
If you want to listen for a message, do
flux:
{
MESSAGE_CREATE(props)
{
//whatever
}
}
in your plugin definition
It listens for a message, then sends the content to a specific channel with receiveMessage (clientside only)
the listening is fine
and receiveMessage was working earlier, but it's not sending the content anymore
for anybody wondering, it turns out the object didn't have enough data, here's the fix: js async function createMessage(message: string, senderId: string, channelId: string, type: number) { const messageStart = MessageCreator.createBotMessage({ channelId, content: "", embeds: [] }); const sender = await UserUtils.getUser(senderId).catch(() => null); if (!sender) return; return { ...messageStart, content: message, author: sender, type, flags: 0 }; }
How do I read the contents of message.attachments[0]?
what I know they are basically urls
there could be a flux event which dispatch the fetched content
but only if the user was loading the content other than that you must load it yourself
did you try logging it
I just made an axios request
If you're asking for help with CSS head to #🎨-theme-development, and stop cross posting into #🧊-off-topic-iceman-only
Sorry, I don't know much about the server, please forgive me
use sendMessage from @utils/discord
oh you want to send a bot message nvm
anyway you're asking too many questions and it sounds like xy problem
what's your mission
Can someone help me, I can't get autocomplete to work on vscode
for?
vencord
make sure u installed deps
so
turns out
it was codium's fault
the flatpak version's autocomplete worked fine
but not in the official binary
wtf flatpak solving things?
And I didn't want to use flatpak because it was doing a weird thing with bash and sh
and bashrc wasn't being loaded
wtf flatpak breaking things!?!??!
interesting
It's 3 arguments
function S(e, t, n, a) {
!_(e, "assign") && (d.log("transitionTo - Transitioning to ".concat(e)),
null != n && (null == t ? t = {
source: n
} : t.source = n),
null == t ? i.push(e) : i.push({
pathname: e,
...t
}),
r = n,
s = a)
}
Set a breakpoint on it in your dev tools. It'll tell you what it passes when you trigger it
good advice here
Making an end-to-end encryption plugin
I needed a way to show messages in the chat on clientside, and I wanted them to look as normal as possible
(I've since found my solution)
i might attempt to make a plugin for this... if one doesnt already exists
https://github.com/ZenitH-AT/discord-fav-gif-dl
seems like #1032200195582197831 its not in there
Drag the left edge
OH MY GOD
THIS WAS ALREADY IN DISCORD
I DONT HAVE TO BE BLIND ANYMORE
ITS STILL TOO SMALL NVM
I CANT SEE DETAILS
FUCK
my tv is ol'd the pixels are big
you cant drag the top though
If you want it even bigger that's gonna take some work; that menu's layouting is rather complex
Lmaoo
Maybe you can try redefining EmojiSize.MEDIUM or something similar? Pretty sure I saw a set of named constants for that
mow
No it isn't I hacked together resizing it based on aspect ratio with CSS
is there a way to modify the "Discord is Starting" Window, because Vencord only starts after the main window opens.
Not sure but you could try modifying Vesktop
?
Can you create listeners for a message button component?
How can I execute a function when the user clicks a button component sent in a message
is there a way to look at msg contents of all loaded msgs on screen?
That "on screen" part suddenly makes it quite a bit harder
lol
i just want to check if msgs that are on screen have something in them and then edit them locally
Vencord.Webpack.findByProps("_channelMessages").get(Vencord.Webpack.Common.SelectedChannelStore.getChannelId()).toArray()
Gets those in the current channel rather than the ones physically on the screen, because that's way easier
is there a way to limit it to only the last 50 msgs for example?
Add a .slice(-50) I guess
it works tnx
Ask for permission in #📩-modmail
is there a react import for vencord?
i wanna use this from repluged but it needs a react import
function ToneIndicator(props: ToneIndicatorProps): React.ReactElement {
return (
<Tooltip text={props.desc}>
<span
{...props}
style={{
backgroundColor: "var(--background-modifier-accent)",
borderRadius: 3,
padding: "0 2px",
}}>
/{props.indicator}
</span>
</Tooltip>
);
}
React.ReactElement
Return type annotations aren't usually necessary, but you can do import type { ReactElement } from "react"; I guess
okie
Which is likely what the error tells you
no more error just added {({ onMouseEnter, onMouseLeave }) => (
is there a way to make a tooltip for a msg that only shows on a spusific part?
i cant convert this 1 to work proparly
What do you mean, a specific part?
It'll show the tooltip on the part you wrap in <Tooltip>
a spesific part
Thanks, that clarifies a lot
just like "text text text textwithtolltip text text"
just add it localy to a msg that has a spesific string in it
is it doable with msg.content?
I have no idea what you're trying to say
im using this to get the msg array then i filter to a spesific 1 in the array then i set the content localy for somthing else
If you're making a plugin, you should probably be patching the renderer rather than editing stuff in stores
Could someone help me, I'm trying to replace the text content of a message with my own component (so I can add additional things).
Take a look at how the silentToggle plugin does it
It doesn't modify the content itself other then adding @silent
when the msg gets sent
i cant stress over this enough
if you use github (doubt you dont) or code websites, i cant recommend this enough
@jagged matrix
hi
i hate you
it makes it so you can open vesktop in public
shiggy is acceptable for the public eyes
nu huh
shiggy is very acceptable for the public
Shiggy must be used in public
what happens if i open a pull
probably won’t be added
Will definitely get closed
would be added
cleaning up my disk
wonder why there's a 2 GB file in my projects directory
it's my asm solution for aoc day 2 where I embedded a huge input directly into the file

hi, uh random question. how do i show the small profile modal/popup ?

Can you elaborate
just for plugin, basically i wanted to display the profile popup like when you click on a user's profile pic/username
Yapping
wtf
W error
<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: discord/attachments/1120215838952280085/1211917909228523570/file.text</Details></Error... (NaN KB left)
Is it possible to execute a function when a user clicks a button sent by themselves (using the MessageActions.receiveMessage function)
like interaction listeners in DJS
look at what happens in the network tab when you click the button
go to initiator and visit each to find what you're looking for
Helo
is there any1 here who is expert in doing this discord things and all
if yes plss dm
me
gigachad
could u send me the solution? id be interested in that, asm is cool
hey you know when you join a discord server and it tells you to visit a channel?
does anyone know the store where those are saved and whether i could reset the state so it wants me to visit them again?
try these stores
findStore("GuildOnboardingStore").resetOnboardingStatus(guildId) maybe
compiled with nasm -f elf64 -F dwarf -g day_02.x86asm && gcc -Wall -no-pie day_02.o
is the "Discord is Loading" window also made electron?
Sadly no, we don’t know any programming languages here, you can try going to an egirl cozy chatting server to see if anybody there knows programming
And also, what’s discord?
Try checking out the loading tips plugin
Yeah
loading tips is for the one in the main window
also I dont want to change the tips, but the css
I think you'd have to edit vesktop or - dog forbid - the native client for that
I'm just gonna make my own discord launcher in Tauri
Good luck with that
just to select canary stable or PTB
It’s kinda interesting how the invisible chat plugin works
It just uses invisible Unicode to send the data
That's the obvious way to do it
You could do it with an invisible masked link too, which would be more compact, but some guilds forbid those I think
already been done and it sux
Yeah, thankfully I was able to come up with a better method for my E2EE plugin, and it works!

but imma just make it, so you can select between canary, stable, etc. with a nice UI
why tho
Fr
you can already do that in your web browser
or by downloading the canary app or by using vesktop or armcord or whatever else floats your boat
I know
You just want to overcomplicate it?
You don’t have to pin them all, just use the windows search system
What are those three anyway? I'd guess one of them is what's conventionally called nightly, but dunno

that's slow
How often do you switch between them that you need to optimize out those seconds
don't need to optimize them, but I want to have a good UX
Totally a worthwhile investment of time

i am making discord desktop app on tauri too but it is missing some features of electron but if you want to run discord desktop app on some very shitty school laptop like i does then it is worth it
my school laptop has a fucking 1.1ghz cpu and 4 gigs of ram
they're different release channels
discord updates the app in the order canary > ptb > stable
and development > canary > ptb > stable for desktop client
the electron version is bumped on it
I suppose development version only differs in updates not related to the renderer part of discord
because it just uses canary in that
it uses the canary webapp yes
the only difference is native modules
yep
Vns
i feel like this is appropriate for this channel though
It's not. You're asking about how to use Vencord. It belongs in support, or ideally, read the docs
I wanted to make a little tauri app, where I can see my discord inbox without opening the app. Then I can choose between the app I want to open.
like all the pings
are there plans for the FakeNitro Plugin to support Nitro Emojis in user bio?
If it's not already in there, 99% it's impossible
We can't mod the discord servers/api, some things you just can't do

should be possible, cause fakeProfile themes modifies the bio too
but the emojis must be in a different pattern than the normal ones
Well yes, it's possible to make a fake bio emoji that's only visible to users with a plugin
But there's not much point in that
because it get terminated if you don't have nitro
the bio has such a short char limit that its probably not worth it
you could probably automatically replace links the same way as in messages
I know. was just askin if it is currently in development
Is there a SelectComponent that allows you to type in it to filter the available options?
The experiments menu in the settings cog's right click comes to mind, but I guess that's not really a Select
yeah i was thinking about building something similar myself if i can't find an existing component that does that
Here it is
Conveniently available as Common.Forms.SearchableSelect
don't use that
oh :( why not?
referring to this
Oh, it's at Common.SearchableSelect too
Common.Forms is the entire components module for simplicity but you're not supposed to use it for anything other than forms
aka what's typed
everything else is also exported outside of forms
so this would be fine to use then?
yes
thanks guys, i appreciate it!
Why is it structured that way? Why not just call that module Components or something?
wdym
Why is that module only to be used for forms, even though it's the entire components library?
if i wanna pr somthing how do i do it without removing my old pr cuz its not letting me get another fork of vencord on my github account?
Make a separate branch on your fork
wdym?
On your fork repo, press the branch, then view all branches
Then you can make a new branch
ya got it after talking to my rubber duck but ty
Rubber ducking is so goated
Is it the uhhhhhhh
Who are ethan and fres
ya
@dull magnet Common does not reexport everything in Forms; things like Spinner, FocusLock, and useModalContext are not.
From what I can tell, out of the 236 things currently in Forms, 19 are exported
You're probably gonna hate me for doing ```ts
const { FocusLock } = proxyLazy(() => Forms as any as {
FocusLock: ComponentType<PropsWithChildren<{
containerRef: RefObject<HTMLElement>
}>>,
});
I'd of course put it in the proper place if I PR it, but as long as it's third party I think this is fine
how do i get this to be the type of the subclass
so in ```ts
class MyClass extends FluxStore {
}
new MyClass(Dispatcher, {
THING() {
this // should be typed as MyClass
}
})
is this the only way?
class MyClass extends FluxStore {
}
new MyClass(Dispatcher, {
THING(this: MyClass) {
this // should be typed as MyClass
}
})
mmmm looks like its just not possible with constructors
its possible with normal methods but not constructor
Pretty sure in c++ the common solution is the equivalent of class MyClass extends FluxStore<MyClass>
Dunno about TS
that indeed works but its kinda ugly
welp ig theres no better way
How do you deal with errors in discord-types? Just as any?
hi, I'm trying to make a discord soundcloud rich presence but I don't know if directly send requests or use an external website (that i will make, external to soundcloud) to send the requests and all that, I don't even know what I was thinking for, First time using tsx
because in the soundcloud api guide says you can to put a button to connect and disconnect
I would extend the type
Yeah I've tried ts declare module "discord-types/general" { interface Message { timestamp: Date; editedTimestamp: Date; } } but it says Subsequent property declarations must have the same type. Property 'timestamp' must be of type 'Moment', but here has type 'Date'.
I meant just making a new interface that intersects the old one
idk which one to do 😭
no
is it possible to change the state of a ChatBarButton outside of it's codeblock?
like
In general react components can't be controlled from outside, other than by passing props to it

Yeah connecting to some suitable store works too
or discord FluxStore
connected question, is it possible to write to the user's settings for the plugin? I've not seen anything like that in any other plugins
wdym
You can just do settings.store.key = true
users settings?
for the plugin, like "how many moai to append to every message"
(I'd assume settings is way more private than the datastore, because RSA keys should be private)
ty
not really. it's the other way round actually
but also depends on what you define as private
like other plugins can do datastore.privatekey
why do you care
there is no risk of malicious plugins
well unless you add them explicitly
I guess
this is impossible to prevent
Other plugins can do Plugins["YourPlugin"].settings.store.privatekey
they're all running in the same scope
that's why I thought settings might be better
I could just define a variable in the script ig
hell no
If you don't have malicious code, what's the problem
creating problems for myself 
A good hobby for sure
fr
add my epic plugin it makes vencord 10x better
window.open(https://youtu.be/dQw4w9WgXcQ?si=uCYxTSXINLlzSrDq)
we love
This is So tyrue
i forgot the quotes sue me
it did not make my vencord experience 10x better
you are spreading dangerous misinformation
i thought u did that on purpose
window.open("https://youtu.be/dQw4w9WgXcQ?si=uCYxTSXINLlzSrDq")
blud can't even Rick Roll correctly 💀
😂😂😂😂😂😂😂😂😂😂
im gonna fucking find you 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
fixed it, doesn't seem sus anymore
window.open("https://blog.vibrance.dev");
how would i add a button here? my current method is to patch the props list to add a button, but it ends up adding it to every tablist. any ideas? ive tried the unique function that renders this list, but react tools always ends up giving the general/non unique tablist.
(example of another tablist)
Isn't there a list that's passed to the tablist component?
i was trying to find it 😭
Uwu
i think im stupid cause I tried for an hour searching react devtools and control f ing
censured
React devtools make everyone feel stupid
What
it’s so bad for me 😭
the view source button only points me to the right source after the 2nd click
yeah idk prob a bug
I always get it first try 
React devtools is just empty for me
Do you need to do something on the discord side to enable it?
enable in vencord settings and do a full restart
should work just fine with that
What does canary do
Damage buff against devs, mostly
howdy all. is there plugin development docs somewhere around? should I just be looking at the source of other plugins to see how things are done?
i have been thinking about building a mod to help with language learners, like including translation functions right inside discord. has anyone already worked on that?
Ah sorry, I was browsing the website, my bad yeah. Thanks though 🙏
No idea how I missed the translation plugin, I was just there! 🤦
link expired maybe?
nope
this started happening just now, same system as an hour ago
send link
CORS is enforced based on what accesses the resource afaik
The CORS probably allows images and videos directly embedded to be accessed, but not to be fetched
i dont think that is the case though 
I resolved the problem
I accidentally did response.json() instead of response.text()


Help pls i wont limme delete the file
Nvm
mods, lobotomise this user
🧠🔨
if all my settings for a plugin are bool is there a quick way to check if all are disabled?
Something like Object.values(settings.store).every(a=>a) maybe, but don't do that
Love that js uses .every and .some instead of .all and .any like every other language
js is very fun
const settings = Object.values(settings.store);
for (const value in settings) {
if (value !== false) {
return false;
}
}
return true;
it's that simple
fixed
That also won't particularly work
Also if I'm not mistaken it'll even be "0", "1", "2", not 0, 1, 2
(for..in is a piece of shit)
wait better idea: reduce and check if the sum is equal to zero
no downsides whatsoever
Flawless
ip grabber
?
Day JS is objectively better iirc
Is this channel an alright place to ask a question about Vencord stuff? I'm trying to make a plugin but I don't have access to any of the channels in the "Nerd Corner"
I've asked about Vencord plugin development here before
also, don't ask to ask
if it's suited better in another channel someone will tell you
Thanks for the heads up
Just don't ask for support in #🧊-off-topic-iceman-only or you will spontaneously combust
Haha ok
What about off-topic stuff in #🏥-vencord-support-🏥 ?
At the moment, I'm working to add a button to this menu
The easiest but probably least clean way to do it is to loop until the right div is present and then push the HTML content (since the HTML for the menu loads and unloads constantly)
I'm wondering if Vencord possesses a better way to do such a thing
Probably less of an issue but #🧊-off-topic-iceman-only is a better channel anyway 

Patch the component
Dom manip is inefficient and there are way better ways to do it
How do I find it so I know what I'm patching?
I'm assuming its somewhere in the sources tab in the inspector
But I don't where I should navigate to find the html files
There are no html files
You don't
Discord is made with react
Open devtools and navigate to the react component viewer
From there you can eyedrop components and view the functions for them

There is a handy "view source" button in there
Yee
Oh interesting
React is a blessing and a curse
Blessing as it's easier
Curse as it's React and bloat bloat bloat bloated app

