#๐งฉ-plugin-development
1 messages ยท Page 59 of 1
you just reminded me of that being thing,
you should generally avoid manually wreqing things
always use the cache, and if the thing is not loaded, load the chunk that has it
need advice i will actually submit PR for these if I make them btw
for context i did a shitty reimplementation of this whole invite rows list thing bc cba making special guild thingy case; should I migrate it to the actual exported component for that
y'all want everything don't you

deobfuscating the shit to make sense of what I need to patch
i renamed that
i think my autofill rec looks a bit broken 
That styling makes it look like it's powered by microsoft copilot
I just added an exported svg component in a seperate tsx file and my vencord stopped working ENTIRELY, no errors in console but all plugins and features have disappeared- is there even a way to diagnose the issue/error there? no errors in console either
show code
there are gonna be errors in console lol
unless ur discord updated so it unpatched xd
I'm on vesktop so i doubt it
One sec let me make a gist
I wouldn't be surprised if it's something really stupid, the svg is taken almost directly from discotools
done, still seemingly unpatches
i updated gist
check errors
nothing in terminal when building, or the devtools console
there has to be
i might have missed it, didn't know there was logs that don't show up in the devtools console
thanks, you saved me a lot of time
does anyone know how to drag an drop at all?
cause just creating a div element with draggable=true doesnt even work for me
I need that CSS 
After me smashing my head against the wall, the React element needs a prop isDragging() for being able to drag?
Direct eval 
alr
It would have been a global search tool that allows us to quickly perform various commands, such as accepting friend requests, deleting friends, listing server channels, and jumping to them instantly, etc-etc, all in one thing
P.S. I eventually archived the project.
lemme find the css
why exactly did you archive it? Seems very useful to me
well,-well im a perfectionist when it comes to these things and i love modern things. It would have been too big a project for me and too time-consuming. plus, ummm Im a very lazy person ๐ฏ ๐คญ
i can share the project code, if someone wanna continue or smh
but pretty sure discord has this library, so you can use it
https://react-dnd.github.io/react-dnd/
Drag and Drop for React
try findByProps("useDrag")
yeah, but for already existing react components?
Thanks!
can i use web to develop a plugin?
yes but itd be extremely tedious and not practical
youd need to reinstall the extension everytime you make a change
yes
am i stupid or am i stupid?
the method is called del not delete
it looks like the type is wrong so it's hardly your fault
anyway the function to unpin is exported
happens ๐โโ๏ธ
you can just findByProps it
andtry to avoid using manual paths, use Constants.Endpoints.ROUTE() instead
If I made a plugin that makes the VC popout always on top, would it get merged?
isnt that just a popout window?
cant you right click the titlebar > pin on top
that isn't a thing in windows
I currently use powertoys to pin it to top
all u need is better imagination
what
whar
does that not solve ur use case already then

