#🧩-plugin-development

1 messages · Page 24 of 1

dull magnet
#

@austere mauve sooo

#

i can not only add you without your consent

#

i can also

austere mauve
#

lmao

dull magnet
#

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?

austere mauve
#

true actually

#

idk if theres docs on this

dull magnet
#

oh this is a setting

#

btw we should probably use branches and pr after initial setup done

#

so we don't get conflict explosion

austere mauve
#

ye

dull magnet
#

also if u wanna change any of the configs or stuff go ahead

#

i just added smth basic to get started bleh

#

obscure formatter noone has ever heard of soon 🔥

austere mauve
#

........

#

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

austere mauve
#

@dull magnet is $TERM set in windows

dull magnet
#

uh

#

probably not bleh

#

why

#

what u tryna do

austere mauve
#

colors

dull magnet
#

i can check in a bit but also i have kinda atypical setup 🔥

dull magnet
austere mauve
#

I think the new terminal might set it

#

or do I just always use basic colors if the output is not being piped

dull magnet
#
austere mauve
#

it checks term

dull magnet
#

nah

#

it checks a lot of stuff

#

just add it tbh it's pretty small and dependencyless

#
#

unlike the average sindre package this one isn't actually bloated

#

🚒

austere mauve
#

supports-color is literally theirs lol

dull magnet
#

yeah lmao

austere mauve
#

fake dependencyless

dull magnet
#

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 bleh

austere mauve
#

adding electron soon

dull magnet
#

LOL i read the first line as "fuck your open source dependencies"

#

like on the very top

austere mauve
#

true

dull magnet
#

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

austere mauve
#

its fine making color stuff isnt that hard

dull magnet
#

yes but kinda a chore

#

especially cross platform colour support detection

solemn star
#

ansi-colors better

dull magnet
austere mauve
#

I already use NO_COLOR which is sorta standardised

dull magnet
#

idk that's what i would do

dull magnet
# solemn star ansi-colors better
#

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).

trim igloo
dull magnet
#

hmm

dull magnet
dull magnet
#

🚀

austere mauve
#

nop

tight pecan
viral roost
dull magnet
#

wow this one is like minimum bloat, 5kb before minify

#

i'd just use that

dull magnet
#

i think esbuild actually supports it fine but if they use esm features like top level await it will explode

tight pecan
#

interesting

#

good to know

dull magnet
#

because there's no good way to do top level await in commonjs

tight pecan
#

yeah

dull magnet
#

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

tight pecan
#

just not other way around

dull magnet
#

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

tight pecan
#

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

dull magnet
#

why not just ship both?

#

it's fairly trivial and 0 extra effort after minor setup

tight pecan
#

¯_(ツ)_/¯

dull magnet
proud parrotBOT
tight pecan
#

dont care enough lol

dull magnet
#

this is all that's needed

tight pecan
#

noted

dull magnet
#

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

dull magnet
#

ye

#

but esbuild can't build declaration files

proud parrotBOT
#

**tsup.config.ts: **

import { defineConfig } from "tsup";

export default defineConfig({
    entry: ["src/index.ts"],
    format: ["cjs", "esm"],
    dts: true,
});

oblique lark
#

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;
  }
}
worldly oxideBOT
#

Here is your c++(10.2.0) output @oblique lark

std::get: wrong index for variant
dull magnet
#

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;
  }
}
worldly oxideBOT
#

@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
dull magnet
#

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;
  }
}
worldly oxideBOT
#

@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
dull magnet
#

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;
  }
}
worldly oxideBOT
#

Your c++(10.2.0) code ran without output @dull magnet

dull magnet
#

blehhh

#

thats so silly

oblique lark
#

it's like a union but worse

austere mauve
#

I love overengineering cli tools (but it pretty ... pleadey)

azure mason
#

i almost forgot how much i hate ci

austere mauve
#

response type inferred from url trolley

#

i love abusing string interpolation in types

austere mauve
knotty gyro
#

oh i looked at losevka and there were too many zip files

#

this is what i want hypercatvibe

austere mauve
knotty gyro
#

i only got the thin font tho

#

it looks way thinner than yours

#

lemme try it

#

doesnt wanna work

#

