#🧩-plugin-development

1 messages · Page 44 of 1

dull magnet
#

why not pr it to the oneko repo as an option

#

tbh idk if they want that

#

but worth a shot

rocky rune
#

eh, if no one wants it, that's fine, just made it for myself

dull magnet
#

that's not at all what i said

frigid bay
#

lol

frigid bay
#

could just be an option which is disabled by default

#

im certain some ppl would unironically use that

steady knot
#

I just wish you could grab and place oneko wherever and click to activate follow rodent mode

rocky rune
#

trying to figure out how to add options into vencord plugins, then I'll do a new pr with it as an option

tulip slate
#

hi ! i'm interesting in doing my own vencord plugin, but i didnt quite understood how to patch discord automatically at each plugin code update, i get the Ctrl+R part to reload discord, but not the part of telling vencord "hey you should automatically rebuild and reinstall at each modification"

viral roost
#

just run pnpm watch, and it'll automatically rebuild vencord every time you save a file

#

then you can reload discord and it works

tulip slate
#

yes but how to replace standard vencord install with my own

viral roost
#

with pnpm inject

#

that only needs to be done once not after every change

tulip slate
#

oooh i just found out looking in package json

#

thanks !!

turbid nest
#

can someone help me pls

rocky rune
#

I feel like I'm doing this wrong lol, this does work when toggled, but requires a client reload

jagged briar
frigid bay
pure temple
#

(vee didn't seem to agree though)

austere mauve
#

.then(src => Function("coinsEnabled", src)(settings.store.coinsEnabled))

#

troll

dull magnet
#

im indifferent

green vessel
#

yo, do y'all think there would be a way to create a vencord plugin that adds a custom badge to your profile? I made one but what it does is replace your boost badge instead of making a new one and it doesn't work with custom image links, only with official Discord assets

pure temple
#

oh i forgot about donor badges

#

everything i said was wrong, i'm having a 3am brain and it's not 3am

amber basin
#

hey im doing aoc late and i cant figure out wtf is wrong

#

the example works but the actual one doesnt

#
use crate::clap::{Args, InputType};

static EXAMPLE_INPUT: &str = include_str!("../../../inputs/1/example.txt");
static REAL_INPUT: &str = include_str!("../../../inputs/1/input.txt");

fn get_input(args: &Args) -> &'static str {
    match args.input {
        InputType::Example => EXAMPLE_INPUT,
        InputType::Final => REAL_INPUT,
    }
}

const NUMS: [&str; 9] = [
    "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
];

fn replace(line: &str) -> String {
    let mut new_line = String::from("");
    let chars: Vec<&str> = line.split("").collect();
    for _char in chars.iter() {
        new_line = new_line + _char;
        for (i, el) in NUMS.iter().enumerate() {
            new_line = new_line.replace(el, &(i + 1).to_string())
        }
    }
    return new_line.to_owned();
}
fn num(line: String) -> i32 {
    let chars: Vec<&str> = line.split("").collect();
    let digits: Vec<i32> = chars.iter().filter_map(|c| c.parse::<i32>().ok()).collect();
    let mut num = 0;
    for (i, digit) in digits.iter().enumerate() {
        if i == 0 || i == digits.len() - 1 {
            num = (num * 10) + digit;
        }
    }
    return num;
}

pub fn day1(args: &Args) -> String {
    let contents = get_input(&args);
    let mut number = 0;
    for line in contents.lines() {
        println!("{}", line);
        let new_line = replace(line);
        println!("{}", new_line);
        let temp_number = num(new_line);
        println!("{}", temp_number);
        number += temp_number;
    }
    return number.to_string();
}
#

281 is the right example output

#

i printed all the steps and it looks like its doing everything correctly

#

i tried this in december and im pretty sure thats the same output i got before, even tho i rewrote it

dull magnet
#

what day

#

1?

#

how r u alr struggling on day 1...

#

i see the issue

#

parse the numbers in this example: 91ajkstwoneksla

amber basin
#

912

#

i thought it said to parse from left to right

dull magnet
#

yes

dull magnet
amber basin
#

im getting just the left and right number

dull magnet
#

look at the example again

#

youre not parsing it correctly

amber basin
#

?

dull magnet
amber basin
#

twone

#

parsing from left to right

#

oh wait is it right to left after i get the lefthand digit

dull magnet
#

there is no direction

#

you need to find the first and last number

amber basin
#

alr

#

tysm

pure temple
#

help ohw do i fix this memory leak

remote kestrel
#

TheKodeTode

pure temple
#

wha ore you?

amber basin
#

so should i just kms now or

jagged briar
#

Yeah

amber basin
#

:3

#

you lovew

dull magnet
#

day 3 was cozy imo

#

surrounding 8 squares is pretty simple tbh..

#

do two nested for loops

proud parrotBOT
amber basin
dull magnet
#

oh god

#

that's pretty cool tbf

vital path
#

@balmy sky tell me theres a better way to do this

document.querySelector("#\\:r6a\\:").click()
#

i know its wrong, i just dont know how to write it properly

vital path
#

yea its over for me

balmy sky
#

yup

vital path
#

LOOK I WAS TRYING TO SHOW EXAMPLE OF WHAT I WANTED IT TO DO