asking friends to install powertoys is annoying
oh hmm
honestly windows should just have this natively
pinning windows to top should be handled by the os imo
thats why its in powertoys
should
Microsoft devs make good features, but aren't allowed to put them in windows, so they put them in powertoys
idk i3wm has always on top on anything popped out
simply imagine the feature existing
but it's tiling sooo it plays by its own rules
for windows though I could see this being useful
oh
Is that an awful idea to reassign component children like this?
well, it works like that, but maybe I shouldn't do that?
show full code pleae
escape a literal ๐คทโโ๏ธ
I'll change it later, the question now is this one :p
function getColoredText(text: any) {
if (!Array.isArray(text)) {
text = [text];
}
return text.map((p: any) => {
if (React.isValidElement(p) && p.props) {
return React.cloneElement(p, {
...p.props,
children: <ColoredMessage text={p.props.children as string} />
});
}
return p;
});
}
umm maybe try to use something like this, im not sure this that good or works, i cant test rn, also im kinda bango noob, but give it a try,
maybe there is syntax error too, as i said i cant test rn 
how can i uhh... intercept an user popup?
specifically from clicking the profile picture or username from a message
(because i need the message id)
pluralkit integration kind of thing
pk has an api to fetch details about a message by id
i want to be able to click on the webhook and make the system's author pop up instead of it showing invalid user
so you want to make it so that the profile popout has the actual author instead of the webhook user?
yes
you need to patch the onClick handler
or you could go the easier route and patch the context menu to add a button like view original author
im going with a MessagePopover rn, but having the popout automatically be the author would be nice
...so i need to find the place where onClick is defined for that component
is this always like finding a needle in a haystack or am i missing something
it's very easy with react devtools
you just inspect the element and get all its props including onClick
I really love how it looks :3
ooo
thats a very cool plugin idea
can you show a better example for this, please? I tried it but, yeah
*like a full example how to get
*
I tried to import it from @webpack/common but i couldnt retrieve any values from within .Constants, and i didnt see anything like endpoints in it, this confused me a bit
anyone know how to wait for a key event in vencord?
idk wym exactly, and what u wanna do, but maybe this? ๐
function onKeyPress(event) {
if (event.key === 'Enter') {
console.log('meow');
}
}
window.addEventListener('keydown', onKeyPress);
or
const EnterKeyListener: React.FC = () => {
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === "Enter") {
console.log("meow");
}
};
window.addEventListener("keydown", handleKeyDown);
return () => {
window.removeEventListener("keydown", handleKeyDown);
};
}, []);
return null;
};
export default EnterKeyListener;
(continuing from #๐พ-core-development )
looks like useAwaiter isnt re-running when the url from that hook updates, and it always returns false and doesnt re-run
it works correctly if i scroll down in the member list and back up
thxx!!
could you show how are you using the useAwaiter?
const [shouldShow, e, isPending] = useAwaiter(async () => {
if (!settings.store.animate) {
if (url!.includes("cdn.discordapp.com")) return true;
return await new Promise(async (resolve) => {
usrbgQueue.push(() => fetch(url!.replace(".gif", ".png"), { method: "HEAD" }).then(async res => {
console.log(res);
await new Promise<void>(resolve => setTimeout(resolve, 1000));
resolve(res.ok && res.headers.get("content-type")?.startsWith("image/png"));
return;
}));
});
}
return true;
});
console.log(shouldShow, e, isPending, url);
if (!shouldShow) return null;
return (
<img src={url} className="vc-banners-everywhere-memberlist"></img>
);```
what's "that hook"
oh sorry
// code above the earlier
let url: string | null = null;
if (Vencord.Plugins.isPluginEnabled("USRBG")) {
const USRBG = Vencord.Plugins.plugins.USRBG as unknown as typeof import("../usrbg/index").default;
url = USRBG.getImageUrl(user.id);
}
if (!url) {
url = useFetchMemberProfile(user.id);
}```
const useFetchMemberProfile = (userId: string): string => {
const profile = useStateFromStores([UserProfileStore], () => UserProfileStore.getUserProfile(userId));
useEffect(() => {
let cancel = false;
discordQueue.push(() => {
if (cancel) return Promise.resolve(void 0);
return fetchUserProfile(userId).finally(async () => {
await new Promise<void>(resolve => setTimeout(resolve, 1000));
});
});
return () => { cancel = true; };
}, []);
if (!profile?.banner) return "";
const extension = settings.store.animate && profile.banner.startsWith("a_")
? ".gif"
: ".png";
return `https://cdn.discordapp.com/banners/${userId}/${profile.banner}${extension}`;
};```
umm
maybe try add url as a dependency to re run usea waiter when url changes and the same with userid
return () => { cancel = true; };
}, [userId]);
and
await new Promise<void>(resolve => setTimeout(resolve, 1000));
resolve(res.ok && res.headers.get("content-type")?.startsWith("image/png"));
return;
}));
});
}
return true;
}, [url]);
maybe like this
useAwaiter(() => {}, {
deps: [dep1, dep2, dep3],
fallbackValue: ...
})
ohhhh i didnt see u could specify deps for useawaiter
tysm
still getting this tho
i am using a queue for the fetches
thats an internal react error xd u dont need a queue
๐โโ๏ธ
you cant conditionally call hooks
hooks need to always be called
if (!url) {
url = useFetchMemberProfile
}
this is invalid
(also prefer ??= for that, url ??= ...)
alright, ill make useFetchMemberProfile not fetch if its in the usrbg data, and call it always
oki
yep yep
works now!! tysm
pushed
@dull magnet do i not need enableStyle if it isnt managed?
you need to findByPropsLazy btw
W
thanks the reminder, u actually just fixed my biggest problem 
no sleep is can be kinda insane ๐โโ๏ธ
now everything works fine
yes, im sleepy ngl, when u type bun instead of git
I need help, I am unable to get this state
its for the automod, module id: 727072
I am trying to get the automod rules
done
new problem, is there a way to get the guild id when looking in guild settings?
this is horror
{loaded && (invites.length ? invites.toSorted((a, b) => (new Date(a.expires_at) as unknown as number) - (new Date(b.expires_at) as unknown as number)).map((fi: { code: any; uses: any; max_uses: any; expires_at: string; }) => <InviteRow
one line
i made it longer
is there a way to listen for AnalyticsUtils tracks?
trying to get this
and get the guild id
Listen to TRACK flux events?
are they the same? cuz I couldn't find something useful in fluxEvent.d.ts
i ran FluxDispatcher.addInterceptor(console.warn) for testing stuff a while ago and i can still find tracking events after trying again
{
"type": "TRACK",
"event": "impression_guild_settings_overview",
"properties": {
"impression_type": "pane",
"guild_id": "1015060230222131221",
"guild_size_total": 46037,
"guild_num_channels": 42,
"guild_num_text_channels": 39,
"guild_num_voice_channels": 3,
"guild_num_roles": 193,
"guild_member_num_roles": 7,
"guild_member_perms": "2222085187161793",
"guild_is_vip": false,
"is_member": true,
"num_voice_channels_active": 1,
"channel_id": "1032770730703716362",
"channel_type": 0,
"channel_size_total": 0,
"channel_member_perms": "2222085187161793",
"channel_hidden": false,
"location_section": "impression_guild_settings_overview",
"client_performance_memory": 0,
"accessibility_features": 524544,
"rendered_locale": "en-GB",
"uptime_app": 3198,
"client_rtc_state": "DISCONNECTED",
"client_app_state": "focused"
},
"flush": false
}
dont be confident the event will be exactly the same
.
nop
you can right click a guild in the sidebar and open server settings from there
smh
nice, its working better then expected
just need to fix the sudden react error
I am so confused, the first one is fine but the second one crashes discord
const [inputValue, setInputValue] = useState("");
const [warningText, setWarningText] = useState("");
const { rulesByTriggerType }: { rulesByTriggerType: Array<Array<AutoModRule>>; } = useAutomodRulesStore.useAutomodRulesList(guildId);
const { rulesByTriggerType }: { rulesByTriggerType: Array<Array<AutoModRule>>; } = useAutomodRulesStore.useAutomodRulesList(guildId);
if (rulesByTriggerType.length === 0 || !rulesByTriggerType[1] || rulesByTriggerType[1].length === 0) return null;
const [inputValue, setInputValue] = useState("");
const [warningText, setWarningText] = useState("");
oh okay, why is this a thing tho?
i should revive my change that adds react eslint rules
i put it on hiatus because i broke some things
because react is a fucked up library where I would assume the hook data is keyed based on the order of the hook functions being called
yes
it's just a queue basically
if you call a hook conditionally it messes up all other hooks

renderInputBox: () => {
const { rulesByTriggerType }: { rulesByTriggerType: AutoModRule[][]; } = useAutomodRulesStore.useAutomodRulesList(currentGuild);
if (rulesByTriggerType.length === 0 || !rulesByTriggerType[1] || rulesByTriggerType[1].length === 0) return null;
return <TestInputBoxComponent currentRules={rulesByTriggerType[1]} />;
},
Is there a util to send a message? i know there's one to enter text into the chat box but i couldn't find one to actually sent it (or think of a plugin that does that)
NVM I JUST FOUND IT AS SOON AS I SAID THAT 
i was so bored late night, so created a color picker plugin, kinda pointless but why not, and works perfectly cursed 
That's really nice looking actually
I would probably use it if i didn't already have a color picker widget
yeah, u can just download one and use as external, so kinda pointless use as a plugin, but pain is pain
if it supports images too that would be awesome but I see where the challange could be
Did you just message from your alt accidentally lmao
second time

watch plugged into canary and yeah
XD
i test on my alt
ofc i can login to my main, but im a lazy ppl ๐โโ๏ธ
Now port it to plasma 
w8 wha, plasma..hmmm.. wha is that? im kinda dumb, so u have to explain 
It's a linux desktop environment
You should totally make that open source tho because it would be sick as a plasma widget
Qhar
here is the code for colorpicker, but still unfinished and maybe hardcoded ๐คทโโ๏ธ
also css
are external domains allowed in a vencord plugin? i would def give the user a prompt tho.
:3
nice 
expression picker panel > charbar
Whst
nothing..
for what
I am failling to enable this experiment again
it isnt even an experiment
they added a dismiss button
idk how to get it back
lol
i'm thinking of making a plugin that connects via ws to a domain that just only transmits you're discord ID and says if you're a vencord user using that plugin-
why ๐ญ
idk like isVencordUser plugin ;-;
vee its time for you to joke about vencord analytics again
does this look like something discord would make
tf is that qr code
i blanked it out
real version (no the invite doesnt work)
it's for friend invites
That's really cool
can you right click it and download?
and pretty much I see discord making this
nop
blame discord
i stole discords stock thing
its actually an SVG
and also
see that thing at the bottom
it would be dum to right click downloa
then make it left click 
Anyone know how to always show the 'Pop Out' button even when no one is screensharing
div.wrapper__6bf2d.poppedOut_db58f7
{ display: none; } /* dupe call ui */```
I recently added this to hide call ui when i have things popped out, but i want to be able to pop that ui out even if no one is sharing
plays better with vertical monitor
better off, creating a plugin instead of using css
what?
only shows for me when someone is screensharing or camera on, is that just me?
have you managed that via some plugin or otherwise?
oh i dont care about the server behavior, this is in group dms
should have specified
how come 99% of vencord forks exist just to add a bunch of plugins
cause vencord is perfect people just want more plugins
๐ช
is adding a plugin really that annoying
(i wouldn't know, i've never done it)
not really, but you have to build from source
i don't see how creating a fork makes it any easier ๐ญ
why don't most of the bigger forks (equicord, suncord, tobleronecord) merge into origin
- equicord ~~is a hostile fork for some reason ~~ idk

- idk about suncord that much actually
- @balmy sky can't do git the way upstream expects is what I'd assume
WRONG!!!1
The answer is i'm lazy and don't really care that much

Also i would 100% find a way to screw it up
hostile fork?
just learned waht that means
bruh doesn't this discourage open sourcing until u have a reputation already
hostile fork ๐ญ
how the fuck is Equicord hostile?
i wouldnt say its hostile
idk i was told the developer kinda hated vencord upstream stuff afaik
the owner is a nice person
but you are right it isnt hostile
we dont hate vencord, we love it
but there are some bad people involved in that fork, mainly coolesding
u sure abt that
what'd coolesding do
guh im dum ignore what i have to say about it
coolesding isnt involed that much
teach me more
thororen is cool tho
i mean they have my stuff in there 
theyre here @signal goblet
Hi

also wanna know
they're very hostile towards vencord and me and constantly try to start drama / "cancel" me
Cooles is only there because of userpfp
i think thats why i am confused about the fork as a whole
Literally the only reason
userpfp
oh i see
horror
it seemed like they had more involvement
And since I worked on userpfp (the plugin) back a few months ago
what even is the point is userpfp? animated pfps?
They are in equicord
wtf do you mean idrk ๐ญ you literally contributed to it
pretty much and thatโs too really the only thing cooles does
When they make prs it's them I have nothing to do with it
I won't ban someone out of hate I need an actual reason tbf
Ofc I say that and now I need to go unban someone brb
Fixed
yeah i wasnt expecting u to
like i said
i think sqakoi misunderstood
I banned f53 for a bit because I was pissed and didn't want to deal with anything of it was like 3am at the time
I unbanned them
if any fork is โhostileโ that would be Vencord unofficial. and that fork actively hate on this. And their server is nothing but a shit talk shit show.
i love f53
||as a friend if that wasnt obvious||
But it was because of their reasoning of "I want x removed because this client isn't cute"
wtf is vencord unofficial
Donno
WTF IS THIS https://github.com/Davilarek/Vencord
I can drop the link if you want
wait we're listed here thats cool https://github.com/luong-komorebi/Awesome-Linux-Software#chat-client-utilities
lmao nice
sure
Anyways I gotta dip got work
oh that
i think they dont like me (? /us ) cause i recjedted a bunch of their plugins
lol
(I would drop the link to the server, but Iโm pretty sure that would get me auto modded)
i only use my fork for customization cuz my plugins in it r stupid
yeah, their server is probably one of the most toxic moding servers Iโve ever been in
happens

why does that look like the perfect recipe for disaster?

yes
When your 2 lazy to add or modify the existing ones
How to get people to join your discord server real
Yeah, Vencord Unofficial is a very toxic server
amazing 
Fr
Off topic but Eminem's Houdini song has a good beat
Show me some examples.
I honestly donโt even remember where I put the server
Lol video leeks. We've gone off the rails...
Navigate Discord with nothing but a keyboard. Hit CTRL+K and type away.
The best communication app for yelling at your friends. Discord is the only free and secure all-in-one voice+text app designed for gamers that works on your desktop and phone. https://www.discordapp.com
Tweets: http://www.twitt...
such an abandoned feature
Yeah, let me just do that on an iPhone
sounds like new mobile app issue actually
Bunny user Aliucord hater (joke about being a hater)
what
its just discord component
either discords component is broken (unlikely) or our types are outdated (more likely) or you're using it wrong (maybe)
the value field only allows for a single SelectOption instead of an array of SelectOptions
resolving git conflicts due to force pushes
lol most of these commits are updating the branch to remove git conflicts
there shouldn't be any conflicts

but also i recommend waiting a day or so before merging new changes to make sure it's not force pushed
or just base on main
yeah you are only gonna have conflicts if you depend on dev
Got I need to crop that logo
hey, question, I'm planning to make a plugin based on one that already exists... that would be pretty much a replacement of the original one, would it be publishable? would it actually replace the original one?
Why not just update an original one?
yea, im really wondering how that would work
Im planning on, based on the Anonymise File Names, make a Anonymise Files, which will include some features like stripping metadata
pnginfo
I just checked, it is not removed
and im paranoid about that now lmao
I don't want to replace the original plugin, but since it would be pretty muc hthe same thing with extra functionality..
anyway.. I'll make it for myself, maybe I come back some time to publish it =P
nvm, I just realized im stupid. I accidentally tested the same file 2 times instead of the file with metadata and the file uploaded on discord, discord do indeed remove it 
๐โโ๏ธ
when a video hovered, there is a button, anyone know how can i add extra button there?
For @api/Commands, how would I give a required arg. I know RequiredMessageOption exists, but I have absolutely no clue how to add args to a slash command.
I have been looking at them but as I said, not sure how to like actually add an arg
Or am I just stupid and cant read stx
tsx*
suncords just a fork i made for a friend group, but then others started using it
ยฏ\_(ใ)_/ยฏ
also suncord does merge into origin, it has auto merging actually (still hate conflicts i gotta resolve ๐)
Managed to find out how to add an arg, but now whenever I try to run the slash command:
Uncaught TypeError: (0 , s.default)[t.type] is not a function
at Module.l (27519.e978630bea52e4d936cf.js:1:2781703)
at 27519.e978630bea52e4d936cf.js:1:3190124
at Array.map (<anonymous>)
at Module.p (27519.e978630bea52e4d936cf.js:1:3190094)
at 27519.e978630bea52e4d936cf.js:1:3170928
at 27519.e978630bea52e4d936cf.js:1:3171131
at Object.onKeyDown (27519.e978630bea52e4d936cf.js:1:3251503)
at O.handleKeyDown (27519.e978630bea52e4d936cf.js:1:3208305)
at tg (91463.9b4a57d4335d665553c8.js:12:1274496)
at 91463.9b4a57d4335d665553c8.js:12:1270862
Get's spat out to the console
show code
in general there is an issue with ApplicationCommandInputType
?
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import definePlugin, { OptionType } from "@utils/types";
import { definePluginSettings } from "@api/Settings";
const getIpInfo = async (ip: string, apiUri: string) => {
const response = await fetch(`${apiUri}?ip=${ip}`);
if (!response.ok) {
throw new Error("Failed to fetch IP info");
}
return response.json();
};
const settings = definePluginSettings({
apiUri: {
type: OptionType.STRING,
description: "Place an IP Info URL here (Will be used when running /getinfo and /ip2map so make sure it is valid)",
default: 'https://ipinfo.littlekai.co.uk/lookup',
restartNeeded: false,
}
});
export default definePlugin({
name: "ipInformationCommands",
description: "Adds commands to get information of an IP address. Make sure to abide by Discord's ToS whilst using this command.",
authors: [
{
name: "Kai :3",
id: 1205727693811879997n
}
],
dependencies: ["CommandsAPI"],
settings,
commands: [
{
name: "ipinfo",
description: "Gets information on a provided IP.",
inputType: ApplicationCommandInputType.BUILT_IN,
options: [
{
name: "ip",
description: "IP to get information on. Example: 1.1.1.1",
type: ApplicationCommandOptionType.STRING,
required: true
}
],
execute: async (args, ctx) => {
console.log("Options received:", args);
const api_uri = settings.store.apiUri;
const ipOption = findOption(args, "ip");
const ip = typeof ipOption === 'string' ? ipOption : String(ipOption);
console.log("IP found:", ip);
if (!ip) {
return sendBotMessage(ctx.channel.id, { content: "IP address is required." });
}
try {
const data = await getIpInfo(ip, api_uri);
sendBotMessage(ctx.channel.id, { content: `IP Information: ${JSON.stringify(data)}` });
} catch (error) {
sendBotMessage(ctx.channel.id, { content: `Error fetching IP info` });
}
}
}
]
});
try this
probaly still have some issue in this code, i just fixed the syntax error
Is there any way to catch notify before receiving a push? I want to disable it in specific cases
i have refactorized ur code, also used a better api, cuz the one u used before is sucks, here we go boddie:
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import definePlugin, { OptionType } from "@utils/types";
import { definePluginSettings } from "@api/Settings";
interface IpInfo {
ipVersion: number;
ipAddress: string;
latitude: number;
longitude: number;
countryName: string;
countryCode: string;
timeZone: string;
zipCode: string;
cityName: string;
regionName: string;
continent: string;
continentCode: string;
}
const settings = definePluginSettings({
apiKey: {
type: OptionType.STRING,
description: "API key for FreeIPAPI (Leave empty if using the free plan)",
default: "",
restartNeeded: false,
},
});
const getIpInfo = async (ip: string, apiKey: string): Promise<IpInfo> => {
try {
const url = `https://freeipapi.com/api/json/${ip}`;
const headers: HeadersInit = {};
if (apiKey) {
headers.Authorization = `Bearer ${apiKey}`;
}
const response = await fetch(url, { headers });
if (!response.ok) {
throw new Error(`Failed to fetch IP info. Status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error("Error fetching IP info:", error);
throw error;
}
};
export default definePlugin({
name: "idk",
description: "idk",
authors: [
{
name: "Kai :3",
id: 1205727693811879997n,
},
],
dependencies: ["CommandsAPI"],
settings,
commands: [
{
name: "ipinfo",
description: "Gets information on a provided IP.",
inputType: ApplicationCommandInputType.BUILT_IN,
options: [
{
name: "ip",
description: "IP to get information on. Example: 1.1.1.1",
type: ApplicationCommandOptionType.STRING,
required: false,
},
],
execute: async (args, ctx) => {
const apiKey = settings.store.apiKey;
const ipOption = findOption(args, "ip");
const ip = typeof ipOption === "string" ? ipOption : "";
try {
const data = await getIpInfo(ip, apiKey);
const formattedData = JSON.stringify(data, null, 2);
sendBotMessage(ctx.channel.id, { content: `IP Information:\n\`\`\`json\n${formattedData}\n\`\`\`` });
} catch (error) {
sendBotMessage(ctx.channel.id, { content: "Error fetching IP info." });
}
},
},
],
});
response example with 1.1.1.1
{
"ipVersion": 4,
"ipAddress": "1.1.1.1",
"latitude": 37.33939,
"longitude": -121.894958,
"countryName": "United States of America",
"countryCode": "US",
"timeZone": "-08:00",
"zipCode": "95101",
"cityName": "San Jose",
"regionName": "California",
"isProxy": false,
"continent": "Americas",
"continentCode": "AM",
"currency": {
"code": "USD",
"name": "US Dollar"
},
"language": "English",
"timeZones": [
"America/Adak",
"America/Anchorage",
"America/Boise",
"America/Chicago",
"America/Denver",
"America/Detroit",
"America/Indiana/Indianapolis",
"America/Indiana/Knox",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Tell_City",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Juneau",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Los_Angeles",
"America/Menominee",
"America/Metlakatla",
"America/New_York",
"America/Nome",
"America/North_Dakota/Beulah",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/Phoenix",
"America/Sitka",
"America/Yakutat",
"Pacific/Honolulu"
],
"tlds": [
".us"
]
}
idk why u need this and for what, but okay
you literally ate my message ๐ญ
sorry 
I love husking idk
I love downloading random files on discord
tempting
but no