:(

austere mauve
#

try Iosevka Term Regular

knotty gyro
viral tiger
#

ancient software

dull magnet
#

the latest jre can be obtained from sun microsystems

hollow flame
#

incredible

#

I'll continue to grab the Eclipse version

austere mauve
#

The latest ECMAScript runtime environment can be obtained from SUN Microsystems

azure mason
#

yall sleeping on this font

viral roost
#

comiccode?

azure mason
#

yaya

hollow flame
#

I'll stick to good ol' Fira Code tyvm

tight epoch
#

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)

flint oxide
tight epoch
#

It's the favourites server, and I have channels and dms/gdms in separate categories

flint oxide
#

I see

#

I unironically need more css snippets

#

To yoink

tight epoch
#

I should turn some more of my stuff into snippets for that

flint oxide
#

I'm trying to keep my quick css to under 1k lines lol

tight epoch
#

Mine's at like 1.7k since I basically just put my entire custom theme in there lol

tight epoch
#

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

hollow flame
#

wat

#

you can change a GitHub Gist

#

wat

tight epoch
#

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

hollow flame
#

now I get what you mean

#

feedback loop stuff

tight epoch
#

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

flint oxide
#

How can I do it

#

I know nothing about GitHub trolley

#

Tried to create a repo the other day but got back error after error

#

So I gave up

flint oxide
#

My current thing at almost
1.1k lines

#

But I want to reduce it further

tight epoch
tight epoch
tight epoch
# flint oxide

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

flint oxide
#

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

tight epoch
tight epoch
flint oxide
#

Some are hard coded yeah

tight epoch
#

Huh, well that's another reason for me to stick to modded then Thumsup

flint oxide
#

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

tight epoch
#

I probably used the term incorrectly tbh, but I meant as in it not being able to be edited

flint oxide
#

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

tight epoch
flint oxide
#

That was yoinked from :3

#

but I no longer use it lol

tight epoch
#

I mean if you managed to make even a single change to it, then you did do css lol

flint oxide
#

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

tight epoch
#

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

tight epoch
flint oxide
#

Only radius statuses missing and my theme looks pretty good to use

tight epoch
#

Radius statuses?

flint oxide
#

I love radial statuses, they look much cleaner

#

Like this

tight epoch
#

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

chrome elbow
flint oxide
#

I will most likely set the discord language to English anyway, Vencord doesn't support other languages yet

tight epoch
#

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

flint oxide
chrome elbow
#

😭

tight epoch
#

Aliucord noooooo

flint oxide
#

Based client

tight epoch
#

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

flint oxide
#

Compared to Aliu

#

Vendetta is so laggy lol

#

And doesn't have my fav theme

tight epoch
#

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)

tight epoch
flint oxide
#

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

tight epoch
# flint oxide Vendetta is so laggy lol

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

flint oxide
#

So Aliucord developed by Ven

tight epoch
tight epoch
#

Real

flint oxide
#

Material You is one of the greatest achievements in Android

hollow flame
tight epoch
flint oxide
tight epoch
flint oxide
#

There are only 4 you can choose in android 12

#

But that number goes up to 16 in A13

hollow flame
tight epoch
flint oxide
#

True lmao

hollow flame
tight epoch
#

It just throws shit at the wall until somethin sticks lmao

flint oxide
#

4 schemes

tight epoch
#

For Material You

hollow flame
#

I don't think that's true

flint oxide
#

4 schemes per background

hollow flame
#

Hmmm

#

Maybe

#

I'm using Android 13 so who knows

flint oxide
#

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

tight epoch
#

Actually maybe some of the other themes it's showing me are based on the wallpapers I have it switch to in different modes?

hollow flame
tight epoch
#

Wait now I gotta check if I can have the colour palletes change with different modes

flint oxide
#

Maybe Samsung one UI calculates the color schemes a bit differently I suppose

tight epoch
#

Yeah maybe OneUI does it differently

#

Whichever way wehhhhh I can't have different colour palletes for different modes

cinder basin
#

first one was in lollipop

eternal lion
#

Material you is only present in material design 3.

cinder basin
#

maybe so

eternal lion
#

(Which is android 12+)

cinder basin
#

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

viral roost
#

material you is material 3