balmy sky
#

actual black magic fuckery what the hell

vital path
#

ik how hilariously wrong it is

balmy sky
#

im doomed

vital path
balmy sky
#

dawg i geniunely have no fucking clue where the values are stored

#

fml

vital path
#

ctrl shift i, sources, and search for likely function names ig

keen ravine
#

how make own plugin where resources

vital path
#

on god

balmy sky
#

allergic to full sentences

keen ravine
#

few word do trick

vital path
#

no its just effecient tbh

#

exactly

balmy sky
#

pins

keen ravine
#

Thank

balmy sky
#

welcome

vital path
#

might wanna look if ur smarter than me

balmy sky
vital path
#

on goddd

balmy sky
#

(i hate regex with a passion)

#

I DO NOT SPEAK MINECRAFT ENCHANTING TABLE thefuck

vital path
#

yea i give up

#

again

balmy sky
#

i dont

#

(yet)

#

(i will in 0.4390732498742 ms)

vital path
#

u got this

#

trust

balmy sky
#

no idea how to edit it tho

vital path
#

use patcher

balmy sky
#

i havent done like anything with patches

vital path
#

i help

#

tell me what u want edited

#

ill write the regex and replace

#

we got this teamwork

balmy sky
#

alr bet

#

well obviously we gotta replace the value of it somehow

#

or set it

vital path
#

im assuming thats gonna be replacing on change to either true or false

#

so ea

balmy sky
#

doesnt onChange define a function?

vital path
#

oh, right

#

so value

balmy sky
#

yeah

#

so

#

hmm

vital path
#

i got it

balmy sky
#

alr i need a way to set the value essentially

#

is that possible with patches?

vital path
#

yes thats wat im doin

balmy sky
#

if you can make me a function that modifies the value

#

then i gotchu bro

vital path
#

thats the whole point of the patches system

#

no function neede

#

its just regex

#

replace the text

#

its all built in to the patch system

#

its great

balmy sky
#

can patches embed values into the patch though?

#

i thought it was just static patched at the boot

#

@vital path

green vessel
#

o my

#

thats juicy

#

🔥

balmy sky
#

idk im fucking stupid lmao

vital path
#

anyways, i think i cooked

#

let me test this real quick

balmy sky
#

ohohohohoh lets get into it

#

fuck yeah

vital path
#

pnpm build time baby

balmy sky
#

imagine

vital path
#

wat plugin is that

balmy sky
#

one i made pleadey

vital path
#

sexy

balmy sky
#

i just reskinned vencord toolbox because i wanted to customize it lmao

vital path
#

well, either im the failure or ur the failure

#
import definePlugin, { OptionType } from "@utils/types";

export default definePlugin({
    name: "Toggle Spotify",
    description: "bleh :P",
    authors: [{
        name: "Aydyn",
        id: 712799889544970310n
    }],
    patches: [
        {
            find: "W.default.Messages.DISPLAY_ON_PROFILE",
            replacement: [{
                // toggle spotify off hopefully
                match: /value: 1 === O/g,
                replace: 'value: Vencord.Settings.plugins["Toggle Spotify"].spotify?true:O'
            }]
        }
    ],
    options: {
        spotify: {
            description: "Toggle spotify on or off",
            type: OptionType.BOOLEAN,
            default: false,
        }
    }
});```
#

wat am i doin wrong

balmy sky
#

does it not work?

#

or does it

#

confusion

vital path
#

doesnt

balmy sky
#

i have no idea lmao

#

uhhhhhhhhhhhhhhhhhhh

#

errors?

vital path
#

nop

balmy sky
#

the fuck?

#

hold on im testing

green vessel
balmy sky
#

i dont see why it wouldnt work

vital path
balmy sky
#

hold on im gonna check if its patching correctly

vital path
#

im a failure who cant write code

#

or regexs

vital path
#

that would probably help

vast karma
green vessel
balmy sky
vital path
#

u know how regex works, right?

#

or maybe im dumb and dont know how the patch system works

#

oh

#

oh

#

ohhhh

vast karma
#

Yes

vital path
#

ohhhhhh

#

lol

#

yea

#

i was

#

yea

#

ok

#

i know what i did wrong

#

thanks

balmy sky
#

Kyuuhachi just saved christmas lmao

vast karma
#

A regex containing spaces will only match if the haystack contains spaces

vital path
#

yea, realized its patching obviously not formatted code

#

lets see if it works now!

balmy sky
#

send the patch pleadey

#

i shall test too

vital path
#

yea uno momento

balmy sky
green vessel
#

and i shall enjoy the fruits of your labour 🗿

balmy sky
#

get your grubby hands off the fruits of our labour

#

our fruits

vital path
#

OOOOOOOOOOOOH

balmy sky
#

not yours

vital path
#

WERE A FUCCKING GENIUS

#

LETS GOOOO

balmy sky
#

LETS FUCKING GOO

#

DID IT WORK

#

BRO SEND THE PATCH RN

vital path
#

THANK U @balmy sky THANK U @vast karma

#

only a SINGLE problem

balmy sky
#

SEND IT RN RNRNRNRNNRNRNRNN

#

WHAT IS THE PROBLEM

vital path
#

whjich is super easy to fix

#

u found the code for display on profile, not show spotify as status

#

i fix!

balmy sky
#

makes sense

green vessel
balmy sky
#

the shiggy sure indeed is shigging

keen ravine
#

i pnpm watch, how do I open the discord

vital path
#

this is hard

balmy sky
#

do you want me to find the code?

vital path
#

@balmy sky slave, find me the code for the spotify toggle

#

yes please

green vessel
#

lol

vital path
#

i think i have a hint for u

#

DISPLAY_ACTIVITY

balmy sky
#

send me the old patch that edits the display on profile

#

i can take it from there

#

:3

vital path
#

No.

balmy sky
#

maybe potentially

vital path
#

bros gonna steal my shi.

green vessel
#

tessie w

hushed bloomBOT
balmy sky
vital path
#

im jp

balmy sky
green vessel
#

the betrayal?

vital path
#

heres the one that worked, but toggled the wrong switch

#
import definePlugin, { OptionType } from "@utils/types";

export default definePlugin({
    name: "Toggle Spotify",
    description: "bleh :P",
    authors: [{
        name: "Aydyn",
        id: 712799889544970310n
    }],
    patches: [
        {
            find: "W.default.Messages.DISPLAY_ON_PROFILE",
            replacement: [{
                // toggle spotify off hopefully
                match: /value:1===O/g,
                replace: 'value:Vencord.Settings.plugins["Toggle Spotify"].spotify?true:O'
            }]
        }
    ],
    options: {
        spotify: {
            description: "Toggle spotify on or off",
            type: OptionType.BOOLEAN,
            default: false,
        }
    }
});```
green vessel
#

