#🧩-plugin-development
1 messages · Page 24 of 1
lmao
now anyone looking at the org will see you're a member and think you endorse it??
so what stops me from adding linus torvalds to raicst org
and cancel him
maybe it's cause u follow me?
oh this is a setting
btw we should probably use branches and pr after initial setup done
so we don't get conflict explosion
ye
also if u wanna change any of the configs or stuff go ahead
i just added smth basic to get started 
obscure formatter noone has ever heard of soon 🔥
........
NODE
its not even real
"The process.stdout property returns a stream connected to stdout (fd 1). It is a net.Socket (which is a Duplex stream) unless fd 1 refers to a file, in which case it is a Writable stream."
BAD
nvm thats the correct fd
bRAIN
its not a function stupid cat
@dull magnet is $TERM set in windows
colors
i can check in a bit but also i have kinda atypical setup 🔥
you mean true color?
I think the new terminal might set it
or do I just always use basic colors if the output is not being piped
it checks term
nah
it checks a lot of stuff
just add it tbh it's pretty small and dependencyless
or just use https://www.npmjs.com/package/chalk
unlike the average sindre package this one isn't actually bloated
so dedicated to being dependencyless that they copy pasted two npm packages into the vendor folder https://github.com/chalk/chalk/tree/main/source/vendor
🚒
supports-color is literally theirs lol
yeah lmao
fake dependencyless
but yeah maybe just use chalk
it's pretty small
and like there's no need to care much about bundle size in cli anyway 
adding electron soon
incredibly fake
LOL i read the first line as "fuck your open source dependencies"
like on the very top
true
IMPORTANT: chalk 5 is ESM. if you want to use chalk with TypeScript or a build tool, you will probably want to use chalk 4 for now. read more.
CRINGE
do not the chalk nvm

its fine making color stuff isnt that hard
ansi-colors better
so i'd say either don't use support detection and just add an environment variable for disabling colours OR use a library