#

or maybe you are right nvm

#

didnt read that properly

eternal lion
#

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

flint oxide
#

is it possible to make these 2 options completely disappear

ionic breach
#

Use the aria label

azure mason
#
div[aria-label="Servers"] + div, div[aria-label="Servers"] + div + div {
    display: none;
}```
flint oxide
#

Thanks!

flint oxide
#

curved borders look so nice aaaaaa

cinder basin
#

agree

#

sorta

rocky compass
#

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?)

dull magnet
rocky compass
#

Huh, I guess I must have just done it wrong

#

Thanks, that's a big help

visual mortar
rocky compass
# dull magnet it's just plain webpack, it will work on any site using webpack

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
  ]
)
rocky compass
#

tysm

dull magnet
#

webpackJsonp is older webpack

#

that works differently

rocky compass
#

ah, alright

#

I'll try do some research on my own, ty

dull magnet
proud parrotBOT
dull magnet
#

and doesn't care what the webpack instance is named

rocky compass
#

yeah, the userscript works perfectly

dull magnet
#

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

rocky compass
#

huh, cool

#

in the past I was just reading 'compiled' code and manually looking for stuff I could intercept

dull magnet
#

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

rocky compass
#

ah, I see

#

this has been a big help

dull magnet
proud parrotBOT
# dull magnet https://github.com/Vendicated/WebpackGrabber/blob/main/WebpackGrabber.user.js#L2...

**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;
},
dull magnet
#

there's a bunch more than these but they're not particularly useful other than maybe force loading all modules

dull magnet
proud parrotBOT
# dull magnet which can be done like this https://github.com/Vendicated/Vencord/blob/main/scri...

**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));
    }
dull magnet
#

bleh 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

rocky compass
#

Thanks so much SCWEEE

tight epoch
sacred yew
#

how do i edit --background so that i can use it to point to a file insted of an url?

chrome elbow
#

you cant

viral roost
#

you cant

#

if you want to make sure the url never dies you could use a data/ url

storm briar
#

guys how do i make print["Hello, world!"] work

#

it keeps giving a error

viral roost
#

what

potent fox
#

because lazy loaded modules?

#

so they can push easily

quasi abyss
#

Hi its ruby

cedar marsh
#

on rails?

quasi abyss
#

never

cedar marsh
#

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

cedar marsh
flint oxide
#

for some reason I can't inspect this element, because whenever I click the inspect button this menu is gone

silk sorrel
#

open devtools, press ctrl-shift-P and run Emulate a focused page

chrome elbow
#

.container-2McqkF

hollow flame
#

ngl I thought this was what F8Break was for

#

but guess not

flint oxide
hollow flame
#

hmm

#

"Emulate a focused page"

flint oxide
#

I dont see that option hmm

hollow flame
#

is there a way to like... make Discord always do that

#

I do

#

I wanna test something

flint oxide
#

I thought the toggle devtools one lmaooo

hollow flame
#

omg

#

now if only I could make it do that all the time

flint oxide
#

holy its too strong

hollow flame
#

it makes gifs and stuff play even when Discord isn't focused in my other monitor

silk sorrel
#

since when is this an option in chrome

hollow flame
#

I disabled JavaScript

#

that was a great idea

flint oxide
#

desperate me be like

flint oxide
#

idk if this will go any further

#

just copying the album art link to test the background for now

storm briar
storm briar
#

oh

flint oxide
#

@oblique lark real

oblique lark
#

based

knotty gyro
#

i made a c# plugin system for fun

bold idol
#

How to code a moving backround can someone help

knotty gyro
tough oar
#

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

shadow ruin
#
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

trail ginkgo
#

good job it looks fun

shadow ruin
#

it is not

austere mauve
#

me when i type cat cd

hollow flame
#

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)
tough oar
#

how can i delete message before sending it?

hollow flame
#

this is me trying Julia for the first time

hollow flame
#

for whatever fucking reason

hollow flame
stray imp
#

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

waxen siren
#

rust my beloved

hollow flame
#
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

stuck rampart
#

Has someone a css snippet for bigger stream previews?

chrome elbow
signal juniper
#

gm

#

does anyone know discord endpoint to get basic user info

signal juniper
#

i was trying to get a user's super basic info without auth

#

by the user's id

viral roost
#

dont think there's anything more basic than that

#

might be wrong tho

signal juniper
#

oh

#

hmmmm

signal juniper
#

oh

dull magnet
#

i would just make a bot and use its token

dull magnet
signal juniper
#

oh wait bots can get basic info without having mutual server with a user right?

dull magnet
#

yes

#

anyone can do that

signal juniper
#

i forgor

dull magnet
#

u don't need a bot

signal juniper
#

i havent used discord api in a very long time

viral roost
dull magnet
signal juniper
#

gotcha

#

do you have a bot acc to get info ig

dull magnet
#

ye

signal juniper
#

oke

#

guess ill set up a vps to run a webserver for myself

dull magnet
#

what's this for

signal juniper
rocky compass
#

(btw thank you vee for the help)

green vessel
#

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

green vessel
#

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

ionic breach
green vessel
#

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?

cedar olive
#

yes it is safe

#

that's how discord gets the profile to show when you click an user lol

green vessel
#

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

dull magnet
#

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

green vessel
#

yea i see it's not in the GUILD_MEMBERS_REQUEST response

#

it may not be so bad with caching, we'll see

dull magnet
#

you still have to fetch profile for everyone in chat

#

imagine being in an active chat

green vessel
#

i'll have to make the cache store pronouns as a string though bc discord's ones are free-form

dull magnet
#

you will possibly fetch hundreds of profiles

#

which will definitely get u rate limited

green vessel
#

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? :/

dull magnet
#

well discords own pronouns will already show in profile

green vessel
#

/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()
worldly oxideBOT
#

Here is your py(3.10.0) output @green vessel

Dispensing: Mountain Dew
green vessel
#

i already got that part down, just in-chat may be problematic

dull magnet
dry talon
#

is this stupid

#

there is no bot that does it

#

i had no choiceeeee

dull magnet
#

why do u wanna reset nicknames

dry talon
#

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

dull magnet
#

good riddance

dry talon
#

english tranlation Af to Of

#

sorry idk where to post

cedar marsh
#

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})

viral roost
#

javascript object comparisons are by reference not by value, so {a:1} !== {a:1} is normal

cedar marsh
#

yes, I want a comparison by value

austere mauve
#

thats pretty much the only thing you can do to compare object values but what do you need it for

cedar marsh
#

hard to phrase, I know I am not doing something right, but I would rather not refactor it

#

something in vue thats dumb

hollow flame
#

since objects that probably should be equal might not be

#

{a: 1, b: 1} should be equal to {b: 1, a: 1}, right?

cedar marsh
#

the keys in my case never change order, but thank you for the note

hollow flame
cedar marsh
#

that seems very usefull

#

I will keep that in mind for the future

austere mauve
#

(do not

hollow flame
austere mauve
dull magnet
#

nodejs? vencord? website?

cedar marsh
#

website

dull magnet
#

your own?

cedar marsh
#

yeah, one of them

dull magnet
#
#

install this

#

actually thats 10kb lol kinda bloat

#

this is 850 bytes

untold briar
#

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?

jagged dune
#

big smart

#

I don't see what typo it fixed

jagged dune
#

are there any plugins that explicitly use the discord autocomplete in options on local /commands

ionic breach
#

Whar

#

Like message tags?

#

I'm not sure if it auto completes tho

tough oar
#

how can cancel sending message before it sends

#

same like when you use slash commands

#

so you only get returned message

untold briar
#

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

flint oxide
untold briar
#

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

flint oxide
#

more padding then

silk sorrel
#

why not just set the upper border radius to 0 when there's a reply bar above

untold briar
#

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

flint oxide
#

my reply bar just looks horrendous atm

untold briar
#

you put a shadow

flint oxide
#

drop shadow funni

untold briar
#

hell

flint oxide
#

fun

#

everything drop trolley

green vessel
#

Hello! How do I do to make my plugin work? Like, where do i put the file at

ionic breach
#

The supported plugins are already in the plugins tab

green vessel
green vessel
ionic breach
#

If you want to do that read docs in the repo

green vessel
#

Ok

ionic breach
#

But you can't import plugins from other client mods

opal fern
ionic breach
#

I was imagining a hypothetical unwritten plugin

#

Dunno

chrome elbow
opal fern
dull magnet
#

won't work

flint oxide
#

which symbol would fit the about me and discord member since section the best

ionic breach
#

latter

flint oxide
#

there are hundreds of symbols to choose from

#

i found a website containing all of them lol

dull magnet
#

u messed up the jsdoc

cedar olive
#

where

dull magnet
#

you flipped the tag and discriminator doc

cedar olive
#

LOL

#

maybe it was donovan

#

the discriminator doc is right

dull magnet
#

what's a Discord tag

#

the discriminator is the discriminator

cedar olive
#

how discord calls discriminators now

dull magnet
#

you should probably deprecate user.tag then

#

cause misleading name and now pointless anyway

#

cause it's just user.globalName

cedar olive
ionic breach
#

yea ive seen the term tag and discrim used interchangeably

dull magnet
#

bleh

jagged dune
#

this thing

#

autocomplete on options

#

im not on vencord rn

ionic breach
#

like this right

#

or

#

is that what you're talking about?

jagged dune
#

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

ionic breach
#

bot/plugin yeah

#

cuz these slash commands are from the message tags plugin

#

just being clear

jagged dune
#

ah you mean plugin name

ionic breach
#

huh

jagged dune
#

"message tags"

ionic breach
#

yea

#

what are you talking about then

jagged dune
#

autocomplete options

#

you just said "message tags" before and i thought you meant some discord thing

ionic breach
#

ohh

#

yeah you asked for a plugin that does this

jagged dune
#

leme see

ionic breach
#

and i said message tags thinking maybe that's what you were looking for

#

oki

jagged dune
#

nah it isn't it

#

that plugin just creates more slash commands

ionic breach
#

the optional: ephemeral?

#

cuz i thought you wanted this part

#

the tag name option and message option

#

alr

#

what about this?

ionic breach
#

im still lost

jagged dune
#

look above it

#

uh

ionic breach
#

?

cedar olive
#

what do you want to know about autocomplete options

ionic breach
#

there's nothing here tho

jagged dune
#

yeah

ionic breach
#

??

#

nookies will understand

jagged dune
#

like return what

cedar olive
#

outside vencord yeah?

jagged dune
#

inside

#

are there plugins that use it

cedar olive
#

oh

#

I dont think so

jagged dune
#

super h

cedar olive
#

that's something used with bots

dull magnet
#

wha

#

there's a bunch of plugins using execute

cedar olive
#

nono

#

they want to know about the autocomplete feature

#

bots AutocompleteInteractions

#

vencord command api doesnt support that

#

pretty sure

dull magnet
#

what even is the point of auto complete

#

i never got it

#

options already exist

cedar olive
#

for real time querying

#

for example yt searching

#

you type in something in the option

#

it sends an autocomplete interaction to the bot

ionic breach
#

I didn't even know this was a thing you could do

cedar olive
#

the bot queries the youtube api

#

and returns you videos with the name you typed

#

then you select the option there to autocomplete it

dull magnet
#

oh that's cool

jagged dune
#

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

amber mantle
#

autocomplete is like /tenor stuff ig

jagged dune
#

tenor doesn't take an option

#

autocomplete but a different kind

grim hare
#

autocomplete as in @steady whale's /artists command (or several others) I'm guessing

amber mantle
#

yeah i just thought of tenor first cause first to come to mind

pastel sail
#

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;
}```
elfin latch
#