oo

balmy sky
#

alr im gonna get the toggling working first, then swap out the settings

green vessel
#

do i replace with name: "Aydyn",
id: 712799889544970310n with mine if i want to use it?

balmy sky
vital path
#

LOOOLL

balmy sky
#

kill me.

green vessel
#

sry

#

bad

#

timing

#

mb

#

noo;

#

i dont mean it

vital path
#

if ur asking that ill take it u have 0 idea on how to install it in the first place

#

but no, that would be stealing

#

and stealing is bad

green vessel
vital path
balmy sky
#

wtf you have to take the mouse off of the button for the changes to apply

#

fuck it i dont care lmao

vital path
balmy sky
#

WHY IS THERE 2 OF THEM

keen ravine
#

help a nob, I made plugin now how do I run

balmy sky
#

sigh

keen ravine
balmy sky
#

me when sex/index.ts

#

vencord sex mod real

vital path
keen ravine
#

how do I run the discord to see the plugin

vital path
#

pnpm build WHEN UR CD INTO THE USERPLUGIN FOLDER, refresh, and ur plugin will be where all ur other vencord plugins r

vital path
#

did yew find the good code yet

keen ravine
#

nu :(

vital path
#

wasnt tlaking to u

balmy sky
keen ravine
#

oki :)

vital path
#

my bad

balmy sky
#

working on the button thingy still

#

will soon :3

vital path
#

wdym

#

u dont need button

#

just

#

literally paste code into game toggle thing

balmy sky
#

YIPPPEEE IT WORKS

vital path
#

YAYYYY

#

bro we r so s mart

balmy sky
#

ok you can now toggle display on profile via the button

vital path
#

team work

#

at its best

balmy sky
#

now i just gotta update the patch

vital path
#

ill do it

green vessel
#

um guys

vital path
#

gimme the code u found

#

ill send u new patch

balmy sky
#

its fine i got it

vital path
#

just paste the patches block into ur code

green vessel
vital path
#

lol

#

pull request

green vessel
#

o

#

ok

#

i dont use github oftenhusk

vital path
#

thats the response id expect when u have 0 clue what that is

#

O smarter than i thought

green vessel
#

fr

vital path
#

what plugin u making?

#

bro a genius fr

balmy sky
#

HOLY SHIT I DID IT LMAO

#

IT FUCKING WORKS

green vessel
vital path
#

send ur code with the button now

green vessel
#

with a link\

balmy sky
#

WAIT AYDYN

green vessel
#

with pytube

balmy sky
#

CHECK MY PROFILE RN YEAH

vital path
balmy sky
#

IS IT TOGGLING

vital path
balmy sky
#

oh word it isnt

#

thats weird

vital path
#

toggle off rq

green vessel
balmy sky
#

it is

#

and its toggled off here too

vital path
#

kms

balmy sky
#

oh wait we're fucking stupid

vital path
#

ummmmmmmmmmmmm

#

yea

balmy sky
#

its just patching the value lmao

vital path
#

use the onclick function

#

yea

#

yeaaaa

green vessel
vital path
#

i was right in the first place

balmy sky
#

ight hold on

vital path
green vessel
#

beaty of coding

#

i should learn

balmy sky
#

oh hmmmm

#

this is odd

#

my main is having a brelt down

vital path
balmy sky
vital path
#

yes that was wat i found

balmy sky
#

please do

#
}), o, r, i]
#

something to do with this

#

at the end of the spotify display on profile div

#

@vital path

vital path
#