tryna add custom style to a name, and the name element successfully changes, but for some reason the style isnt added, any idea why? (if someone replies, if you could ping me, that would be great)
I had the same issue earlier this morning. The problem was: wrong color
I had hex without # at the beginning so it wasn't added at all
tysm
@dull magnet sorry for the pong, but maybe you know how?
patch the shouldNotify function
Thanks
is there a plugin which shows me all my friends connections as a network graph? i could help develop it!
I am not fully sure what do you want, but it probably would require mass-fetching common friends for all your friends, which could count as selfbotting
idk if this would be better as a plugin or snippet
probably a first party plugin isnt the best idea
small thing was figured out about the user volume
if you put it above 100%, it just resets to 0
Is there a way to overwrite the function of the update discord button to run a script I have locally stored on my machine?
my reasoning for this is after restarting discord for the update, i have to manually run the script which updates everything and builds vencord
Is there no way to create and test a plugin without having to recompile all of Vencord? I just wanna get rid of the "Activity" section.
that can be done with css
I'll ask in Theme Development then, but I was under the impression there's no way to hide it using CSS since it doesn't really have any selectors they just dumped it in with the members list. It's not even it's own div.
no but it's a one time setup thing then you can just run pnpm watch when developing
also correct me if I'm wrong, but there is supposed to be a dismiss button for that
idk what discord was doing but there is no way to get it back afaik 
I restart my vesktop every change :3
it isnt even an experiment
(afaik)
could've changed
There "is", but it comes back every restart... or sometimes when it feels like it.
sounds about right
sounds like discord
Figured out how to do it with CSS, will post it over in #๐จ-theme-development .
no, but pnpm watch is useful
I have this code, should I care about generating a new id or leave it?
index.tsx: Lines 98-104
if (field.name !== "channel_id") { return; }
message.echoed = true;
message.flags = /* ephemeral */ 1 << 6;
message.author.bot = false; // making sure the bot badge don't show up (a bug from discord)
message.channel_id = field.value;
message.id = Array.from({ length: 19 }, () => Math.floor(Math.random() * 10).toString()).join(""); // generating a random id
sendBotMessage(field.value, message);
would that fire the MESSAGE_CREATE flux event too?
and what the diffs
message.author.bot = false; // making sure the bot badge don't show up (a bug from discord)
this will apply in many places across the app just be careful
so what you saying is that message.author is not a copy of author but its the message.author across discord?
not even that
then no idea of what you mean
from experience trying to send fake messages on the client; the client can use that author data to update the instance of that user in the store
it has lead to funky things for me in the past be careful with it
one time I accidentally renamed my friend to clyde because of it
just use createBotMessage omg
I am trying to understand the point
but alr..
if you dont need to change the author of the client sided ephemeral message then just use createbotmessage
hi, is there somehow a tutorial how plugin development for vencord works?
check #1032200195582197831 pins
vs dev
vdev
I forgor
ok thx
take a look in the docs directory
oh and another question but i dont know if this is the right place for it... why does the plugin TextReplace don't use the settings file fo it's expressions to store them?
idk 
some people love datastore for some reason even though you can technically set arrays and objects in settings
datastore downside is no settings sync 
yes there i also se the problem with this
datastore is just a wrapper for IndexedDB btw
I am playing the guessing game to know how and where to put createBotMessage
real
that thing just kept breaking
so
message.echoed = true;
sendBotMessage(field.value, {
...message,
bot: false,
flags: /* ephemeral */ 1 << 6,
channel_id: field.value,
id: generateId(),
});
that's the limit ig
what did happen here
settings is also just meh
no arbitrary data right now unless u store it in a string or whatever other optiontype
gotta make ui for that too
so i need to get a user from the id, ways? how?
well it cant be that much different from channelStore...
wait you can do that?!
well isnt that a good thing to know (im referring to the console btw)
so banner is undefined until i actually click onto a users profile (which kind of ruins my idea),
ideas maybe on how to get around that?
not sure
what are you trying to make
use the api instead
yeah i decided to just do that
i had an idea with banners in the friendlist... Just as an experiement to see if its good or just stupid
just idk if the api is gonna be super happy when someone loads like 50 friends at the same time... Talking when i do 3 requests in the same hour it complains
wait
hmm that looks cool
where are you putting the banners
i had an idea like bannerseverywhere
just obviously it exists so i dont actually have to spend an hour trying to make it
see things like this are cool but then you realise quickly that it makes it look like knockoff discord