how do i vencord support

dense pine
#

dumb question but for custom css is there any difference between using attribute selectors for class and normal class selectors

gritty palm
#

is there a way to check if you focused discord?

brisk gorge
dull magnet
#

WindowStore is what u need

crude iron
#

document.hasFocus() might work too 🤔

dull magnet
#

ye but windowStore better™️

#

god when will they finally fix this

#

it's been almost a week now

mint fable
#

never

earnest perch
#

Wheres the godmode script

#

That u can put in dev consoles

ionic breach
#

the what

viral roost
#

??

wanton matrix
#

I'm guessing you mean document.designMode = 'on'?

ionic breach
grim hare
#

it just sets the entire page as content editable

#

so you can just click anywhere and edit all text more easily

ionic breach
#

Oh

#

Neat

potent fox
dull magnet
timid hinge
mint fable
hard lance
slow charm
#

💀💀💀💀💀💀💀💀💀💀💀💀☠️💀💀☠️

flint oxide
#

🥺

jagged dune
#

🥺

flint oxide
#

stupid question, but is it possible to extract the album art to set as vc spotify background with css?

dull magnet
#

no

#

js needed

flint oxide
#

ty ven

spice locust
#

Remind me, is it allowed to discuss non Vencord programming here?

viral roost
#

yes