oh thanks

keen ravine
vital path
#

ill set a breakpoint and see what the values r

balmy sky
#

outstanding

#

i got bored bruh

green vessel
#

||joking||

#

ill leave for good now

#

bye

keen ravine
balmy sky
#

sigh

keen ravine
#

guys help how do I open the discord to see my plugin sex

balmy sky
#

sigh x2

green vessel
keen ravine
#

not funny

#

I am in dire pain

balmy sky
#

you can talk

green vessel
keen ravine
green vessel
#

i dont have plugin

#

l0l

vital path
keen ravine
#

hey thats not nice

vital path
#

scroll up cause im not saying it again

keen ravine
#

not talking to u "retard"

#

u got a beautiful mouth dont let it get wasted by those words

balmy sky
#

aydyn, wanna go in dms? i cant be bothered with these single celled organisms

vital path
#

maybe if you can convey an actual problem, or give a little more details about where ur plugin is, what version of vencord u have installed, and any other things that could be wrong

balmy sky
keen ravine
#

damn and that was enough to straight call me retard

vital path
#

because all ur asking me is how to open ur discord to see ur plugin sex

#

want the real answer to that?

#

double click the icon thats sitting on ur desktop

#

the one that says "Discord"

keen ravine
#

mhmm

vital path
#

and there u go!

#

problem solved

#

u now opened ur discord to see ur plugin sex

keen ravine
#

I do not see my plugin sex

#

I will provide you with more information in a sec good sir

#

and please do not call me the r word again or I will call the discord mods

vital path
#

call them, they will ban u for wasting everybodys time

keen ravine
#

:O

green vessel
#

um guysss, did you get it working?

#

im sorry

#

i just want it bad

vital path
#

be patient

#

it will most likely be in the next vencord update

green vessel
green vessel
vital path
#

right let me predict the future

#

shakes magic 8 ball

#

probably not!

green vessel
#

what did it say?

#

what did you see?

vital path
#

this is all in my head by the way

green vessel
keen ravine
green vessel
#

ye

idle sundial
#

verse me on leetcode contest next time bro

#

I called in by your opps

vital path
#

bro had to call in his fellow gang members

#

just watch when i up ur block, lil bro

#

every opp shot

#

how many points u have on leetcode

glass oracle
#

leetcode

potent fox
#

Leetcode so bad

#

Code wars better

frigid bay
#

coding

#

is cool

gusty maple
#

Coding stole my sleep

#

I want it back

vast karma
#

Sleep stole my coding

quaint cipher
#

turn this into regex .3

function match(string) {
    if (string[0] != "S") return false;
    if (string.substr(1, 3).split('').some(character => character.toUpperCase() == character.toLowerCase())) return false;
    return true;
}
frigid bay
#

ask ai trolley

vast karma
#

Looks like ^S(?!.{0,2}\W) to me

austere mauve
#