I already use NO_COLOR which is sorta standardised
idk that's what i would do
Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).. Latest version: 4.1.3, last published: a year ago. Start using ansi-colors in your project by running npm i ansi-colors. There are 1964 other projects in the npm registry ...
easily add ANSI colors to your text and symbols in the terminal. a faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).
nop lmao
hmm
BLAZINGLY FAST
nop
that line is 2 years old, wouldn't build tools support esm now
the rust disease
partially
i think esbuild actually supports it fine but if they use esm features like top level await it will explode
because there's no good way to do top level await in commonjs
yeah
the node ecosystem is really messy in this regard
because you can't use both together which is horrid
they should have added some sort of interop
well esm can inport cjs
just not other way around
i think the best thing you can do as a package maintainer is to ship both an esm and cjs bundle, like i do here https://www.npmjs.com/package/virtual-merge?activeTab=code
dist/index.js = cjs
dist/index.mjs = esm
i think esm is superior and use it whenever i can, but when maintaining packages (which is rare anyways) i just use cjs since it can be imported by anything
¯_(ツ)_/¯
https://github.com/Vendicated/virtual-merge/blob/main/package.json#L7
https://github.com/Vendicated/virtual-merge/blob/main/package.json#L19-L22
**package.json: **Line 7
"build": "tsc && esbuild src/index.ts --outfile=dist/index.mjs",
**package.json: **Lines 19-22
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
dont care enough lol
this is all that's needed
noted
tsc builds commonjs, esbuild builds esm
the exports object tells node resolve which file to choose
assuming you already have a build step via tsc or similar adding this is trivial
even if you don't, you can probably make esbuild transform cjs to esm
**tsup.config.ts: **
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"],
dts: true,
});
i love how printing c++ errors uses .what()
like. what are you doing here man.
/run
#include <iostream>
#include <variant>
int main() {
std::variant<int, float> foo = 4;
try {
std::get<float>(foo);
} catch (const std::bad_variant_access& e) {
std::cout << e.what() << std::endl;
}
}
Here is your c++(10.2.0) output @oblique lark
std::get: wrong index for variant
wtf is variant
/run
#include <iostream>
#include <variant>
int main() {
std::variant<int, float> foo = 4f;
try {
std::get<float>(foo);
} catch (const std::bad_variant_access& e) {
std::cout << e.what() << std::endl;
}
}
@dull magnet I received c++(10.2.0) compile errors
file0.code.cpp: In function 'int main()':
file0.code.cpp:5:34: error: unable to find numeric literal operator 'operator""f'
5 | std::variant<int, float> foo = 4f;
| ^~
file0.code.cpp:5:34: note: use '-fext-numeric-literals' to enable more built-in suffixes
chmod: cannot access 'a.out': No such file or directory
/piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
is that like an union
/run
#include <iostream>
#include <variant>
int main() {
std::variant<int, float> foo = 4.0;
try {
std::get<float>(foo);
} catch (const std::bad_variant_access& e) {
std::cout << e.what() << std::endl;
}
}
@dull magnet I received c++(10.2.0) compile errors
file0.code.cpp: In function 'int main()':
file0.code.cpp:5:34: error: conversion from 'double' to non-scalar type 'std::variant<int, float>' requested
5 | std::variant<int, float> foo = 4.0;
| ^~~
chmod: cannot access 'a.out': No such file or directory
/piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
explode
/run
#include <iostream>
#include <variant>
int main() {
std::variant<int, float> foo = 4.0f;
try {
std::get<float>(foo);
} catch (const std::bad_variant_access& e) {
std::cout << e.what() << std::endl;
}
}
Your c++(10.2.0) code ran without output @dull magnet
it's like a union but worse
I love overengineering cli tools (but it pretty ...
)
i almost forgot how much i hate ci
i like the font
it's Iosevka :3 https://github.com/be5invis/Iosevka
(tho technically I use https://github.com/be5invis/Sarasa-Gothic (which is just an extension of that font))
you should just get iosevka unless you need cjk characters
this has all the font variants https://github.com/be5invis/Iosevka/releases/download/v24.1.0/super-ttc-iosevka-24.1.0.zip
i only got the thin font tho
it looks way thinner than yours
lemme try it
doesnt wanna work
:(
try Iosevka Term Regular
yay
ancient software
The latest ECMAScript runtime environment can be obtained from SUN Microsystems
yall sleeping on this font
comiccode?
yaya
for good reason
I'll stick to good ol' Fira Code tyvm
Ok so I made a mix of pseudoselectors and attribute selectors go brrrr, and now my favourites server looks roughly 1.24 times cooler, tried to adjust it to more closely match the look for my server channel buttons and I'd say it went pretty well (First image is favs server, 2nd is server channels)
Why is the member and channel tab in the same column https://cdn.discordapp.com/emojis/1057461700573528225.gif?quality=lossless&size=48
It's the favourites server, and I have channels and dms/gdms in separate categories
I should turn some more of my stuff into snippets for that
I'm trying to keep my quick css to under 1k lines lol
Mine's at like 1.7k since I basically just put my entire custom theme in there lol
Scratch that, 1965 lines, geez lmao

I add stuff to it like daily, but yeah fair, that way I can maybe even keep it even better categorized and segmented than the current spaghetti monster I have
I've just been too lazy to change how I work on it, so I've just stuck to only using the quickCSS editor and copy-pasting it into a OneDrive synced .css file when moving it from my laptop to desktop
Yeah I realize that, I've just been too lazy to change how I work with the theme lol
Yeah fair, that plus parts that are currently being tested and worked on
Then when I feel ready with them just put them in the gist
Good idea yesyes, I'll do it during the upcoming summer break when I have more time for that
How can I do it
I know nothing about GitHub 
Tried to create a repo the other day but got back error after error
So I gave up
So real
My current thing at almost
1.1k lines
But I want to reduce it further
yk what I'll just rebuild this theme from the ground up when I have time, that way I can hope to keep it more organized by putting for example all of the layout stuff in one bit, all the visuals in one bit, and goofy behavioural changes / more interactive/dynamic stuff in another one
I could probably get mine down to like 1.7-1.6k by just removing comments tbh
Also looks good
Here's mine, which considering how much css I wrote, how many different dynamic and conditional selectors it uses, and how much god damn blur I crammed into it, I am genuinely surprised at how well it runs
I almost thought it was burnt into your monitor
I'm using Vencord Desktop so there's nothing I can do to the windows bar on top
My css breaks in normal discord
Ah lol, yeah no I added transparency because me like, and the transparency itself hasn't really caused any crashes as far as I can tell
Wait it's like hardcoded in that version?
Some are hard coded yeah
Huh, well that's another reason for me to stick to modded then 
I don't know the difference between hard code and others tbh
I think changing the default variables to something else could be hard code
I probably used the term incorrectly tbh, but I meant as in it not being able to be edited
At least it gave me some quality of life improvements
I only need to change 2 HSL values to get a different color scheme (currently 5 but I wanted Spotify to be a bit more modular)
How can you assume I knew css

Anything you can change would, at least in the casual / colloquial meaning of the term, not be hard-coded
I mean if you managed to make even a single change to it, then you did do css lol
Like they said, too much work for too little
my thought process is to give everything red color and red background until I find change in the client
I still remember how people were saying I couldn't make this work without JS or something similar, and how it took me like a week or two to get it working iirc
Now I'm just kinda able to throw together this change from the original, in like an hour or two at most lol
Only radius statuses missing and my theme looks pretty good to use
Radius statuses?
Ah yeah
Well I mean I could probably make that fairly easily tbh
Though the method I use the most for it has to be in english in its current state, though changing what it looks for in the aria-label attribute it looks at, would allow someone to use it with a different language
how did you get it in chat
I will most likely set the discord language to English anyway, Vencord doesn't support other languages yet
Been trying to look at how I could maybe use the fill colour of the status icon to get the same result, but there's a bunch of stuff that makes that tricky, such as the mobile and typing icon variations
Aliucord moment
😭
Aliucord 
Based client
Aliucord used to be good, but when it's running on such an outdated client version it's just not worth it for me, so I switched to Vendetta
There's still a bunch I miss about Aliu, but nothing exactly crucial (Same thing with my jump from BD to Vencord tbh, I liked keyboard sounds and Notification Sounds, but eh)
I mean just make your own, they're super easy to make since it's just json
The theme I'm using changes according to my phone color scheme
Like the Material UI introduced in android 12
I highly doubt that would be an easy thing to do
True, it's been pretty laggy and buggy. It apparently likes to crash a ton, mostly while I'm not in the app for some reason, and sometimes it gets stuck connecting for like two minutes while I'm locked in read-only on all chats, among other weird behaviour
So Aliucord developed by Ven
Oh yeah, that whole Material You thing, it's been a WIP for Vendetta for some time it seems
Real
Material You is one of the greatest achievements in Android
I don't see how it'd be possible with the theming system they have, Vendetta would have to make their own independently
I mean what could be done is just have a bunch of variants of a theme then change between those
Ig it's what they're trying to do? No clue tho
Oh yes. Farb palette
Yeah, though at least from my experience, few of them really match the wallpaper
True lmao
4 what?
It just throws shit at the wall until somethin sticks lmao
4 schemes
For Material You
I don't think that's true
4 schemes per background
But the schemes are kinda shit, I agree. I have seen the improvements in 13
But my phone caps at Android 12
My tablet however is at Android 13 now
Actually maybe some of the other themes it's showing me are based on the wallpapers I have it switch to in different modes?
Wait now I gotta check if I can have the colour palletes change with different modes
Maybe Samsung one UI calculates the color schemes a bit differently I suppose
Yeah maybe OneUI does it differently
Whichever way wehhhhh I can't have different colour palletes for different modes
that's material you 3
first one was in lollipop
No, you are mixing up material you and material design.
Material you is only present in material design 3.
maybe so
(Which is android 12+)
I'm on 13
System Info:
Brand: google
Product: flame
Board: flame
Architecture: aarch64
Bootloader: c2f2-0.5-8906123
Rooted: false
OS Version: REL 13 (SDK v33)
Memory Usage: 4.82/5.73GB (0.91GB / 15.90% free)
Uptime: 12:59:58
no
material you is material 3
or maybe you are right nvm
didnt read that properly
Nah its not
not really
well kindof
but material 3 can be used in older devices under android 12 which dont have material you
so it just uses purple
but basically yeah
is it possible to make these 2 options completely disappear
Use the aria label
div[aria-label="Servers"] + div, div[aria-label="Servers"] + div + div {
display: none;
}```
Thanks!
curved borders look so nice aaaaaa
does anyone know of any more general vencord-style tools for patching webpack (on sites besides discord)?
(also, I had a quick question for anyone who's more knowledgeable about webpack / webpack patching: I see some snippets for getting access to internal discord functions, which push a value to the webpack array / webpackChunkdiscord_app. They push a list with a callback function, which gets called in some internal context or something. This doesn't seem to happen on other sites using webpack, can anyone explain this?)
I found a mention on this github repo about 'hidden discord stuff' that implies it's a custom implementation, but no explanation: https://github.com/doggybootsy/hidden-disc-docs#discords-api-frontend-a-custom-webpack-implementation
it's just plain webpack, it will work on any site using webpack
i wrote this a while ago, not fully finished but should probably be helpful
can i fork this
for some reason, on the specific site I'm trying it on, running the following code does nothing (while working on other webpack sites). It's fine if the answer is no as I can probably figure it out myself / work around it, but is there an obvious reason for this?
webpackJsonp.push(
[
[Math.random()],
{},
console.log
]
)
wow, that's incredibly helpful
tysm
**webpackModules.js: **Lines 4-8
wpRequire = window.webpackJsonp.push([[], { get_require: (mod, _exports, wpRequire) => mod.exports = wpRequire }, [["get_require"]]]); // Get Webpack's require via injecting into webpackJsonp
// Remove module injected
delete wpRequire.m.get_require;
delete wpRequire.c.get_require;
in any case this approach should work fine on both old and new webpack
and doesn't care what the webpack instance is named
yeah, the userscript works perfectly
the way the userscript works is that it pollutes the function prototype, making property "m" a setter
webpack always sets the property m on the webpack require function, so the setter can intercept that
huh, cool
in the past I was just reading 'compiled' code and manually looking for stuff I could intercept
webpackRequire.c = require.cache
webpackRequire.m = moduleList (imagine it like a map of filenames to their object ({ "foo.js": (module, exports, require) => module.exports = "hi" }) except that the filenames are replaced with numeric ids
require cache isn't guaranteed to be a property, but m is always there
**WebpackGrabber.user.js: **Lines 25-49
get cache() {
if (!this.require.c) {
const cache = this.require.c = {};
for (const id in this.modules) {
cache[id] = {
id,
loaded: true,
exports: this.require(id)
};
}
}
return this.require.c;
},
get modules() {
return this.require.m;
},
get entryPoint() {
return this.require.s;
},
get path() {
return this.require.p;
},
get getDefaultExport() {
return this.require.n;
},
there's a bunch more than these but they're not particularly useful other than maybe force loading all modules
which can be done like this
https://github.com/Vendicated/Vencord/blob/main/scripts/generateReport.ts#L255-L272
**generateReport.ts: **Lines 255-272
// force load all chunks
Vencord.Webpack.onceReady.then(() => setTimeout(async () => {
console.error("[PUP_DEBUG]", "Webpack is ready!");
const { wreq } = Vencord.Webpack;
console.error("[PUP_DEBUG]", "Loading all chunks...");
const ids = Function("return" + wreq.u.toString().match(/\{.+\}/s)![0])();
for (const id in ids) {
const isWasm = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => t.includes(".module.wasm"));
if (!isWasm)
await wreq.e(id as any);
await new Promise(r => setTimeout(r, 150));
}
that's all u need to know
the gist i sent above also covers the basic structure of chunks and modules so that might also be of use
Thanks so much 
Successfully ported it to dms menu 
how do i edit --background so that i can use it to point to a file insted of an url?
you cant
what
I wonder why is webpack is defined globally
because lazy loaded modules?
so they can push easily
Hi its ruby
on rails?
never
The only reason why I use ruby is for writing backend code
I love the language, but its so much faster to do everything with python or javascript
is there a https://caniuse.com/ for electron versions?
oh just use https://releases.electronjs.org/releases.json to see what electron version is which chromium
for some reason I can't inspect this element, because whenever I click the inspect button this menu is gone
open devtools, press ctrl-shift-P and run Emulate a focused page
.container-2McqkF
That was the only case scenario when F8break would not work
I dont see that option hmm
is there a way to like... make Discord always do that
I do
I wanna test something
I thought the toggle devtools one lmaooo
holy its too strong
it makes gifs and stuff play even when Discord isn't focused in my other monitor
since when is this an option in chrome
desperate me be like
idk if this will go any further
just copying the album art link to test the background for now
have fun not being able to go/not having some functions on like half of the web
On Discord lol
oh
@oblique lark real
based
How to code a moving backround can someone help
In a website?
why this doesnt work?
let desc = "";
....
onChange(newValue: string) {
desc = newValue;
} // this is inside of definePluginSettings
when i try to log that value later i get nothing
fixed
nvm
import { filesystem } from "./filesystem";
let currentPath = "/home/exhq";
function ls(path) {
const directory = path === "/" ? filesystem["/"] : getPathObject(path);
if (!directory || typeof directory !== "object") {
return [];
}
return Object.keys(directory);
}
function getPathObject(path) {
const parts = path.split("/").filter(part => part !== "");
let currentDir = filesystem["/"];
for (const part of parts) {
if (currentDir.hasOwnProperty(part) && typeof currentDir[part] === "object") {
currentDir = currentDir[part];
} else {
return null;
}
}
return currentDir;
}
function getFileContent(path) {
const parts = path.split("/").filter(part => part !== "");
let currentDir = filesystem["/"];
for (const part of parts) {
if (currentDir.hasOwnProperty(part) && typeof currentDir[part] === "object") {
currentDir = currentDir[part];
} else {
return currentDir[part]; // Returns the content if it's a string
}
}
}
function cd(path) {
if (path === "..") {
// Move up to the parent directory
const parentPath = getParentPath(currentPath);
if (parentPath !== null) {
currentPath = parentPath;
}
} else {
// Move to the specified directory
const newPath = getAbsolutePath(path);
if (newPath !== null) {
currentPath = newPath;
} else {
const content = getFileContent(path);
if (typeof content === "string") {
console.log(`cd: ${path}: is a file`);
}
}
}
}
function getParentPath(path) {
const parts = path.split("/").filter(part => part !== "");
if (parts.length === 0 || path === "/") {
return null; // Already at the root directory, no parent
}
parts.pop(); // Remove the last part to move up to the parent directory
return `/${parts.join("/")}`;
}
function getAbsolutePath(path) {
if (path === "/") {
return "/";
}
const parts = path.split("/").filter(part => part !== "");
let currentDir = filesystem["/"];
for (const part of parts) {
if (currentDir.hasOwnProperty(part) && typeof currentDir[part] === "object") {
currentDir = currentDir[part];
} else {
return null; // Invalid path
}
}
return `${path}`;
}
function cat(path) {
const content = getFileContent(path);
if (typeof content === "string") {
return content;
} else {
return `cat: ${path}: is either a folder or doesnt exist `;
}
}
export function handletext(text) {
if (text.includes("cd")) {
const location = text.split(" ");
const path = location[1];
cd(path);
return "";
} else if (text === "pwd") {
return currentPath;
} else if (text.includes("cat")) {
const location = text.split(" ");
const path = location[1];
return cat(currentPath + path);
} else if (text === "ls") {
const location = text.split(" ");
const path = location[1] || "";
return ls(currentPath + path);
}
switch (text) {
case "help":
return "seek help";
default:
return "unknown command. please use \"help\"";
}
}```
this
took 5 hours
and i do not wish to redo it
my brain hurts
i want to unalive
@trail ginkgo are you proud of me :3
good job it looks fun
it is not
me when i type cat cd
Hmmm...
using Combinatorics
number_combinations = collect(permutations(1:6, 3))
function generate_combination_sets(ch::Channel, current::Array{Vector{Int}, 1}, remaining::Vector{Vector{Int}})
# Filter out combinations in remaining that have any elements in common with current
remaining = filter(remaining_combo -> !any(
current_combo -> any(
remaining_item -> remaining_item in current_combo,
remaining_combo
),
current
),
remaining
)
if isempty(remaining)
put!(ch, current)
else
@sync for combination in remaining
Threads.@spawn generate_combination_sets(ch, vcat(current, [combination]), remaining)
end
end
end
function handle_results(task::Task, ch::Channel)
while !istaskdone(task) || !isempty(ch)
result = take!(ch)
println(result)
end
end
ch = Channel{Vector{Vector{Int}}}()
task = Threads.@spawn generate_combination_sets(ch, Array{Vector{Int}, 1}(undef, 0), number_combinations)
result_handler = Threads.@spawn handle_results(task, ch)
wait(task)
wait(result_handler)
how can i delete message before sending it?
this is me trying Julia for the first time
btw, fun fact... this program will not finish unless I println(result)
for whatever fucking reason
impl <
F: HttpFactory,
> MultidownloadExecutor<F> {
async fn get_byte_range(&self, start_byte: u64, end_byte: u64, temp_dir: &str, report_speed: Sender<(u64, u64, u64)>) -> Result<(), String> {
let filename = {
let current = self.current.read().await;
if let Some(entry) = &*current {
Path::new(&entry.url)
.file_name()
.unwrap()
.to_str()
.unwrap()
.to_owned()
} else {
return Err("No current download entry".to_owned());
}
};
let url = {
let current = self.current.read().await;
if let Some(entry) = &*current {
entry.url.clone()
} else {
return Err("No current download entry".to_owned());
}
};
let path = format!("{}/{}_{}-{}.chunk", temp_dir, filename, start_byte, end_byte);
self.assure_dir_exists(&temp_dir).await?;
let mut file = OpenOptions::new()
.create(true)
.write(true)
.open(path)
.await
.map_err(|e| e.to_string())?;
let mut client = self.http_factory.lock().await;
let mut client = client.get().await;
let mut response = client
.get(&url)
.header("Range", format!("bytes={}-{}", start_byte, end_byte))
.send()
.await
.map_err(|e| e.to_string())?;
let mut time_now = std::time::Instant::now();
while let Some(c) = response.chunk().await.map_err(|e| e.to_string())? {
let size = c.len() as u64;
file.write_all(&c).await.map_err(|e| e.to_string())?;
let time_dl = time_now.elapsed().as_millis() as u64;
report_speed.send((size, time_dl, start_byte)).await.map_err(|e| e.to_string())?;
time_now = std::time::Instant::now();
}
Ok(())
}
async fn assure_dir_exists(&self, path: &str) -> Result<(), String> {
create_dir_all(path).await.map_err(|e| e.to_string())
}
}
making a chunked downloader :3
rust my beloved
memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of memory allocation of 62400624006240062400624006240062400 bytes failed
62400 bytes failed
6240062400error: process didn't exit successfully: `target\release\random_shit.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
favorite Rust error for sure
Has someone a css snippet for bigger stream previews?
[class*=streamPreview-] {
width: 504px;
}
[class*=previewContainer-] {
height: 284px;
}
oh
i was trying to get a user's super basic info without auth
by the user's id
not possible
i would just make a bot and use its token
the same way i just described very likely
oh wait bots can get basic info without having mutual server with a user right?
i forgor
u don't need a bot
yop
wow
you can enter arbitrary user ids and it just works https://widgets.vendicated.dev/
A tool to embed Discord user widgets in your site
ye
what's this for
i decided to work on WatchCord again
dunno if anyone's interested, but I made a small userscript for patching webpack (on sites other than discord): https://github.com/fun840/webpack-patcher
(btw thank you vee for the help)

worked on second try
also huh TIL there's an isStaffPersonal method on users
why is there no pronouns property on users ._.
profile api call actually returns it so weird
ok got it
it's on member, not user
i'm trying to get it working on user as well, for global profiles
how do i get a log for a discord crash
ok profile is all done, now just need to figure out in-chat override
which might require an api call, not sure if profiles are fetched in bg by discord
On desktop you can do
(await DiscordNative.processUtils.getLastCrash()).rendererCrashReason;
yea on desktop (macos), thanks
ok, seems like pronouns are not exposed in message objects so an api call will be indeed needed for that
i assume that should be safe to do if WhoReacted was deemed safe?
yes it is safe
that's how discord gets the profile to show when you click an user lol
i think based on reading other messages i should try to use GUILD_MEMBERS_REQUEST first, but how do i wait for its result
do i just wrap it in useEffect
they are in the profile, not the user
same as bio, connections, mutual guilds, badges, etc
so you have to fetch profile of every user in chat
which is kinda meh
existing badges everywhere plugin for other mods are infamous for getting u ratelimited
yea i see it's not in the GUILD_MEMBERS_REQUEST response
it may not be so bad with caching, we'll see
you still have to fetch profile for everyone in chat
imagine being in an active chat
i'll have to make the cache store pronouns as a string though bc discord's ones are free-form
you will possibly fetch hundreds of profiles
which will definitely get u rate limited
i guess so if it happens on message event, maybe there's a way to only fetch ones in view?
not sure what to do, it would be annoying to have a potential for a mismatch between in-chat and profile pronouns, so maybe in-chat would need to be disabled entirely? :/
well discords own pronouns will already show in profile
/run
import random
def vending_machine():
sodas = ["Coke", "Pepsi", "Sprite", "Dr. Pepper", "Mountain Dew"]
random_soda = random.choice(sodas)
print("Dispensing:", random_soda)
vending_machine()
Here is your py(3.10.0) output @green vessel
Dispensing: Mountain Dew
yea but i want to make it fall back to pronoundb
i already got that part down, just in-chat may be problematic

why do u wanna reset nicknames
well
long time ago i dehoisted
so maybe had 30-40k people with nicknames
there was a bot kronos a reed instance that could reset
but then them and notsobot limited it to like 1k people
auto-dehoist on join* it was bad then but there wasnt much developed yet

why is my nickname this
they usually would then leave if no response

is there a better way to compare the contents of 2 objects than JSON.stringify?
{a:1} === {a:1} is false, even when using the non-strict equality operator
so I have resorted to JSON.stringify({a:1}) === JSON.stringify({a:1})
javascript object comparisons are by reference not by value, so {a:1} !== {a:1} is normal
yes, I want a comparison by value
thats pretty much the only thing you can do to compare object values but what do you need it for
hard to phrase, I know I am not doing something right, but I would rather not refactor it
something in vue thats dumb
Worth noting that this won't actually work all of the time
since objects that probably should be equal might not be
{a: 1, b: 1} should be equal to {b: 1, a: 1}, right?
the keys in my case never change order, but thank you for the note
I wouldn't be too sure, but I guess that is why https://lodash.com/docs#isEqual exists
JSON.stringify(Object.fromEntries(Object.entries(a).sort())) === JSON.stringify(Object.fromEntries(Object.entries(b).sort())) 
(do not
and then what happens with nested objects? 🥴
const normalise = (_, value) =>
typeof value == "object"
? Object.fromEntries(Object.entries(value).sort())
: value;
const isEqual = (a, b) =>
JSON.stringify(a, normalise) === JSON.stringify(b, normalise);

in what environment?
nodejs? vencord? website?
website
your own?
yeah, one of them
install this
actually thats 10kb lol kinda bloat
this is 850 bytes
I don't like this, but for some reason the css I tried to code doesn't work
what the I was an ! for some reason
it fucking works on web but not on client, what the heck?
are there any plugins that explicitly use the discord autocomplete in options on local /commands
how can cancel sending message before it sends
same like when you use slash commands
so you only get returned message
I wanted to move the reply message bar down because it looks weird like this, but no matter what CSS I use it stays on the same place, is it even possible? I could just remove this round message bar but I kinda like it tbh
I believe this is what you need:
main[class^=chatContent] > form > * > [class^=attachedBars] {
min-height: unset !important;
position: relative;
padding-bottom: 4px;
margin: 0 0 25px 0 !important; // change the 25px value until you see it works
z-index: 0;
}
ok I will try, I removed the code from the theme but still
-18 seems to work, maybe I should change just the text a bit up but looks like it's connected
more padding then
why not just set the upper border radius to 0 when there's a reply bar above
I also tried that but keeping the mess I made but maybe its not good to put duplicated stuff
or I just made it wrong idk
my reply bar just looks horrendous atm
you put a shadow
drop shadow funni
hell
Hello! How do I do to make my plugin work? Like, where do i put the file at
You don't
The supported plugins are already in the plugins tab
Why
So i cant make my own plugin?
If you want to do that read docs in the repo
Ok
But you can't import plugins from other client mods
How did you make a plugin without knowing how to make a plugin???
ChatGPT

Boy ...
won't work
latter
there are hundreds of symbols to choose from
i found a website containing all of them lol
@cedar olive were u high https://github.com/OceanicJS/Oceanic/commit/69ed8aa5ec039e16fa6b1edf23bc4cb7e3e36465
u messed up the jsdoc
where
you flipped the tag and discriminator doc
how discord calls discriminators now
you should probably deprecate user.tag then
cause misleading name and now pointless anyway
cause it's just user.globalName
yea ive seen the term tag and discrim used interchangeably
bleh
what...
this thing
autocomplete on options
im not on vencord rn
when you type in the option (tag-name or message from your screenshot) it sends a request to the bot with your text in the option and the bot can autocomplete it
there's choices but that doesn't send a request
bot/plugin yeah
cuz these slash commands are from the message tags plugin
just being clear
ah you mean plugin name
huh
"message tags"
autocomplete options
you just said "message tags" before and i thought you meant some discord thing
leme see
so in this screenshot you specifically want this part?
the optional: ephemeral?
cuz i thought you wanted this part
the tag name option and message option
alr
what about this?
nonono
im still lost
what do you want to know about autocomplete options
there's nothing here tho
yeah
how to handle the execute
like return what
outside vencord yeah?
super h
that's something used with bots
nono
they want to know about the autocomplete feature
bots AutocompleteInteractions
vencord command api doesnt support that
pretty sure
for real time querying
for example yt searching
you type in something in the option
it sends an autocomplete interaction to the bot
I didn't even know this was a thing you could do
the bot queries the youtube api
and returns you videos with the name you typed
then you select the option there to autocomplete it
oh that's cool
where can i find in the source code what it does with what i return from execute when i get ctx.autocomplete
or what do i need to return

i hope my words aren't too sleepy to understand
autocomplete is like /tenor stuff ig
yes but no
tenor doesn't take an option
autocomplete but a different kind
autocomplete as in @steady whale's /artists command (or several others) I'm guessing
yeah i just thought of tenor first cause first to come to mind
is there a way to make it so the user info bit doesn't get smaller when the text is too long in the text area? it's really annoying
ignore all the spam in the actual chat, it's from when I was doing the stupid achievements for party mode
nvm I got it
[class^=profilePanel] {
min-width: 340px;
}```
how do i vencord support
dumb question but for custom css is there any difference between using attribute selectors for class and normal class selectors
is there a way to check if you focused discord?
With attribute selectors ([class*="thing-"]) you can match partial selectors which makes themes less prone to breakage.
with css or js
WindowStore is what u need
document.hasFocus() might work too 🤔
ye but windowStore better™️
god when will they finally fix this
it's been almost a week now
never
the what
??
I'm guessing you mean document.designMode = 'on'?
What does that look like
it just sets the entire page as content editable
so you can just click anywhere and edit all text more easily
why is it a string instead of boolean
insane html spec
consistent design
💀 didnt expect to find you here
same 💀
💀💀💀💀💀💀💀💀💀💀💀💀☠️💀💀☠️
🥺
🥺
stupid question, but is it possible to extract the album art to set as vc spotify background with css?
Remind me, is it allowed to discuss non Vencord programming here?
yes
Thank you.
And if anyone is ok with helping me understand how to make Docker container directory persist properly, I'd be grateful.
Honestly I just want to download a zip in the docker container and persist the folder in which I do that, but somehow I am messing up.
you'll need to create a volume for the docker container to store persistent files
how're you starting the container?
Lol
I think I finally fixed that, thankfully, although I wanted to use a folder as a volume without adding the volume in the run command tbh.
I have a css for removing the activities button, but when I pop up the stream window it appears anyways, I don't know why, its visible on the left side but I don't think that matters
:cooking:
NEVER TRY TO MANAGE ROLES VIA DISCORD APIS
WORST MISTAKE OF MY LIFE
const member = GuildMemberStore.getMember(VENCORD_GUILD_ID, user.id);
if (!member) return alert("Member not found");
const rolesToAdd = [DONOR_ROLE_ID];
if (data.name) {
const color = parseInt(data.color, 16);
const { id, permissions, name } = await RoleActions.createRole(VENCORD_GUILD_ID, data.name, color);
{
const opts = {
color,
description: undefined,
hoist: false,
mentionable: false,
name,
permissions,
unicodeEmoji: null
} as UpdateRoleData;
if (data.icon)
opts.icon = await getDataUrl(data.icon);
await RoleActions.updateRole(VENCORD_GUILD_ID, id, opts);
}
{
const allRoles = GuildStore.getGuild(VENCORD_GUILD_ID)!.roles;
const donorPosition = allRoles[DONOR_ROLE_ID].position;
const newPosition = donorPosition + 1;
const rolesToUpdate = Object.values(allRoles)
.filter(r => r.position <= newPosition && !r.managed)
.map(({ position, id }) => ({ id, position: position - 1 }));
rolesToUpdate.push({ id, position: newPosition });
await RoleActions.batchRoleUpdate(VENCORD_GUILD_ID, rolesToUpdate);
}
rolesToAdd.push(id);
}
await MemberActions.updateMemberRoles(
VENCORD_GUILD_ID,
user.id,
[...member.roles, ...rolesToAdd],
rolesToAdd,
[]
);
wtf is this
😭
this api is so terribly designed
they should just let u pass new position for one role and figure it out for u instead of making u recalculate position for every role
anyway now i have automated it

nice!
in discord.py i think it's ctx.guild.create_role(name=...)
and then ctx.author.add_roles(role_obj)
I'm confused... What's role position
the order of the roles in the list, like how mod is above donor is above contributor
I'm going to assume it's the order of roles but like
So confused
Maybe it's because I don't understand that code
ven did complicate it for themselves a bit though
you can just pass the one role to batchUpdateRoles (array of length 1) with the position you want it to have and the API will handle calculating the new positions for everything else
idk why they made it a different endpoint than just the normal role update, maybe because they wanted to be able to rearrange multiple roles at the same time easily
but yeah, you can just pass the new position of the one role and discord will take care of the rest for you
ven is crazy
are u sure
i put a breakpoint and discord passes like all the roles when you move one single role
i gutess for them it's easier cause they have to do it anyway for drag and drop but yeah
and i vaguely remember having to do the same ages ago in my discord bot
yeah, i double checked and tested before i replied to make sure
@dull magnet suggestion to ur css snippet in #🎨-css-snippets message
if you include [class|=userPanelOverlayBackground] it'll also work on the right panel in DMs
so like
:is([class|=userPopoutInner], [class|=userPanelOverlayBackground]) [style*="-webkit-line-clamp"] {
-webkit-line-clamp: 99999 !important;
}
should just use the line clamp class discord has
cloudburst had the good idea of just setting display: block instead of trying to mess with the line clamp
div[class*="lineClamp2Plus"] {
display: block;
}
```this works fine and applies anywhere discord uses line clamp for bios (which is the only place they use that class)
a {
color: green;
}
Why isn't my "a" thing changing on discord but it is on the settings.
wdym
try setting the css var --link-color
:root {
--link-color: green;
}```
k thx
:root {
--link-color: green;
}
Still blue
hm
i'll check once i'm at my pc
k
:root {
--text-link: green;
}```
THANK YOU
also how would I change id="message-username-1121110593512951809" (span element) the color of the text
#message-username-1121110593512951809 > [class*=username-] {
color: green;
}
The first time you sent it it worked but it only works for the first one
wiat nmv
nvm
1120408903843324064
1121110593512951809
headerText-2z4IhQ
headerText-2z4IhQ
username-h_Y3Us desaturateUserColors-1O-G89 clickable-31pE3P
username-h_Y3Us desaturateUserColors-1O-G89 clickable-31pE3P
YES it works
you can change your nickname and name color to a gradient if u want to as well
...
.headerText-2z4IhQ > [class*=username-] {
color: white;
background-image: linear-gradient(black, green);
}
Why doesn't the background change for everyone but not the text
How do I make it specific to me?
How tough
.avatar-2e8lTP[src*="559077022287265815"] ~ h3 span[class*="username-h_Y3Us"]:before {
visibility: visible;
position: relative;
margin-right: -1805px;
content: "Real Shiggy Very Real Shiggy";
background: linear-gradient(to right, #37e454, #11d8d8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
thank you
yw
this must be why the client dies when moving roles, it lags so hard
it lags so hard because every time you update the position of one role the gateway fires a role update for every single role that the position change impacts
on large enough guilds with many roles it can make the entire guild lag as it sends the events to every single active session in that guild
creating the maximum amount of roles and making a bot shuffle them periodically

members will love lag
It does :(
I have worked with 30 something role servers before
Discord gets fairly angy
can someone make me a css sniplet that makes the font in the contex menu bold?
how can you live with that
my eyes
use inspec element
||youd be able to see it if you didnt use an atrocious theme||
the horror, make the bg less bright, or don't use one that is distracting idk
not enough colors, I want to see one color for each channel, maybe add a separate background to them as well
Red circle Border and red arrows would be a great touch
how can I make the red circled part more rounded by css?
the css property is called "border-radius", just gotta find the right element to apply it on
I tried but I failed to find it
After rounded the whole profile corner, the frame is not rounded and it looks very strange
There are 3 elements you want to add border-radius to
The main background, the banner and the secondary background
let me find them real quick
.userPopoutInner-nv9Y92:before{ border-radius: var(--radius); } .roundedBanner-uNt2w-{ border-radius: var(--radius) var(--radius) 0px 0px; }
No cause I am working on it for a few mins before
- Main background
.userProfileOuter-2tQwNf {
border-radius: 8px; /* default */
}
- Banner
.roundedBanner-uNt2w- {
border-radius: 4px 4px 0 0; /* top left, top right, should be smaller than main background */
}
- Main background
.userProfileInner-1ngKnf {
border-radius: 8px 8px 0 0; /* same as before */
}
.userPopoutInner-nv9Y92:before {
border-radius: 1px; /* This part is for the bottom of the secondary background */
}
THXXXXXXX

okay so idk if im stupid cause yeah im new to css and coing in general really but
/* Online status */
div[aria-label*="Online"] .username-h_Y3Us {
color: green;
}
/* Idle status */
div[aria-label*="Idle"] .username-h_Y3Us {
color: orange;
}
/* Do Not Disturb status */
div[aria-label*="Do Not Disturb"] .username-h_Y3Us {
color: red;
}
/* Offline status */
div[aria-label*="Offline"] .username-h_Y3Us {
color: gray;
}
what im trying to do is if the user is offline, idle ect.. it will change their username colour to match the corresponding presence, im sure if its possible in css or yeah idk
i know the colours arent the correct ones ill fix them later
/* Online */
[class*=avatarWrapper-][class*=withTagAsButton-]:has(rect[fill="#23a55a"], rect[fill="rgba(35, 165, 90, 1)"]) [class*=nameTag-] > div > div {
color: #a6da95;
}
/* Idle */
[class*=avatarWrapper-][class*=withTagAsButton-]:has(rect[fill="#f0b232"], rect[fill="rgba(240, 178, 50, 1)"]) [class*=nameTag-] > div > div {
color: #eed49f;
}
/* DND */
[class*=avatarWrapper-][class*=withTagAsButton-]:has(rect[fill="#f23f43"], rect[fill="rgba(242, 63, 67, 1)"]) [class*=nameTag-] > div > div {
color: #c55667;
}
/* Invisible */
.container-YkUktl:has(.avatar-1EWyVD[aria-label*="Invisible"]) .avatar-1EWyVD > svg > foreignObject, .container-YkUktl:has(.avatar-1EWyVD[aria-label*="Invisible"]) .title-338goq, .container-YkUktl:has(.avatar-1EWyVD[aria-label*="Invisible"]) .subtext-2HDqJ7 {
filter: brightness(0.5);
color: var(--text-muted);
}
We love CSS.
^^^
it worked for me so i sent it
Are you on a browser, Vencord desktop, or the official client?
desktop
Hmm.
i was just trying to change username to it
not in servers
but in dms and friwnds list ect...
DMS as in messages sent?
so not the user container
yea
Hmm. The platform indicators plugin seems to be of assistance here. I would've done some voodoo black magic fuckery selectors to do it.
could you help explain what i did wrong in the code i sent too if thats not a hastle
I'm not on PC so I can't check what the HTML looks like rn unfortunately.
i know
- is to match anything containing
^ is to match starting with
The username itself doesnt contain the online statuses
Get markdown'd.
first is asterisk
oh?
The only reason my snippet worked because the container having the name had online statuses
thats why I put has:(rect(status fill))
The platform indicators themselves can change color, which made me think they are basically just white canvas with different fills
oh?
i saw that but i just glanced over it
so setting your username to its color might also be not viable
sorry i couldnt help
I mean, theres one dirty way of doing it which is to change color of your name every time you switch status by manually switching colors in the quickcss 
thats just
alot of effort, ill take it as a learning curve and try to better my understanding
what i was doing is quite pointless either way
that is me with the spotify wave thing

i could have spent 2 months doing something better
but instead i took on learning css
i mean im still in shool, ill get to css/html or web development next term i think
tho the spotify thing is cool
worth the time and effort
ours are kinda sucky too ngl
only a hour? is there no like computing club
no
well that sucks
did u figure it out yet
i did not no
it's possibly if you have platform indicators
im not very good
likely not possible if u don't
but why do u even want to recolour names, role colours will explode
i just want to recolour in dms list, dms and friend list
i just wanted to take the time to try learning css better
progress my knowledge in coding
select the parent container, add :has and match the platform indicator with this (or find something else in the tree that has the status and use that)
no way role colors nowhere
div[class*=nameAndDecorators-]:has(span[class*=vc-platform-indicator] > svg[fill="var(--green-360"]) {
color: #a6da95;
}
div[class*=nameAndDecorators-]:has(span[class*=vc-platform-indicator] > svg[fill="var(--yellow-300"]) {
color: #eed49f;
}
div[class*=nameAndDecorators-]:has(span[class*=vc-platform-indicator] > svg[fill="var(--red-400"]) {
color: #c55667;
}
give me a sec I'll check
yeahhh it works
but the colours seem to be off and also it doesnt work for bots (which is understandable)
okay correct me if im misunderstanding
- div - targets div elements containing nameAndDecorators
- has: - searches for svg with fill and vc-platform-indicator
for a basic summary
catppuchin colors
just replace the color with the variable in the selectors and youre good to go
not really, :has can also contain classes, spans and headers
yes true but i wanted to summerise without going into vast detail
if you open up the devtools, you will see for each element you will require div
it which case its ok to omit the div, but in cases where the leading element is not div you will have to specify
()has:
mobile status is an svg so you have to specify it
in which case that would be
this is so difficult to grasp
im sorry if im hard to work with
nah its fine, everyone is learning
say, your element A is a svg, so you will write {whatever container that has A}:has(svg[class*=class of A][fill="fill of A"]) {specific element you want to color} { style };
if A is now a div, replace the svg in that code with div
yes, i can kinda understand
mhm
so then
div[class*=blahblah-]
or ^ if it begins with
i think im getting a better grasp
thank you for the help <3
usually I would not use ^ since it can break, even though some say * makes the system slow (no citations given)
if it is a div, its generally save to omit the preselector div and just go with [class*=blahblah-]
is this good? https://getquick.link/
it looks pretty cool
@woven lion you should add a /detect or /ocr command to tesser that just gives u the text in an image
sure u can just use debug message but its not intuitive
oki
did it error with empty message
if its null??