spice locust
#

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.

grim hare
#

you'll need to create a volume for the docker container to store persistent files

#

how're you starting the container?

dull magnet
#

in the balls

#

nvm i thought u said storing

hybrid dune
#

Lol

spice locust
untold briar
#

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

dull magnet
#

ill find it eventually

#

finally

ionic breach
#

:cooking:

dull magnet
#

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

#

😭

ionic breach
#

(im so glad the discord python library handles this for my bot)

#

(fear)

dull magnet
#

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

ionic breach
#

nice!

#

in discord.py i think it's ctx.guild.create_role(name=...)

#

and then ctx.author.add_roles(role_obj)

hollow flame
#

I'm confused... What's role position

grim hare
#

the order of the roles in the list, like how mod is above donor is above contributor

ionic breach
#

probably where roles are in this lineup?

#

yeah

hollow flame
#

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

grim hare
#

ven did complicate it for themselves a bit though

grim hare
#

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

cedar olive
#

ven is crazy

dull magnet
#

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

grim hare
dull magnet
#

bleh silly, but im gonna leave it this way now

#

already works so no point changing

quaint cipher
#

@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;
}
grim hare
#

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)
green vessel
#

a {
color: green;
}
Why isn't my "a" thing changing on discord but it is on the settings.

viral roost
#