why the (?!

vast karma
#

To negate

austere mauve
#

oh

vast karma
#

If any of the three characters after the S is non-word, return false

zenith drift
#

anyone who have fixed the issue with discord py on_message sending messages multiple times?

#

bc ive been trying to make lots of check to filter it but i still havent succeded

austere mauve
#

did u forget to check if the author is your bot

zenith drift
#

no

zenith drift
dull magnet
#

show a screenshot of what's happening, show the relevant code

zenith drift
#

here

austere mauve
#

nice code

zenith drift
#

lmao

#

i mean

dull magnet
#

also most obvious reason: make sure you're not running multiple instances at once

zenith drift
#

here is what i have now for check:

last_text, last_embed = self.last_dm[ping_number], self.last_dm[ping_number+3]
if ((embed is not None and last_embed is not embed and last_text is not text) and int(now_time)+2 > int(time.time())) or self.dm_ping_startup[ping_number]:
    await user.send(text, embed=embed)
    self.last_dm[ping_number], self.last_dm[ping_number+3] = [text, embed]
    self.dm_ping_startup[ping_number] = [False]
zenith drift
#

it sends even more after time passes

zenith drift
#

bc the latency became 800 seconds

dull magnet
zenith drift
dull magnet
#

that code smells a lot like race condition

zenith drift
#

wdym

dull magnet
#
await user.send()
self.last_dm = thing
#

it won't update state until you dm the user

#

update state first then send message

zenith drift
#

ooo

#

omg i will try that

#

ty

dull magnet
zenith drift
#

aaa

#

now i see

#

its probably bc of that

#

gonna try real fast

zenith drift
tulip slate
#

does anyone knows how to issue a call to discord api from a patch ?

vast karma
#

RestAPI in common

tulip slate
#

is there any doc somewhere ?

vast karma
#

No

#

Well, I guess the rest api itself is documented somewhere, I hope

#

Check what other plugins do, or discord itself

tulip slate
#

just tried restapi, but my issue is that the authorization header is not set, so i get a 401 from discord

#
    let result = await RestAPI.get({
                    url: "https://discord.com/api/v9/channels/"+y.channel_id+"/messages?limit=1&around="+y.id,
    });

#

the request is quite simple lul

amber basin
#

try removing the api part

#

just /channels/:id

#

i think restapi removes headers for external requests

#

also look for guildmessagesstore and fetch messages that way

#

dont reimpliment utility functions

tulip slate
#
    let result = await RestAPI.get({
                    url: "https://discord.com/api/v9/channels/"+y.channel_id,
      
    });

#

still dont have authorization

tulip slate
vast karma
#

Don't include the https://discord.com/api/v9/

tulip slate
#

it woorked

#

thanks

vast karma
#

But yes, there's very few reasons to use RestAPI directly

#

Discord has functions for almost all of them

tulip slate
#

any tips to find interesting functions like those ? are they listed somewhere ?

vast karma
#

Grep the code

#

Or vencord's type defs, it's got the common ones

amber basin
#

i think we have typedefs for guildchannelstore

#

lemme check

#

no we do not

#

just draft and emoji stores

#

i can find the method when i get home in ~45m

#

oh nvm

cedar olive
#

that's for getting cached messages

amber basin
#

oh

#

ill find fetchMessages when i get home then

cedar olive
#

import MessageActions and use fetchMessages

#

first argument is an obj with these values

amber basin
#

oo

#

forgot messageactions exists

vast karma
#

Wait what does crosspostMessage do

#

Sounds interesting

dull magnet
tulip slate
# dull magnet https://xyproblem.info

my bad haha, the fact is that don't have any idea on how to do what i'm currently trying to do the right way (adding a reaction filter to discord search to get only messages with some reaction)

cedar olive
#

I dont think that's quite possible

#

reactions are only fetched when you look at the message

#

which isnt doable at all

tulip slate
cedar olive
#

yes

#

that is not good at all

dull magnet
#

you cant do that

#

its impossible

cedar olive
#

imagine having to fetch all messages in a channel to search through them

tulip slate
#

why not lul (no i got the point)

#

but this feature would be quite cool

cedar olive
#

yes

#

but it is something only discord can implement

tulip slate
#

i know how to do that, i got a job at discord's, then i implement it, and i leave them

cedar olive
#

yep

tulip slate
#

i wanted to search by reactions to allow me marking some messages as "to read later" or things like that. could i keep in my computer's memory somewhere this kind of reactions like "if i react with this reaction, store this message somewhere"? would it be viable to store persistent informations ? and is there any mechanism like this in vencord or shall i do it myself ?

amber basin
#

make a local pins plugin

#

actually i might do that

tulip slate
amber basin
#

im gonna try doing it later when i get home but u can too

tulip slate
green vessel
#

animated stztus when frfr

viral roost
zenith drift
weak idol
#

tessie w

hushed bloomBOT
winter tapir
#

how do i make plugins for vencord ong

frigid bay
weak idol
#

someone?

frigid bay
weak idol
#

nvm

frigid bay
gusty maple
#

most sane interaction on veecord

frigid bay
#

i feel like they had bad intentions

gusty maple
#

ye i felt that when i read the message initiallyx

#

ffs something stole my shit

#

shift*

frigid bay
#

lmao

gusty maple
#

i cant shift help

frigid bay
#

yeah thats why i asked them

amber basin
#

stuck on day 3 part 2, the example is correct

#

im storing every star's coordinates, filtering for entries that are duplicated

#

@stray imp help

#

i checked a few values in my input and they look fine

#

hm, apparently this is all counted as together

#

(checked for stars with 3 numbers)

#

wait i was dumb i never reset a boolean

stray imp
#

adorable

vast karma
#

Usually you don't reset booleans but just let them go out of scope and declare it anew in the next iteration

vast karma
#

Neat trick if you want to patch an object literal (or other arbitrary value) somewhere but don't want to regex the end of the expression: ```js
let L = ({set (v){console.log(v)}}). = { ... };

cedar olive
#

I don't understand what that does

dull magnet
#

char

#

oh

swift zinc
#

the fixAll on save in this repository pisses me off

dull magnet
#

then... turn it off?

swift zinc
#

i did

#

i thought it was an extension at first but then I realized none of my other repos do this

#

must be nice for the 1%

dull magnet
#

whar

jagged briar
#

i cant live without it

swift zinc
#
  1. It's too aggressive, it doesnt align with my coding style and intentions, I format on save to make it more visually comforting but I dont need it deleting anything
  2. Not enough customization, it fits all my needs but does even more which ends up doing more hurt
  3. Understanding lost, I lose my understanding of what just changed, what If I was planning on using that later on, now its gone, addressing one issue at a time is better for transparency and accountability
dull magnet
#

what

#

it doesn't remove any code

jagged briar
#

it does change it sometimes but it never removes it

swift zinc
#

if you have an unused import

jagged briar
#

it removes it

#

as it should

#

cause why would you have an unused import

swift zinc
#

cause im planning it out

dull magnet
#

why are you manually adding imports

jagged briar
#

there are 2 solutions for this

  1. dont save when you put an import in
  2. just auto import it
dull magnet
#

do not

#

if you're manually adding imports you're doing it wrong and wasting your time

#

just type the name of the thing you want to use and hit tab to accept the auto completion

#

vscode will automatically insert the correct import

#

and the lint on save will automatically remove unused imports again and sort them nicely

#

makes everything nice and cozy and you don't have to ever change imports

swift zinc
#

what if you didnt memorize the methods of the import

jagged briar
#

you dont need to?

#

just find the function/whatever you want, type it and let vscode import it

swift zinc
#

i want the intellisense to auto compelte

#

like i type a dot and i want a dropdown

jagged briar
#

yeah you can still have that

#

idk what you are on about

swift zinc
#

tf since when

#

if I want to say use LS and get an item

#

its gonna tell me the name of the method magically

jagged briar
#

if your vscode doesnt do that then you messed smth up

swift zinc
#

you know what I think im just confused have a lovely day yall

#

<3 xoxox

#

ill just continue with my habits with the setting on false

floral tapir
#

GUYS LOOK I CONTRIBUTED TO VENCORD YIPIEE!!!

green vessel
green vessel
knotty swift
#

You guys reckon it'd be possible to make a plugin that splits large files into smaller parts so you can send larger files on discord?

hybrid dune
#

The other persons would have to have a plugin to piece it back together also, so seems pretty limited in usefulness

#

Also, since you're on desktop anyway, setup ShareX to speedily upload files and get link instead

frigid bay
frigid bay
native thorn
grizzled narwhal
#

i have a question for yall

#

is it possible to make a "listening to apple music" rich precense for the apple music windows app and get it workin

#

we had it for cider but the cider app is poo poo and it also got removed bcs cider devs bad

steep ledge
#

How can I emulate a gateway event on the client? I want to emit an event locally

#

this code doesn't leave any errors but also doesn't work

#

do i need a timestamp/nonce or smth?

viral roost
#

just pass the same arguments discord does

#

(also x/y problem probably)

steep ledge
#

can you confirm that dispatch is the right function for emitting client events?

viral roost
# steep ledge

in this case its channelId/userId not channel_id/user_id

steep ledge
#

i'm working on a plugin called ClydeGPT which brings back old Clyde and want to emit a typing event

#

let me try that, thanks for helping!

steep ledge
#

i can add my plugin for official vencord if yall want

viral roost
balmy sky
steep ledge
#

i've just been running it on a forked version

#

alr met me rebuild and see if typing works

#

@Clyde hi

#

oh wait i didnt do it properly

#

@Clyde hi

#

let's fucking go

#

thank you so much

#

now i'm going to emulate a MESSAGE_CREATE by the actual Clyde account instead of ephemeral

#

currently, Clyde is pingable in DMs/Group DMs but not in servers. I'll also make it pingable in servers

#

can someone please give me all the fields required for MESSAGE_CREATE?

balmy sky
#

client side i assume?

steep ledge
#

yes it's client side

#

can't do server obviously

balmy sky
#

yee

steep ledge
#

but it shows up for vencord users

#

or at least the fork i wrote

#

also works when other ppl ping clyde

viral roost
#

why not keep it as an ephemeral response

#

not like you can send the clyde message to other people

steep ledge
#

i want to bring back the feeling of old clyde

balmy sky
steep ledge
#

in theory all I have to do is emulate a MESSAGE_CREATE

#

with Clyde's user id

#

1081004946872352958

#

userId, channelId, content

messageId? nonce? (does client care about nonce?) flags? (does client care?)

frigid bay
steep ledge
#

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'author') :(

#

does anyone know the structure for MESSAGE_CREATE?

gusty maple
#

yes

steep ledge
#

🥺

gusty maple
#

here u go

steep ledge
steep ledge
gusty maple
steep ledge
gusty maple
#

accurate enough

steep ledge
#

like this is what the TYPING_START event looks like

#

on dapi docs

#

but apparently it's userId

#

not user_id

gusty maple
#

message create worked the last time I tried

steep ledge
#

dapi docs suck ass

gusty maple
#

yuh ofc

steep ledge
#

can i have a snippet please 🥺

gusty maple
#

how would I snippet that

steep ledge
#

i'm so done dealing with this shit

#

idk man

gusty maple
#

just subscribe to message create

#

and log what it gives you

steep ledge
#

wait

#

does the author object actually have to be complete?

gusty maple
#

uh

#

I assume id should be enough

steep ledge
#

it's complaining

#

i mean dapi returns the full author object as well

gusty maple
#

how did you try and how is it complaining

steep ledge
#

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'author')