im mainly just trying to learn more on how to make plugins...
is there anything you're struggling to understand
vencords plugin api is nice asf imo, only issue ive ever really ran into is one niche thing with context menus
which is?
the lack of docs makes it an itsy bit hard to understand but typings are there to save the day
yes lack of docs is horror
@elfin geyser do you know about the \i regex that vencord adds
... No?
the docs:
how to setup dev environment
random shit that assumes you know what you're doing
more random shit that assumes you know what you're doing
for checkboxes - it didnt automatically update the ui becuase the context menu doesnt rerender until you hover or close and open etc... and you can't pass custom components either
and you can't pass custom components either
lol what
yes you can
looking at other plugins for reference is super nice
you can?
Yop
when i tried it threw an error
the docs:
how to install and build in the most detail possible
... Now coding plugins? Hahahahaahh... Good luck.
is there an example?
this used to be an issue ages ago but fixed now
you just need to use a hook like usual
okay; regarding vencord's patch system, it uses regex to match sections of code to replace
vencord adds a hacky \i operator for matching keywords and variable names
also tbf if you need extensive docs to understand how the api works then you are in the wrong project
it is very useful
yeah see ive been using flux for 99% of things instead of patches
hot take but some docs just feel like typings for browsers
that is okay
if you can do something with flux events and vencord's built-in apis then you should
like you need to be able to reverse engineer minified discord code
if you can't "reverse engineer" fully typed source code of other plugins then you won't have much luck doing the same to discord
wonder what this does...
i dont know and i have never seen that before
oh its a flux event
probably some captcha thing
huh
seems like its used for verifying new sessions (authorizing IP address) and payment 2fa where it sends you an email so someone cant just hack your account and buy nitro gifts
real
this is you
also, discord minified code too confusing? find what imports it and hack that to your needs instead
let enabled = false;
const Component = () => {
const [_enabled, setEnabled] = useState(enabled);
useEffect(() => {
enabled = _enabled;
}, [_enabled]);
return (
<Menu.MenuCheckboxItem
id="example"
label={"Example Checkbox"}
checked={_enabled}
action={() => {
setEnabled(!_enabled);
}}
/>
);
};
const ContextMenuPatch: NavContextMenuPatchCallback = (children, ...args) => {
if (!children.some(child => child?.props?.id === "example")) {
children.push(
<Menu.MenuSeparator />,
<Component />
);
}
};
read the error message
huh
you can't use custom components
yeah thats what i thought
get rid of the extra component
also there is no real need to anyway
.
put it inside your patch function
my bad
your good
if you need react hooks you can just define them in your patch callback function
ahhhh that makesmore sense
thank you guys lol sorry for my stupidity
i am trying to make a plugin and the devtools keep hanging whenever i click on the source tab
has anyone experienced this before
hanging?
not responding to anything input
is it possible to add css to a plugin
yes
How would one go about that
add it to your plugin folder and import it
do note: that css is loaded even if your plugin isnt
so be careful with your CSS selectors
Thanks both of you
hey new year. i just made the switch from better discord to this and am so far loving it, it has pretty much all the features i used and then some>
but there is one plugin im missing and am just curious if im just missing something that has this function
is there any plugin for vencord that provides the ability to add custom notification sounds
it been suggested but got rejected
ah damn
nitro only i assume
ye
sadness
No?
There's a pr that already exists for it
Probably won't be continued now, and will just be added to fakenitro
the built in discord feature sucks tho at least to my knowledge so this plugin would still be good to have
like isnt the discord one just a preset u can choose for certain servers
I think you can change it on a global level too
oh, mb then
so that includes vc sound effects and some other stuff
i feel like the plugin itself is already mergable unless theres somethin wrong with the code, been working fine for me for a while now on my dev install with no issues
reviewing code takes a while, + having a pr every single day to review, is suffering
I would love to be able to change the mute and deafen sounds too
would there be any way to simulate a profile popup? like build a modal thats formatted similar to this?
(if anyone replies, please ping)
test message 1
test message 2
any way i could add the same badge into here?
really unsure which one to use
crud
any idea which plugins use that?
great idea but i lack docs on that lol
The source code is the documentation
ok so speaking of regex being wild, i'm trying to optimise patch i made- right now all of the variable names are hardcoded and looking at other patch logic or the cheat sheat really doesn't explain anything 
Could anyone give me pointers on how to not be stupid
\i matches variable names
$& will insert the match in your replacement so you dont have to write it out
if you need to use a variable from the module then use $n where n is the capturing group number
Settings > patcher helper kinda explains it and shows the result with diff
and yeah the patch helper cheat sheet is really helpful
And sometimes the magic word arguments might be helpful
Alright that makes sense
This is the webpack module code of the patch right now, i've replaced the variable names with \i and used $& to insert the patch, but i still don't understand how to get the name of the g variable from the function
You don't
Use arguments[0].property
like arguments[0].message
how did i not know about this
Or you can use =(\i) in regex and $1.message in replacement
But using argument is really easier
useful though 
I said about it 5m ago :/
I didnt even read that 
YEAHH IT WORKS
Let's go
Thanks guys :3
So i'm doing the second patch now, and i'm trying to get the channel value of the parameter (passed as e), but when i log arguments[0] it's a module seemingly?
This is what is logged
try logging all of the arguments, that might be this or something idfk
arguments[1] perchance?, [0] might be this, if it's in a class, yeah
I tried it and it wouldnโt be this so idk
you need to learn the magic of using lookbehinds for that
it's be gonna be complicated to explain but add this at the end of your match (?<=channel:(\i).+?)
that should get you the channel as the last capturing group 
the 2nd patch isnt inside the $(e) function lol
it is in the arrow function below that
bump ^-^
It's definitely possible
I know it's not much help but most plugins use findbyprops or another findby function to get a component
Then you can just use the exact same thing and pass the relevant parameters
alright, tyty, ill look into that
I've got everything but that one patch working now, still not able to get the parameters for whatever reason
Ignore the console.log in that i forgot to remove it ๐
can you console.log arguments[0] and arguments[1]
also the hell is that screenshotting tool thingyโโโโโโโ
Codesnap on vscode
Is handy. It matches your vscode theme, and you can customise it to remove all the bits and bobs like the border and the mac buttons
just screenshot the code with a normal screenshotting tool or post it as a codeblock?
The pictures make it a whole lot easier for people on mobile to read, I guess. The extension also makes them good deal cleaner than if you were to do the selection manually
Why don't just console.log(arguments)
it may not show, arguments is not just an array IIRC
just use the (\i) and $1
arrow function doesnt have arguments object
TIL
but function $(e) {...} is not an arrow function, unless I'm dumb and I can't see something
^
Yop
It works! 
are plugins allowed to have local assets? like images or sound files
afaik if you try to add any local assets with a plugin they just wont get bundled in
and if you just wanna pull smth from your drive for personal use i doubt u can do that from chromium
use base64 blobs โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ:3
hello, what is the difference between the AFK and IDLE flux events?
also what would be the best one to use for when the client is idle (not the status)