wdym

green vessel
#

Like for links

#

It only does the green here

indigo meadow
#

try setting the css var --link-color

green vessel
#

k

indigo meadow
#
:root {
    --link-color: green;
}```
green vessel
#

k thx

green vessel
indigo meadow
#

hm
i'll check once i'm at my pc

green vessel
#

k

drowsy chasm
green vessel
green vessel
#

also how would I change id="message-username-1121110593512951809" (span element) the color of the text

indigo meadow
green vessel
#

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

flint oxide
#

you can change your nickname and name color to a gradient if u want to as well

green vessel
#

...
.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?

flint oxide
#

for example i see u like this now

green vessel
#

How tough

flint oxide
#
.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;
    
}
green vessel
#

thank you

flint oxide
#

yw

green vessel
#

But how do I just make it so its always my name to any server?

#

nvm its fine

cedar olive
grim hare
#

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

dull magnet
#

members will love lag

ionic breach
#

I have worked with 30 something role servers before

#

Discord gets fairly angy

wide parrot
#

i should sponsor for custom role

#

add another one to the mess

sacred yew
#

can someone make me a css sniplet that makes the font in the contex menu bold?

drowsy chasm
#

how can you live with that

hollow flame
#

my eyes

amber mantle
#

use inspec element smil ||youd be able to see it if you didnt use an atrocious theme||

untold briar
#

the horror, make the bg less bright, or don't use one that is distracting idk

flint oxide
#

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

thorny scaffold
#

how can I make the red circled part more rounded by css?

gentle marten
thorny scaffold
#

After rounded the whole profile corner, the frame is not rounded and it looks very strange

gentle marten
#

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

thorny scaffold
#

No need now

#

I have found them

gentle marten
#

damn im too slow

#

might as well finish what I was typing

thorny scaffold
#

.userPopoutInner-nv9Y92:before{ border-radius: var(--radius); } .roundedBanner-uNt2w-{ border-radius: var(--radius) var(--radius) 0px 0px; }

thorny scaffold
gentle marten
#
  1. Main background
.userProfileOuter-2tQwNf {
  border-radius: 8px; /* default */
}
  1. Banner
.roundedBanner-uNt2w- {
  border-radius: 4px 4px 0 0; /* top left, top right, should be smaller than main background */
}
  1. 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 */
}
gentle marten
green vessel
#

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

flint oxide
#
/* 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);
}
brisk gorge
#

We love CSS.

flint oxide
#

^^^

green vessel
#

i know you're trying to help but i still dont understand

#

neither did it work

flint oxide
#

it worked for me so i sent it

brisk gorge
green vessel
#

desktop

brisk gorge
#

Hmm.

flint oxide
green vessel
#

i was just trying to change username to it

#

not in servers

#

but in dms and friwnds list ect...

brisk gorge
#

DMS as in messages sent?

green vessel
#

username but not the @ in brackets

#

so yes, ones sent

flint oxide
#

so not the user container

green vessel
#

yea

flint oxide
#

:(

#

sry

brisk gorge
# green vessel

Hmm. The platform indicators plugin seems to be of assistance here. I would've done some voodoo black magic fuckery selectors to do it.

green vessel
#

could you help explain what i did wrong in the code i sent too if thats not a hastle

brisk gorge
#

I'm not on PC so I can't check what the HTML looks like rn unfortunately.

green vessel
#

i know

  • is to match anything containing
    ^ is to match starting with
flint oxide
#

The username itself doesnt contain the online statuses

brisk gorge
#

Get markdown'd.

flint oxide
#

The only reason my snippet worked because the container having the name had online statuses

#

thats why I put has:(rect(status fill))

green vessel
#

i see

#

😭

#

but yeah

flint oxide
#

The platform indicators themselves can change color, which made me think they are basically just white canvas with different fills

green vessel
#

oh?

flint oxide
green vessel
#

i saw that but i just glanced over it

flint oxide
#

so setting your username to its color might also be not viable

green vessel
#

well that sucks

#

thank you for the help though

flint oxide
#

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 trolley

green vessel
#

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

flint oxide
#

that is me with the spotify wave thing

green vessel
flint oxide
#

i could have spent 2 months doing something better

#

but instead i took on learning css

green vessel
#

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

flint oxide
#

You got programming in your school?

#

Talking about privileges

green vessel
#

LMAO

#

im british after all

flint oxide
#

our computers were stuck in win xp

#

cant do shit

green vessel
#

ours are kinda sucky too ngl

flint oxide
#

we were lucky to have 1 hour of pc lab a week

#

probably less

green vessel
#

only a hour? is there no like computing club

flint oxide
#

no

green vessel
#

well that sucks

dull magnet
green vessel
#

i did not no

dull magnet
#

it's possibly if you have platform indicators

green vessel
#

im not very good

dull magnet
#

likely not possible if u don't

green vessel
#

i do

dull magnet
#

but why do u even want to recolour names, role colours will explode

green vessel
#

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

dull magnet
#

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)

austere mauve
#

no way role colors nowhere

green vessel
#

time to ask google what any of that means

flint oxide
#

@green vessel

#

something like this ?

green vessel
#

yeah

#

exactly like that

#

idk I just thought it would've been visually appealing

flint oxide
#
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;
}
green vessel
#

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

flint oxide
#

just replace the color with the variable in the selectors and youre good to go

green vessel
#

i see

#

thank you for the help its truly really appretiated

flint oxide
green vessel
#

yes true but i wanted to summerise without going into vast detail

flint oxide
#

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

green vessel
#

i selected the mobile status

flint oxide
#

mobile status is an svg so you have to specify it

green vessel
#

in which case that would be

#

this is so difficult to grasp

#

im sorry if im hard to work with

flint oxide
#

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

green vessel
#

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

flint oxide
#

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-]

green vessel
#

i see

#

that makes sense

dull magnet
#

it looks pretty cool

dull magnet
#

@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

woven lion
#

oki

dull magnet
#

genius idea

green vessel
#

ven so smart and cool and cute

#

everyone be like ven

woven lion
#

@dull magnet

#

</ocr:1121915795862192159>

dull magnet
#

killed it already

woven lion
#

oh

#

why does it have a content type parameter

dull magnet
#

did it error with empty message

woven lion
#

if its null??

dull magnet
#

wdym

woven lion
#

sorry discord docs says it gives me content type of the attachment

#

but its undefined

dull magnet
#

lolol

#

silly

woven lion
#

uggg

#

how do i reliably check then