#

lol this doesnt mean anything

gusty maple
#

whats ur code

steep ledge
#
    FluxDispatcher.dispatch({
        type: "MESSAGE_CREATE", 
        not sure what's supposed to go here
    });```
#

channelId, userId (or author), content, nonce?, messageId? (needed but dont know field name), flags? (probably not needed)

plush parcel
#

you only really need a user and a message object

gusty maple
steep ledge
#

ohh

#

do you know what the field is for the message id?

gusty maple
#

"id" i guess?

#

again

#

you can just subscribe to message create and log 1 message

#

and then see what you need from the object you get

pliant pasture
steep ledge
#

thanks

#

best part is that when MESSAGE_CREATE is emitted, the typing stops since same user id

amber basin
#

I FOUND MUTEX FUCKERY

austere mauve
#

why are you

#

making lazy statics

#

and using static ref

#

wtf are you doing

dull magnet
#

mutexes are for pussies you will use unsafe instead

proud parrotBOT
austere mauve
#

vee when OnceCell

#

why is the name not a fixed type

#

wait nvm

#

ok but oncecell

dull magnet
#

that code is 2 years old

#

oncecell wasnt real back then

#

okay github does not know math

#

it's not even 1 year old

#

point still stands it's older than oncecell

austere mauve
#

u should've invented it faster

dull magnet
#

but yeah onceceller looks like what I want

amber basin
balmy sky
#

is it possible to make a plugin that stops dashes from being changed to bullet points in messages? or is the formatting client side

frigid bay
#

textreplace - to \-, * to \* etc

#

wouldn't always work actually

#

but anyway if it is clientside (i assume it is) you can just escape it

#

or u can just do it manually bleh

gusty maple
frigid bay
#

for some reason i thought \-\-\- wouldnt work

#

dummy

#

---

balmy sky
#

yeah that works fine :3

frigid bay
#

:p glad to hear

#

if text replace is regex (I've never actually used it so idk) you could check if it's at line start and if there's a space after

fluid fjord
#

hello
I made a userplugin, it's working fine for me when compiling myself
now I want to share it with my friend. how can I do that?
I tried sending him the files from my dist folder and have him replace his with mine, but the plugin didn't appear in plugin settings.

dull magnet
#

the correct way to add plugins is to build from source with the plugin source code included

#

or if your plugin is useful for the general public then you can open a pull request and have it added to mainline vencord

acoustic radish
#

hey guys ive recently been messing around with themes and stuff and i noticed that the profile bar at the bottom for some reason has shortened and i cannot see the settings cog wheel? any idea on how to fix?
its like its not long enough or something? idk

frigid bay
#

vf themefix

#

vs themefix

#

fuck

#

thought this was support

#

type that in bot commands or something

acoustic radish
frigid bay
#

oh

sturdy arrow
#

any idea on how I can externally change user volumes (call/vc)?

austere mauve
#

you go to their houses and turn down their mics

#

or idk what you mean by external

sturdy arrow
#

code

#

working on a program, thinking about using address locations but doubt that would be a constant due to the amount of people in call

frigid bay
dull magnet
#

addresses what

sturdy arrow
sturdy arrow
frigid bay
#

that would be 10 billion times better

sturdy arrow
#

what I'm doing is not a plugin

frigid bay
#

yes, why not

sturdy arrow
#

that's like telling the guy who invented the plane "why not just make a car"

frigid bay
#

why are you complicating things

sturdy arrow
#

what I'm doing is completely unrelated

#

I would use an api if one existed for the application, but it doesn't

dull magnet
sturdy arrow
sturdy arrow
dull magnet
#

yes... yes... it would

sturdy arrow
#

I said that's an assumption

dull magnet
#

a plugin is exactly what you need

frigid bay
#

idk have fun interacting with js in non-js code

sturdy arrow
# dull magnet yes... yes... it would

so you're telling me with a vencord plugin I can:

  • make a custom ui
  • send http requests to a possibly dynamically changing ip (server)
  • integrate with other applications
  • etc.
sturdy arrow
#

man this community is fucked up

#

in this scenario x is changing user volume
y is setting the value in a memory address

#

I know how to do y

#

I am asking how to do x

#

and gave y as a suggestion

#

if you don't want to help you don't have to

dull magnet
#

asking you to explain your full problem and goal is not "fucked up"

#

i do want to help but i cannot help with cryptic problems

#

why do you need to send http requests to a dynamic ip?

#

why do you need to integrate with other apps?

sturdy arrow
#

I gave plenty info in my first message

#

neither of those two are related

#

I want to externally (not in a plugin) change user volume

dull magnet
#

yes. why. what is the goal.

sturdy arrow
#

e.g. send get http request, server sends a volume, application sets it

dull magnet
#

why.

sturdy arrow
#

because I'm working on a program that does that

dull magnet
#

what is the COMPLETE application you are trying to make

#

what program

sturdy arrow
#

ripoff mumble

#

using discord

dull magnet
#

tbh idk what that is

sturdy arrow
#

see why I don't bother explaining

dull magnet
#

explain what it would do

sturdy arrow
#

it's a cryptic problem

#

I narrowed it down to a simple single question

sturdy arrow
dull magnet
#

proximity chat?

sturdy arrow
#

sure

dull magnet
#

okay so your solution is incredibly simple: run a websocket server inside your plugin and make the game send requests to the websocket

handle those requests in javascript and set volume or take other appropriate actions

frigid bay
#

if you don't wanna use a plugin you should be able to run js in discord from an external app

sturdy arrow
#

e.g. the f11 one

frigid bay
#

yes but whether it would be easy is a different question

#

should be way better than trying to find vc volume in memory

sturdy arrow
#

I doubt it'd be any more difficult than a single command run in the console to change a user's volume

#

user id, volume, about it

sturdy arrow
#

I mentioned it isn't possible due to it's location not being static

#

depending on the amount of people in vc

frigid bay
#

it probably is possible, just tedious

#

not worth it

sturdy arrow
#

possible is a stretch

#

but yeah I suppose

frigid bay
#

what vee suggested would be the simplest way to do it but then the users of your software would have to install an unofficial version of vencord with your plugin

sturdy arrow
#

I would do it all myself but voip is effort

#

plus this is just something I'm doing for fun/to gain knowledge instead of an actual program I'd be releasing

#

it's an idea that's been done to death countless times and probably in many better ways depending on platform

dull magnet
#

"changing the value in memory" is just not possible that's not how it works

sturdy arrow
#

it literally is 😭

dull magnet
#

it's simply a javascript function you call

sturdy arrow
#

you don't save the value of volume in storage

sturdy arrow
frigid bay
#

i feel like it would work but it would be extremely tedious to do

sturdy arrow
#

but I hope you know the javascript function you're referring to would also change the value in memory

frigid bay
#

well it would change the volume

#

thats what you want right

sturdy arrow
sturdy arrow
#

all I asked from the start

#

how to change volume externally

#

went on a whole sidequest explaining my goal 😭

dull magnet
#

yes because you're asking terrible question

frigid bay
#

i can think of one way to do it but it would probably be super jank and could make antiviruses angry

dull magnet
#

you don't change the value in memory that makes no sense lol

sturdy arrow
#

😱

austere mauve
#

holy shit ban him already

steady knot
#

I loved the positional audio in mumble (and mumble in general), hated when friends forced me to use discord instead

dull magnet
#

you call the javascript function to change volume. you communicate with discord via websocket

sturdy arrow
sturdy arrow
#

memory holds information like volume

#

where else do you believe that data is stored

sturdy arrow
dull magnet
#

you're deliberately choosing to be an idiot unreal

sturdy arrow
sturdy arrow
#

I don't see what you're not understanding

#

like I said, if you don't want to help me, you don't have to

austere mauve
#

firstly you cannot access memory outside of your process unless you use admin

sturdy arrow
#

you said it's as simple as a single javascript command, that's all I need

austere mauve
#

which is already horrible

frigid bay
#

without admin perms

austere mauve
#

ok nvm fuck windows

sturdy arrow
#

forgot the name but it's the one most anticheats use

#

kernel?

frigid bay
#

dude

austere mauve
#

and now how the fuck are you going to find the volume

sturdy arrow
frigid bay
#

youre not running your shit from kernel

sturdy arrow
austere mauve
#

you cant

#

thats it

dull magnet
austere mauve
#

its too much junk

dull magnet
#

KERNEL MODULE FOR SETTING DISCORD VOLUME

frigid bay
#

if you forgot what kernel is then you're not using it

sturdy arrow
#

have you not heard the past 5 times I said this is a personal project not for release

sturdy arrow
#

I forget words

austere mauve
#

so people made an honest suggestion of making it a plugin and communicating thru normal means

frigid bay
#

yeah but i can assure you you're not running your thing in the kernel

austere mauve
#

and you promptly disregarded it

#

then shitted on the community

sturdy arrow
austere mauve
#

you are an idiot

sturdy arrow
#

this is a plugin server

sturdy arrow
sturdy arrow
frigid bay
#

its not a necessity

#

you should never do that

dull magnet
#

vban @sturdy arrow i really shouldn't have to deal with people this stubborn and stupid oh my god

#

whatever i don't care

frigid bay
#

if you really wanna avoid having to modify discord then you could inject a module to it that then executes js (this is very stupid but would work)

gusty maple
#

LOL

frigid bay
#

well

frigid bay
dull magnet
#

new rule don't be stupid or get banned

austere mauve
#

he has no experience w plugins he will totally make a kernel module instead much much more easily

dull magnet
#

yeah let me find a single float value in memory with my kernel volume instead of just running a goddamn websocket and sending commands to it

frigid bay
#

true, have fun doing that without running js code

gusty maple
#

boring rule

#

/j

dull magnet
#

you know how cheat engine makes you "calibrate" the memory location of values by making you change it and input the new value multiple times until it only has one candidate left

frigid bay
#

yeah

dull magnet
#

bro is gonna do that

austere mauve
#

and thats the even more fun part

dull magnet
#

to get started with my program first change their volume to 65% okay now do 21% okay almost there now do 37%

#

yupp that's the one

frigid bay
#

u could totally make something that doesnt require to do that but u would have to interact with a bunch of js internals and its just stupid and a waste of time lol

austere mauve
#

the variable will change location

frigid bay
#

u could externally run js code though its just that its silly

dull magnet
#

it's literally virtually impossible

amber mantle
#

:skullley

frigid bay
dull magnet
#

just use the 2 lines of js to do it 😭 😭

frigid bay
#

yeah lol

dull magnet
amber mantle
austere mauve
#

new WebSocket("localhost:3030") bro i just built a car

dull magnet
#

me when FluxDispatcher.dispatch({ type: "SET_SELF_VOLUME", volume: 0.7 })

amber mantle
#

DiscordNative.app.relaunch() bro i just made malware

dull magnet
#

idk if that's actually the event but it's gonna be smth like that

jagged sierra
#

I killed her

austere mauve
#

heresy

jagged sierra
#

Long live the mogus

dull magnet
#

vbam @jagged sierra blasphemy; speaking poorly of our goddess shiggy

jagged sierra
pure temple
#

no no no no no