So i'm trying to patch this return statement to add another element to the children, but i don't know how to identify that specific return, since there's a bunch of almost identical functions in the same module. I tried to use a lookbehind to check for .ModalContentContext.Provider, (its unique) but the patch just has no effect
well your patch is deleting everything leading up to children:, and then probably makes a syntax error cause it inserts $self.extraContent() and doesn't do anything to replace the old child
OH
Wait i'm stupid
Can i do a lookbehind that just checks if it's there any doesn't include the whole thing in the match?
just use a capturing group to put it back in the replacement
oh- i can send messages here? neat.
dont need support but reporting GameActivityToggle / Game Activity Toggle no longer can hide PreMiD's activity(s)
thats because they are now using the set activity scope instead of local rpc afaik
lets them do more stuff compared to discord rpc server in stock clients
ahh ok i figured that, the new system. thanks for the details
lmaooo
discord dot sex so good
yea but you got protection?
this
my protection is not accidentally writing plugins to send token to chat
yes this happened to other people before
dont ask about it 
so condom level not birth control yet
if you think about it NoDevtoolsWarning plugin is disabling that for your discord client
seo goes crazy
how would you store simple key-value pairs that persist
is it per plugin or global?
Global iirc
depends what kinda data
either settings or datastore
im pretty sure i'll need datastore
how would someone open a file picker/have a user load a file
ive tried the electron dialog but i cant figure out how to import it
many examples
oh ๐ญ my dumbass only thought of the vesktop source location picker thing, then failed to find it
afk is the status they use for mobile notifications and idle is the one for the auto idle status
[re-asked from #๐ฅ-vencord-support-๐ฅ ]
ok so i wanted to ask a question but i dont really know where to actually ask.
its about creating plugin for vencord, i've followed this guide from github, and i've followed every single step shown.
https://gist.github.com/sunnniee/28bd595f8c07992f6d03289911289ba8
but it seemed im very lost at the part of "looking element".
which ever element im looked (the pic in particular), i could not find the same line of code that has "EMOJI_POPOUT_STANDARD_EMOJI_DESCRIPTION" through react dev tools, however, it is indeed exist in the same source code if i searched it through "ctrl+F".
so could anyone enlighten me in these matter? Thank you in advance.
This is what i've got from selecting the element from the guide
this is what the guide shows (it looked like it) crycat~1
How can i get an array of members with a role from the role ID? the only information i need is the member ids
is the settings icon located in some variable somewhere? or do i gotta grab the path and make it myself
It most likely has a component, you could use findbyprops or another findby function to get it but it would probably be easier to just get the svg from devtools and modify it to your liking
Essentially, I'm trying to check if the member ids with a role are all in the hidden user ids array, and if they are, return null for the component to hide it. Except i'm having trouble getting the role members, i figured out how to get the role data with the guild store function but it doesn't contain the members
look at support helper
well that's for one single member
look at the role objects and check how the guild role settings tab gets role members
I think it's this useGuildRoleMembers function, should i use findbyprops or something similar to get it?
found it; CogWheel
Got it!!
how would i get the current notification settings for a specific guild?
theres probably a findbyprops i can use, i just cant find it
Should all be stored in the UserGuildSettingsStore
its a react hook so if this is not inside your react component, have fun
oh its an api call
Yeah i saw that
I was thinking of calling the api manually but i don't know if that's dodgy and potentially bannable
Because the method definitely exists
I think i'm going to hell for writing this but it works for some reason
New fork found and this one claims to be superior (at least they did before they went back two versions)
https://github.com/official-notfishvr/Fishcord
Why use our project!
- We replaced a useful feature with an alternative that doesn't actually provide the same level of functionality
The only reason to hide the update tab is so you could sneakily put malware in there without people realising it

so
they remove the updater tab
but not the updater
did they remove the update modal
if you have auto updates off
but checking on
iโd assume forceful auto update
plus if you hide that tab, then people canโt know exactly whatโs updating without going to the GitHub and the average person isnโt gonna bother with that
Vr in name
Instantly disqualified
ong this person has alot of weird repositories
OH MY FUCKING GOD
Add files via upload
official-
horror
Accidental Pr open
https://github.com/Vendicated/Vencord/pull/2552
THAT WAS THEM ๐ญ
This is so great
prolly as "official" as me
NO I WANT THEM TO BE REMOVED
this is the best part too this whole page
- languages
- css

does it count as programming if the most you know how to do is say โHello Worldโ
i think
he uploaded the whole vencord zipped folder to ai
with a prompt like
Me when i put markdown in my portfolio because i wrote my readme
refactorize the code
I didnโt mean to It was a miss click
iโm sorry for ping them
mhm nice save, nice ๐ฏ
any way i could recieve and send http requests via a plugin?
what do yo uwant to achieve
i want to change an icon when i recieve an http request
i want to delete the icon when i send an http request
just realized it sounds like im making a malicious plugin
gg
Hello, I saw the new plugin MaskedLinkPaste and I got inspiration to do something similar, but when you type a character instead. E.g. wrap something in parentheses or backticks when you type `` or(`, similar to how VSC does, however I'm a bit lost on these Transform things, and can't seem to detect a single character being inserted whilst I have something selected. I've just been messing around with the afforementioned plugin's source, but perhaps that's not the right approach, since that does stuff when things are pasted. https://leo.might-be.gay/YXRABQ.gif
add an event listener for keydown and handle it if its ` or (
hmm
trying to figure out what i need to do with this volume booster is a goddamn nightmare
all of the audio in a call is easily accessible as a single audio track
but i need each user individually
to apply a gainNode
time to dig more
what u trying to make
I am 99% there to make a draggable favourites emojis
But
When you drag after the first time
the reference doesnt update
lemme make a draft pull
ohh i see
i love when people fix discord's own lack of quality of life functionality โค๏ธ
it was painful to do so
I think
I have it
Memoization
fuck
react
still doesnt work perfectly
ive been waiting for one of my friends to join call so i can test
they said they'd join when they woke up
they just woke up
its currently 5pm
oml
drop the @ to that alt
shhh im lazy
https://github.com/cheesesamwich/Tobleronecord/blob/main/src/tobleroneplugins/ClientSideBlock.tsx#L111
Right now i'm just returning null in the message component, but that means the unread marker still shows. Is there a way i can hide it? From what i can tell it's a completely seperate component with no data attatched, so i'm not sure how to remove it without just plain dom manipulation
ClientSideBlock.tsx: Line 111
replace: "$&if($self.shouldShowUser(arguments[0].message.author.id)) return null; "
looks fishy
any way i could add the same badge into here?
test message 2
maybe replace the timestamp?
everything i have is this
return (0, i.jsx)("span", {
className: s()(n, A, {
[d.timestamp]: !0,
[d.timestampVisibleOnHover]: c,
[d.timestampInline]: I,
[d.alt]: E
}),
children: (0,
i.jsx)(a.Tooltip, {
text: (0,
l.dateFormat)(_, "LLLL"),
"aria-label": m,
tooltipClassName: d.timestampTooltip,
delay: 750,
children: e=>(0,
i.jsx)("time", {
...e,
id: T,
dateTime: _.toISOString(),
children: null != t ? t : (0,
i.jsxs)(i.Fragment, {
children: [(0,
i.jsx)("i", {
className: d.separator,
"aria-hidden": !0,
children: r ? "[" : " โ "
}), h, r && (0,
i.jsxs)("i", {
className: d.separator,
"aria-hidden": !0,
children: ["]", " "]
})]
})
})
})
})
although no idea on how to clone a reference to that exact timestamp position
(if it's even possible to cloneref an icon from one point to another)
any ideas?
real, but also most of these are fake and the only thing on them is when they were created as like one or two changes to make it look like theyโve done a lot
first are you sure this is the component?
40% sure
did you try to set a breakpoint to make sure that its actually renders with the message?
no, but what's the point?
i was talking about that thing with a different guy too
he helped me to find out the thing
more in #1247799286914093088
yeah.. I don't understand anything
I don't always have vencord in my packets
fair enough
i want to disable this anyone have plugin?
just click cancel
question still up
that space is generally only available with 2 or more messages
what is that icon even for?
I'm back
and I've hit a roadblock, which is editing the textbox's content. How could I do that?
https://leo.might-be.gay/8NVG15.png
its really simple string stuff
if (e.key == "`") {
e.preventDefault();
const start = e.target.selectionStart;
const end = e.target.selectionEnd;
e.target.value = e.target.value.slice(0, start) + '`' + e.target.value.slice(start, end) + '`' + e.target.value.slice(end);
e.target.selectionStart = start + 1;
e.target.selectionEnd = end + 1;
}
this is just a basic vanilla js way of doing it so you'd probably have to find a proper way to modify the state of the message input component
yeah your gonna have to hack your way into the input component
its literally one click
if you are this lazy you do not deserve any of the little oxygen you are using /hj
message read
thats what i said
I'm trying to make a plugin that removes server profile pictures, by patching the message object then replacing the avatar value with the global pfp, if i log the author object of a message, it seems the avatar is stored as a hash type string instead of a URL like i expected. How can i get the (non server) profile picture of a user in the same format? i looked in the user object type definition but i'm not sure, it could be getAvatarSource potentially
if youre patching it out set the server avatar to null
itll fallback to the global one
Wtf it's that easy?
I'll try that, thanks
Is the server avatar property just author.avatar or is there a specific field that i somehow missed
I DON'T THINK IT'S THAT ๐
Oh i could very much be patching the wrong component actually
I'll try pick a different one
It's being set to null now but the server pfp is still there, i probably patched the wrong component again- attatched an image of it
It's possible to add custom react components to plugin settings, right?
I want to add the keybind customization button from the actual Discord settings to my plugin
currently working on a deuteranopia filter since discord won't do it
at this point ive gotten so used to seeing the colors differently that the filters look weird to me
i just go based off memory 
oh lmao
you got deuteranopia?
yeah lol
could you say if the color correction actually makes a significant difference for you?
oh 100% lol
i'm relieved
i think you could do somerthing similar with css
yes, altho it would take a LOT more effort i think
since you'd need to individually change things to color correct them better
might try making protanopia next
not too much. theres a really simple map function where you give an input and output
you could use a generator to quickly generator a full sheet for it
i see, but is there any specific incentive turning it into css? other than turning it into a theme i guess
well, seeing that the only way to currently implement js snippets is thru dev mode, having a theme alternative may be helpful
you're right, might look into that in the future
would be good to have this to be more accessible
yeah, you just gotta find it







