#๐Ÿงฉ-plugin-development

1 messages ยท Page 11 of 1

austere gulch
#

same folder as the plugin guide

sonic badger
#

is Could not find the language '', did you forget to load/include a language module? from react_devtools_backend.js:4026 normal?

#

I don't think I caused it but just wanna double check

stiff kiln
#

have you guys thought about making an AUR package

dull magnet
#

what for

covert nimbus
#

like idk why

installing is super simple

sonic badger
#

I did it! @dull magnet

#

MessageEvents.ts Lines: 44-66

export type SendListener = (channelId: string, messageObj: MessageObject, extra: MessageExtra) => void | { cancel: boolean; };
export type EditListener = (channelId: string, messageId: string, messageObj: MessageObject) => void;

const sendListeners = new Set<SendListener>();
const editListeners = new Set<EditListener>();

export function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra) {
    for (const listener of sendListeners) {
        try {
            const result = listener(channelId, messageObj, extra);
            if (result && result.cancel === true) {
                return true;
            }
        } catch (e) {
            MessageEventsLogger.error("MessageSendHandler: Listener encountered an unknown error\n", e);
        }
    }
    return false;
}

export function _handlePreEdit(channelId: string, messageId: string, messageObj: MessageObject) {
    for (const listener of editListeners) {
        try {

https://github.com/Vendicated/Vencord/blob/main/src/api/MessageEvents.ts#L44-L66

proud parrotBOT
# sonic badger **MessageEvents.ts** Lines: 44-66 ```ts export type SendListener = (channelId: s...

**MessageEvents.ts: **Lines 44-63

export type SendListener = (channelId: string, messageObj: MessageObject, extra: MessageExtra) => void | { cancel: boolean; };
export type EditListener = (channelId: string, messageId: string, messageObj: MessageObject) => void;

const sendListeners = new Set<SendListener>();
const editListeners = new Set<EditListener>();

export function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra) {
    for (const listener of sendListeners) {
        try {
            const result = listener(channelId, messageObj, extra);
            if (result && result.cancel === true) {
                return true;
            }
        } catch (e) {
            MessageEventsLogger.error("MessageSendHandler: Listener encountered an unknown error\n", e);
        }
    }
    return false;
}

sonic badger
#

Everything seems to be working with async now

sonic badger
#

Should I make a PR?

green vessel
#

something like this? ```js
Vencord.Webpack.Common.RelationshipStore.getFriendIDs().map(id => Vencord.Webpack.Common.UserStore.getUser(id).username)

#

outputs all friend's usernames

#

@green vessel pong

oblique prairie
#

ping

green vessel
#

oh yeah try ```js
Vencord.Webpack.Common.RelationshipStore.getFriendIDs().map(id => (u => u.username + "#" + u.discriminator)(Vencord.Webpack.Common.UserStore.getUser(id)))

sonic badger
#

by chance, has anybody taken a look at my pr?

#

I'm not very familiar with js/ts, so any advice would be appreciated

#

tho i didn't really add anything new in the pr, i just did it so my plugin could work

tribal stream
#

hey i have a question how i can remove embed from message locally
im trying to just do

<IMessageCreate>.message.embeds = [];

but that kinda don't work and i don't have idea

#

doing plugin to hide embeds from certain websites because my friend irritates me with one lol

dull magnet
#

dispatch a MESSAGE_UPDATE event with flux dispatcher

#

that has empty embeds array

tribal stream
#

you mean that?

FluxDispatcher.subscribe("MESSAGE_CREATE", this.onMessage);
dull magnet
#

thats subscribing

#

you can also dispatch your own events

#

you can just dispatch a message update event

#
FluxDispatcher.dispatch("MESSAGE_UPDATE", {
  id: ...,
  channel_id: ...,
  embeds: []
});
tribal stream
#

i know im really stupid and don't know what im really doing but
when i do this like that ide shows me an error TS2554: Expected 1 arguments, but got 2.

#

lol

#

and when i just ignore that it prints many errors in console

dull magnet
#

cause its dispatch({
type: ...
})

tribal stream
#

oh

#

uhh, and it doesn't change anything really

dull magnet
#

figure it out

tribal stream
#

im trying to

foggy mason
foggy mason
cedar olive
#

@dull magnet guh do you still have the config and the flag to open discord with to debug with vscode, I literally cannot find

cedar olive
#

lmao where??

#

I swear I can't find it

covert nimbus
proud parrotBOT
# covert nimbus https://github.com/Vendicated/Vencord/blob/main/.vscode/launch.json

**launch.json: **

{
    // this allows you to debug Vencord from VSCode.
    // How to use:
    // You need to run Discord via the command line to pass some flags to it.
    // If you want to debug the main (node.js) process (preload.ts, ipcMain/*, patcher.ts),
    //     add the --inspect flag
    // To debug the renderer (99% of Vencord), add the --remote-debugging-port=9223 flag
    //
    // Now launch the desired configuration in VSCode and start Discord with the flags.
    // For example, to debug both process, run Electron: All then launch Discord with
    // discord --remote-debugging-port=9223 --inspect

    "version": "0.2.0",
    "configurations": [
        {
            "name": "Electron: Main",
            "type": "node",
            "request": "attach",
            "port": 9229,
            "timeout": 30000
        },
        {
            "name": "Electron: Renderer",
            "type": "chrome",
            "request": "attach",
            "port": 9223,
            "timeout": 30000,
            "webRoot": "${workspaceFolder}/src"
        }
    ],
    "compounds": [
        {
            "name": "Electron: All",
            "configurations": ["Electron: Main", "Electron: Renderer"]
        }
    ]
}

dull magnet
#

this makes discord take like 5 years to start btw

covert nimbus
#

Noted

solar maple
#

can we make a plugin to update UI?

#

like replacing some elements

#

(cannot be done with css)

dull magnet
#

yes

cedar olive
solar maple
# dull magnet yes

How to setup a dev environment? ๐Ÿ˜…
Like if I clone the vencord repo then make my plugin I am sure it won't work, so is there any specific path where I clone it so that the installer reads it?

austere gulch
solar maple
#

๐Ÿ‘

solar maple
austere gulch
#

not a vencord issue
you've modified it yourself so you'll need to figure it out

#

take a closer look at examples and existing plugins

solar maple
#

megu's plugin guide

austere gulch
#

screenshot code?

solar maple
#

(code is referenced from fxTwitter plugin)

austere gulch
#

firstly, remove spaces from "name"
having spaces will break stuff

solar maple
#

ok

#

nothing changed ๐Ÿคก

austere gulch
#

oh

#

whys the folder called .ts

#

remove that

solar maple
#

folder called ts?

austere gulch
#

remove the .ts

#

and try again

solar maple
#

ah shit

#

thanks

austere gulch
#

does it work now?

solar maple
#

it builds successfully

#

but no console logs

#

userplugins must be turned on by default

#

i was banging my head for no reason

austere gulch
solar maple
#

good to know that preSendListener does not trigger for messages with attachments

#

RIP

solar maple
solar maple
#

I can't access the plugin tab because it's crashed

austere gulch
#

vsupport more info

shrewd tundraBOT
# austere gulch vsupport more info

"doesn't work" or similar are not very helpful.
You can make our lives easier by providing the following information:

  • What platform are you on? Windows, Mac, Linux?
  • What client are you using? Discord Desktop, Discord Web, Armcord...?
  • What branch are you on? Stable, Canary, PTB...? If not on stable, does it work on stable?
  • Are you fully up to date? You can check by going to the Updater settings tab. If you cannot access that page, use the installer. If no, update and try again
  • Are there any errors? Open the console (Ctrl+Shift+I) and check the console tab. If there are any errors (red text), please provide them.
  • Does this issue persistently happen, or only sometimes?
  • Please provide steps to reproduce this issue. Screenshots or videos are also helpful.
tall perch
#

hi guys flushed_shy
I wants to edit content from incoming messages. How to subscribe event on my plugin?

austere gulch
#

look at existing plugins

dull magnet
#

incoming messages

#

dont think any existing plugin does that

austere gulch
#

moyai does

#

well, subscribe yes

#

idk about modifying

#

they just asked how to subscribe though

tall perch
#

okeyy

#

thx

austere gulch
#

np

dull magnet
#

but asking for how to subscribe is x/y problem

#

so no point to help with that

#

you need to patch some part of the message event lifecycle to edit message content

sonic badger
#

@dull magnet what is Promiseable?

austere gulch
sonic badger
#

Oh okay I have to import it then

austere gulch
#

you can use this if you're not sure if something is a promise or not https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve

The Promise.resolve() static method "resolves" a given value to a Promise. If the value is a promise, that promise is returned; if the value is a thenable, Promise.resolve() will call the then() method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.

edgy berry
#

i cant import flux events

#

and eslint does not like this

green vessel
#

try import type instead of import

#

actually mm

#

yeah tsconfig needs ```json
"@webpack/common/types/": ["./webpack/common/types/"],

#

or something like it

#

@dull magnet fix

dull magnet
#

just don't import them

edgy berry
#

if i dont import it

dull magnet
#

you don't need to

#

why do you need it

dull magnet
edgy berry
edgy berry
dull magnet
edgy berry
#

like this?

dull magnet
#

to your object

#

at the end

edgy berry
#

oh thanks

green vessel
#

const foo = /* ... */ as const; we love

edgy berry
#

it works but i still dont understand what that does lmao

dull magnet
#

by default ts considers objects as possibly partial and mutable

#

so it types

const blah = [{ type: "hi"}]
``` as `Array<{type: string}>`
#

the as const tells ts that this object is immutable or constant and now correctly infers every variant of type as literal

#

so in this case it would be typed as Array<{ type: "hi" }>

edgy berry
#

ohh i see

#

so its basically making the entire object and all properties/elements constant

#

thats actually really useful

trail ginkgo
#

in spotimbed

#

sike

#

i dont do it far up enough in the lifecycle to be generalizable

#

only affects embeds

near aurora
#

is there a wasm lib/any other reimplementation of base64 => ascii decoding than atob?

#

atob is slow

#

like rly slow

#

a 1-2k line json encoded in b64 takes like good 5-6 seconds to decode

dull magnet
#

๐Ÿคจ

#

are u sure

green vessel
#

atob is native code

#

wasm can't be faster

south ledge
#

is pmneo.tsimporter useful

#

or does vscode alr implement what it does (& that's what it got removed)

#

also in the most part auto rename tag's functionality is part of vscode ("editor.linkedEditing": true,)

dull magnet
#

linkedEditing bad

#

doesnt work in most file types

#

and tsimporter mostly obsolete

#

i think tsimported is only good for importing default exports

#

but u should just avoid default exports theyre bad

grim hare
#

atob/btoa converted 25MB of json to base64 and back to json in less than a second for me (i do not feel like getting an exact time right now but it is fast)

#

saying it is slow is insane

near aurora
#

hello webdev folk pliz halp

magic sorrel
#

is emote cloner working?

dull magnet
#

ye brokey

#

but ReverseImageSearch works idk

magic sorrel
#

prolly because it doesnt need the target eh

#

i think

#

ยฏ_(ใƒ„)_/ยฏ

dull magnet
#

i think it only uses target to not show reverse image search for videos and other junk

magic sorrel
#

interesting

bitter sonnet
#

hey, i'm using codef53's stylesheet (https://codef53.github.io/CSS-Snippets/discord/RevertUserPopouts.css )
and some more css:

[class*="avatarPositionPremiumBanner"] {
  top: 72px;
  left: 18px;
}
[class*="avatarPositionPremiumBanner"] circle {
  opacity: 0 !important;
}
[class*="userProfileInner"] {
  background: var(--nord-dark1);
}
[class*="userPopoutOuter"], [class*="userProfileOuter"] {
  padding: 0 !important;
  background: var(--nord-dark1);
  --profile-body-background-color: var(--nord-dark1) !important;
}

to disable custom profile themes, but those that are light themed have a theme-light class on them so it makes them unreadable
and i have no idea how to fix that pure css w/o like 50 css selectors to undo the whole light theme ๐Ÿ˜ตโ€๐Ÿ’ซ
(screenshots of a theme-dark profile and a theme-light one)
(idk if this is the right channel but i don't see a theme-dev/css specific one so ๐Ÿฅด)

dull magnet
#

accessibility settings

bitter sonnet
#

๐Ÿ˜ญ

#

how did i not notice that

#

thank you

dull magnet
#

well tbf its in the worst section it could be in

#

it should be in appearance settings

bitter sonnet
#

yeah, along with the option to yeet profile themes altogether ๐Ÿ˜ตโ€๐Ÿ’ซ

potent fox
#

@dull magnet DELETE

austere gulch
#

done

feral bronze
#

How can the CustomRPC plugin set a custom presence type and name

#

why can't other rich presence applications do the same

dull magnet
#

wha

opal fern
#

It's internal

feral bronze
#

So not possible from an external application?

hardy pawn
covert nimbus
#

im unsure why others don't though

feral bronze
#

bruh

cedar olive
cedar olive
#

@dull magnet can I include this on my pr

dull magnet
#

94ms blbctscrd

#

sure

proud parrotBOT
#

**index.js: **

// Generated by MS2Porter
const version = '1.1.0';

let src;

const downloadURL = async (url) => {
  let el = document.createElement('a');

  el.href = url;
  el.download = url.includes('http') ? url.split('/').pop() : '';

  el.style.display = 'none';

  document.body.appendChild(el);

  el.click();

  document.body.removeChild(el);
};

const keypressHandler = (e) => {
  if (src && e.code === 'KeyD' && e.ctrlKey) {
    downloadURL(src);

    e.preventDefault();
    return false;
  }
};

const hoverHandler = (e) => {
  if (e.target && e.target.src) {
    src = e.target.src.split('?')[0];
  } else {
    src = undefined;
  }
};

export default {
goosemodHandlers: {
  onImport: async function () {
    document.addEventListener('keypress', keypressHandler);
    document.addEventListener('mousemove', hoverHandler);
  },

  onRemove: async function () {
    document.removeEventListener('keypress', keypressHandler);
    document.removeEventListener('mousemove', hoverHandler);
  },



}
};
cedar olive
#

I GOT IT

#

THIS FREAKING THING WAS REPLACING MY ROUTE FROM STAGE CHANNELS

#

THIS TOOK ONLY LIKE 7 HOURS TO FIND

#

no kidding

cedar olive
dull magnet
#

why did it take so long

#

are you trolling

cedar olive
#

seems to be constant

#

will fix

dull magnet
#

curious

#

is it because of the non fixed width lookbehind

cedar olive
#

probably

dull magnet
#

chatgpt can't write plugins

#

yes but it can't

opal fern
#

learn how to code

#

then come back

green vessel
#

did a mf seriously ask AI to code a vencord plugin bruh

#

that's awesome

deft horizon
#

On discord web wit my browser when I got to share my screen, It shares my desktop audio even without a window selected. Would it be possible to develop somthin like that for Ventcord?

dull magnet
#

wha

trail ginkgo
#

keep in mind chatgpt's training data cuts off at 2019

#

so it would never know about vencord

#

other than what you could infer from the name

green vessel
#

no you thought AI could port that plugin ๐Ÿ’€

cedar olive
#
/*
 * Vencord, a modification for Discord's desktop app
 * Copyright (c) 2022 Vendicated and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";

let src;

function downloadURL(url: any) {
    const el = document.createElement("a");

    el.href = url;
    el.target = "_blank";
    el.style.display = "none";

    document.body.appendChild(el);

    el.click();

    document.body.removeChild(el);
}

function keypressHandler(e: any) {
    if (src && e.code === "KeyD" && e.ctrlKey) {
        downloadURL(src);

        e.preventDefault();
        return false;
    }
    return true;
}

function hoverHandler(e: any) {
    if (e.target && (e.target.src || e.target.href)) {
        src = (e.target.src || e.target.href).split("?")[0];
    } else {
        src = undefined;
    }
}

export default definePlugin({
    name: "DownloadImagesShortcut",
    description: "guh",
    authors: [Devs.Nuckyz],

    start() {
        document.addEventListener("keypress", keypressHandler);
        document.addEventListener("mousemove", hoverHandler);
    },

    stop() {
        document.removeEventListener("keypress", keypressHandler);
        document.removeEventListener("mousemove", hoverHandler);
    }
});

#

@green vessel ^

#

bit modified from the original cuz it didn't work thonk

#

instead of opening the download popoup it opens the link in your browser for you to download

dull magnet
#

@cedar olive i dont understand these

#

why even bother webpack searching

#

just hardcode the values

cedar olive
#

eh just in case discord ever change them somehow

dull magnet
#

they wont

cedar olive
#

I guess it would be more perfomant hardcoding

dull magnet
#

it's more likely those webpack searches fail than that the values are changed

cedar olive
#

aight I will change it

#

I will keep channel flags

#

since those are bitfields

#

nvm actually

dull magnet
#

most if not all of those are part of the public api

#

aka they will not change them ever unless it's a major api update

cedar olive
#

there

#

changed it

dull magnet
#

this fixed performance? @cedar olive

cedar olive
#

yeah

dull magnet
#

so strange

cedar olive
#

I added the comma at the start too cuz there was another function that ended with NOTICE_DISMISS

dull magnet
#

why did u add so many patches O_o

cedar olive
#

It's needed

#

๐Ÿ˜”

#

It turned super complex

cursive plank
#

does anyone already know how to modify the user modal?

#

just asking in case I can avoid searching for all eternity

cursive plank
#

nvm found it

cursive plank
austere gulch
#

hi

cursive plank
#

now, how would I make the timestamp show correctly?

#

do I use the markdown parser?

#

<t:1675638180:f>

#

actually nvm

#

i got a better solution

cursive plank
#

working on a timezones plugin

#

(that is my own timezone btw)

#

i havent reached the part where you can change the timezone

cedar marsh
#

How do I fix the react components debugger again?
I remember Ven or some other dev saying you have to delete a folder to make it actually work a while back, but I can't find it

cursive plank
#

I just open my browser to use the react dev tools

#

Kinda inconvenient but it works all the time

#

Although, it might be just Firefox, but the react dev tools are showing errors every second

#

So they are a pain

cedar marsh
#

My firefox says discord isn't using react

#

found the thing

#

but that seems to have just entirely removed react devtools from my client, even following a restart

#

disabling, restarting, enabling, restarting fixed it

celest hound
#

Hello, i'm currently trying to develop a plugin for the Vencord platform that permits our application Cider to use the "Listening" activity type and forces the application id to also use the Spotify progress bar UI as its more suitable for music purposes.

However, i'm somewhat caught up amidst the the webpack mess that is Discord client code, is there any efficient way to intercept a RPC websocket request to apply a custom activity type on receive?

Any help would be greatly appreciated!

dull magnet
#

you can just dispatch custom events

#

as in don't use native rich presence

#

do it urself then manually dispatch appropriate SET_ACTIVITY events

#

see the lastfm plugin for how to dispatch those events

#

you could run ur own websocket server via cider then connect to it with the plugin and set the activity

celest hound
#

Noted, so there's no efficient way to intercept then?

dull magnet
#

or patch the handler for SET_ACTIVITY

#

both work

celest hound
#

Ah

dull magnet
#

search for SET_ACTIVITY:function and you'll likely find it

celest hound
#

Awesome will do thanks!

dull magnet
#

if it doesn't do it omit the function

#

you can search all of their sources by opening devtools then hitting ctrl shift f

celest hound
#

Gotcha.

dull magnet
#

ska_capoonod if u get stuck and need more pointers just let me know

celest hound
#

Thanks! I will.

cedar olive
green vessel
#

I have similar code, I'll get it in a bit

cedar olive
green vessel
#

I change the application name, u can just adapt it to change type instead

celest hound
#

That'd be awesome!!

cedar olive
celest hound
#

Thanks for all the help.

cedar olive
#

no prob!

green vessel
#

if you have this patch ```ts
{
find: '.displayName="LocalActivityStore"',
replacement: {
match: /LOCAL_ACTIVITY_UPDATE:function((\i)){/,
replace: "$&$self.patchActivity($1.activity);",
}
}

you can then have this function ```ts
patchActivity(activity: any) {
    if (activity.application_id == "<whatever id you want>")
        activity.type = 2; /* LISTENING type */
}
celest hound
#

Oh sweet!

#

That makes things really easy.

green vessel
#

do note that the application id is a string, not a number

#

although yeah actually js wouldnt care lol

dull magnet
#

their api might

green vessel
#

you only need to compare

celest hound
#

guess we'll find out.

dull magnet
#

oh wait application id

#

i thought u meant type

#

yeah application ids are strings because ids are too large to fit in 32 bit integers

#

and js loses precision after 32 bits

celest hound
#

Sounds about right.

cedar olive
#

spotify seems different

delicate totem
#

WHO IS DOING THIS PLUGIN

#

WHO

cedar olive
#

why lol

delicate totem
#

BECAUSE

#

Iโ€™VE WANTED A PLUGIN TO DO THIS FOR SO LONG

#

PAIN

cedar olive
#

this is what you need to fake it

delicate totem
#

HELL

cedar olive
#

type has to be LISTENING
name has to be Spotify
gotta have start and end timestamps
party id must include spotify:

delicate totem
#

I know how to do it

#

I just canโ€™t code

dull magnet
#

F so it has to be spotify

cedar olive
#

yeah

#

๐Ÿ˜”

#

if only the name check didn't exist

celest hound
#

Not seeing any effect.

#

Tested it without the if, still appears to send the "Playing" activity type instead.

#

Discord DevTools shows 0.

#

just sanity checking

#

dont think im doing anything wrong but if I am do lmk

dull magnet
#

did u enable it?

green vessel
#

you should do appIds.includes(activity.application_id)

celest hound
#

in plugins yeah

green vessel
#

not the opposite

dull magnet
#

yeah youre checking whether a string includes an array

celest hound
#

knew it

celest hound
#

(thank god)

dull magnet
#

activity.activities[0].application_id

green vessel
#

thats activity store

dull magnet
#

oh fair

#

but check that activity is actually a flat activity

green vessel
#

idk my status is working

#

and it patches name like this

#

u love

celest hound
#

not sure

dull magnet
#

any errors in console?

celest hound
#

Not seeing any no.

green vessel
#

I mean did u rebuild and restart after u updated plugin

celest hound
#

yeah

#

im using watch and the restart client button in the vencord tab

#

yeah it doesn't even update the name

#

pretty sure im f*ing something up.

#

not sure where

green vessel
celest hound
#

ill double check my stuff

celest hound
#

got something

green vessel
#

oh

#

your plugin name shouldn't have spaces

celest hound
#

of course

#

i swear if everything starts working

green vessel
#

epicly trolled

celest hound
#

imma cry from laughter

green vessel
#

how did u not have that error before though

celest hound
#

i have not a clue.

#

now it started whining though.

cedar olive
#

hmmm

dull magnet
#

u can still have spaces but then u cant use $self

cedar olive
#

should I make custom rpc support this

dull magnet
#

mayb

green vessel
#

I will pr plugin name sanity check

cedar olive
#

it's just custom activity type 1

celest hound
#

nope not it

#

no error this time though

green vessel
#

plugin names must match ([A-Z][a-z]*)+ (fuck numbers)

celest hound
#

noted

#

worked

#

lets goo

green vessel
#

(no dont take that seriously)

celest hound
#

wait is that playback bar capable of being patched to specific app id's?

#

this btw

cedar olive
#

only users with vencord will be able to see the playback bar

celest hound
#

yeah i know that part

#

but can I only do it for a certain app id?

cedar olive
#

yeah

#

give me a sec

celest hound
#

awesome thanks

cedar olive
#

@celest hound btw dont do spaces on your plugin name

celest hound
#

yeah figured that out

#

the hard and grueling way

cedar olive
#

grrr it's gonna break the other plugin

#

adding a patch there

celest hound
cedar olive
#

well

#

you could tell your users to enable the TimeBarAllActivities plugin

green vessel
#

which plugin

cedar olive
#

TimeBarAllActivities

green vessel
#

oh

cedar olive
#

adding a patch there makes it not match

#

cuz more than 50 chars

green vessel
#

patch the patch

cedar olive
green vessel
dull magnet
#

btw u can also add a custom component to ur plugins about page @celest hound

#

settingsAboutComponent

celest hound
#

oh

dull magnet
#

if u wanna have link and stuff

celest hound
#

didnt know that

#

yeah ill add that

#

sounds good

celest hound
#

Better?

#

(yes i caught the typo lool)

delicate totem
cedar olive
#

wdym

delicate totem
#

wdym what do I mean

cedar olive
#

like support a fake playbar?

delicate totem
#

yeah

cedar olive
#

maybe

#

just have to add spotify party id

delicate totem
# celest hound

this would genuinely be a useful plugin if you make it more general (aka allowing any ID and making it possible to use other presence types other than "listening")

cedar olive
#

there's already a plugin that does that

delicate totem
#

what

cedar olive
#

TimeBarAllActivities

delicate totem
#

no what

#

that just adds a timebar

#

I'm saying changing the presence type of presences

cedar olive
#

oh

#

me dumb

delicate totem
#

it probably wouldn't be that hard in all honesty

green vessel
#

I mean I could merge my activityRenamer with this

celest hound
#

yeah

celest hound
#

few settings options

#

and what not

delicate totem
#

I would love to use that

delicate totem
#

@celest hound do you mind if I give an attempt at editing your code to make it be able to be used more generally?

delicate totem
#

alrighty

covert nimbus
cedar olive
#

I already made a pr lol

cedar olive
covert nimbus
cedar olive
#

ah

#

I think I will add a desc explaining what's needed to get a streaming rpc working

#

the minimum discord requires for it

cedar olive
foggy sierra
#

uhh...?

cedar olive
#

@dull magnet we will add displayName filter

green vessel
#

real

cedar olive
#

it's better than using byProps

green vessel
#

can't wait for discord to get rid of displayNames completely trolley

cedar olive
#

that would break our patches anyways

#

lots of finds depend on display names

#

also

#

they wont

#

cuz of this

maiden ruin
#

Hi I was wondering how to use genPluginList?

#

I ran it through node but it said Vencord isn't defined

dull magnet
#

dont run it through node?

#

what are u trying to run it for

maiden ruin
#

I'm just trying to get all the plugins installed

dull magnet
#

u paste it in discord devtools

maiden ruin
#

ah

#

tysm

delicate totem
delicate totem
#

oop

#

nevermind

#

was able to set the partyid

#

WAIT FUCK

delicate totem
#

how would you fetch user id through a vencord plugin?

trail ginkgo
#

like the id of the current logged in user

delicate totem
#

yeah

trail ginkgo
#

UserStore.getCurrentUser().id

delicate totem
#

thank you

trail ginkgo
#

npnp

green vessel
#

pnpm

trail ginkgo
#

TRU

green vessel
#

upnp

trail ginkgo
#

fals.e

#

failse.

green vessel
#

yarrn

trail ginkgo
#

unless u mean networking

#

then so true

green vessel
#

networking yes

trail ginkgo
#

upnp is so real

green vessel
#

what is other upnp

trail ginkgo
#

i ignored the universal part

#

and thought of yarn pnp

green vessel
#

oh

#

yarn pnp kinda promising but I feel impl is possibly terrible

trail ginkgo
#

its kinda silly to commit your packages imo

#

typescript doesnt support it i dont think

#

and a lot of packages break because it forces them to be read-only

green vessel
#

wait wdym commit

trail ginkgo
#

basically pnp monkeypatches node's module resolution system

#

to instead of looking at like node_modules

#

it just checks .yarn/cache in the pwd

#

which has zips of each package+version installed

#

and the idea is that u commit those zips and the pnp script

green vessel
#

that's just node_modules all over

#

what

trail ginkgo
#

yea its a little silly

green vessel
#

I thought it was like

trail ginkgo
#

we do a little polluting git history

green vessel
#

global

trail ginkgo
#

you can make it global if u want

#

but then its only zero install if u already have them installed

#

and then you do have to install packages

delicate totem
#

Is there an event for a presence update?

green vessel
delicate totem
#

oh yeah

#

I'm stupid

#

thanks <3

#

wait how do I fetch presence data?

green vessel
#

qhar

#

what data

delicate totem
#

of I guess assets might be the better word, since large image text is under that

delicate totem
#

nvm, got it

trail ginkgo
#

i cant get the data from this form with FormData

#

does anyone have a clue why

#

if you click show data its just an empty object

trail ginkgo
#

oh im silly

#

{ ...formData } => Object.fromEntries(formData.entries())

maiden ruin
#

Is there a way to dismiss the notification before the timer runs out via the console?

dull magnet
#

no

#

u can rightclick the notificiation to close it

maiden ruin
rocky compass
#

not sure if this is the right channel, but does anyone know of any extensions or projects that have the same ability to patch javascript before it's loaded (/ in real time)? I know about userscripts, but what I want would only work being able to patch the js before it's loaded

#

a tiny bit of searching in the discord finds a few old conversations about some related stuff, but no actual projects

#

(if need be i can try to just extract the important parts from vencord and make my own, but i'd rather not if I don't have to)

dull magnet
#

whats ur use case

#

@rocky compass

rocky compass
#

I'm trying to make some changes (like you might usually make with a user script) to a site I use, but it uses webpack and everything is minified and really hard to hook into. Specifically, I'm trying to mess with some requests it sends, and theoretically I could overwrite the fetch function or something like that to be able to modify it, but that kind of edit is a lot more difficult to make than it would be to do something like Vencord does

#

I could use a proxy of some kind, but I don't want to have to start it with the browser and deal with everything else that comes with that

#

@dull magnet

rocky compass
#

what do you mean

rocky compass
dull magnet
#

find what code sends request

rocky compass
#

oh, do you just mean overwriting functions with a modified version and stuff?

#

theoretically I could do that, but because of scope stuff, that becomes a lot more annoying

dull magnet
#

okay

#

i might write a blogpost about how to patch webpack

rocky compass
#

if you do, please let me know

#

even if I could just monkeypatch it, this way also seems a lot more interesting and fun

#

btw, do you know how the userscript does it? does it just monkeypatch somehow? (how is it compiled / where is the src?)

dull magnet
#

its just the same code

rocky compass
# dull magnet its just the same code

then this kind of relates to vencord for web as a whole, not just the userscript version, but how does it actually modify the code? I assumed the extension modifies the response from the server somehow (or blocks it and loads its own patched ver), but that doesn't seem possible with a userscript

dull magnet
#

monkeypatching

rocky compass
# dull magnet monkeypatching

I thought monkeypatching is just replacing the functions with a modified version / a 'proxy', but vencord modifies the actual text code, so how does it 'inject' that?

#

sorry for all the questions, i'm just trying to get my head around how vencord works

dull magnet
#

webpack uses chunking

#

the way it works is that there's a global variable webpackChunkdiscord_app

#

you can monkey patch webpackChunkdiscord_app.push to intercept chunks being pushed

#

and modify those chunks before their code is ran

rocky compass
#

oh, that's pretty cool

#

thanks, I'll look into that

rocky compass
#

it turns out you can call toString() on a function. I'm going to go re-evaluate my life choices

dull magnet
#

lol

foggy mason
#

you'll most likely have problems with inline-eval (or something similar) not being in the csp if you go down the inline patch route, so you'll either need to modify it or do inline patching a dif way (intercepting web requests)

rocky compass
woven lion
#

my react devtools are broken

dull magnet
woven lion
#

yeah

#

stable and canary

dull magnet
woven lion
#

hm it houghtt i did that alreayd

#

weird

dull magnet
empty jacinth
#

ayo not sure if this is the right channel for this, but is it okay for me to PR some improvements to LastFMRichPresence?

#

@green vessel is the credited author of it

green vessel
#

hello

#

well u can pr anything

#

what do you plan on changing?

empty jacinth
#

namely formatting stuff

empty jacinth
#

I just found out Discord shows the large image text if the activity type is listening. ๐Ÿ˜›

covert nimbus
#

wait wtf why is it purple

empty jacinth
#

isn't it normally purple?

covert nimbus
covert nimbus
#

i may be wrong

#

hold on

empty jacinth
#

maybe based on user profile colors?

#

on that note, the option to show it as playing doesn't work, and i have no idea why. thonk

covert nimbus
covert nimbus
empty jacinth
#

btw, the hideAlbumName = !trackData.album is redundant, because last.fm API always provides placeholder album art if there's no album art.

covert nimbus
#

nice

green vessel
#

.album is the album name

steady whaleBOT
#

Supporters can see the date they first listened to an album. View all supporter perks here.

Statistics

312 listeners
1148 global plays
0 plays by you
0 by you last week

Server stats

No listeners in this server.

Tracks
  1. East Bound and Down โ€” 2:46
  2. The Weight โ€” 4:58
  3. One Time One Night
  4. Bust a Move โ€” 4:24
  5. Livin' Thing โ€” 3:39
  6. It Takes Two
  7. Smoke! Smoke! Smoke! (That Cigarette) โ€” 3:02
  8. Gimme Three Steps โ€” 4:30
  9. Joy
  10. Amos Moses โ€” 2:19
  11. Instant Karma โ€” 3:35
  12. What Goes Around - My Name Is Earl Theme - Vocal version โ€” 3:09
  13. 99 Red Balloons โ€” 3:37
covert nimbus
#

oh well

covert nimbus
green vessel
#

I do that to hide the album name if the track name is the same

#

cuz that's very common for singles

empty jacinth
#

wait i quoted the wrong code lmao

green vessel
#

j

empty jacinth
#

imageUrl: (trackData.image || [])

green vessel
#

oh it doesnt sometimes

#

lastfm api is very silly

empty jacinth
#

do you know any songs in particular that don't gave placeholder album art?

empty jacinth
green vessel
covert nimbus
#

amazing

empty jacinth
#

did you provide your username and API key in settings?

green vessel
#

yeah guh

austere gulch
#

h

green vessel
#

idk a track that has missing fallback image rn but I've seen the plugin show it's own fallback multiple times so I know it happens

empty jacinth
#

might make sense to provide your own fallback then, so the album art shows up correctly.

green vessel
#

yeah it does that already

empty jacinth
#

well it replaces it with the last.fm logo

#

btw we should probably move to the thread

green vessel
#

threads will explod

empty jacinth
#

???

empty jacinth
foggy mason
#

personally i would make buttons a constant because it's never redefined and i would add brackets around the if statement so its consistent with the rest of the code but im just being picky lol

dull magnet
#

i hate you github

empty jacinth
dull magnet
#

FUCK YOU GITHUB

foggy mason
empty jacinth
#

yeah i know. i just forgor. ๐Ÿ˜‚

foggy mason
#

wrong emoji

#

๐Ÿ’€

empty jacinth
foggy mason
#

vencord has way looser code style enforcement than i would have

#

i dont think it has any

#

also prettier sucks vscode default formatter is leagues better

dull magnet
#

prettier is horrid

#

i don't enforce style much because it doesn't matter + people contributing their own plugins should be able to be fairly free to choose imo, i'm not a fan of forcing very opiniated rules for such stuff

#

i only added a baseset of sanity checks

green vessel
#

ven will hop on dprint

green vessel
empty jacinth
#

Hmm. I need to do some more testing with LastFM PR. I don't think the try catch I added is even working?

dull magnet
#

when do you intend it to throw?

#

fetch() does not throw on failed requests

empty jacinth
#

bruh i hate javascript lmao

dull magnet
#

if you want it to throw on failed requests, you need something like

const res = await fetch(...)
if (!res.ok) throw new Error(`${res.status}: ${res.statusMessage}\n${await res.text().catch(() => null) || "Unknown Error"}`);
const json = await res.json();
#

it's that way in most http implementations and most languages so idk why you'd blame javascript

#

even when it responds with smth like 400 it might still give u more info in the body so having access to the response object is useful

empty jacinth
#

statusText btw, not statusMessage

empty jacinth
#

Also turns out the API returns an error message, so I'm now throwing that instead of checking res.ok

#

@dull magnet requesting re-review ๐Ÿ™‚

dull magnet
#

you should still use res.ok

empty jacinth
#

eh, I doubt it will fail unless the user lacks internet

#

even then, it'll still catch if there's a non-API error.

potent fox
#

@dull magnet finish

green vessel
#
dzshn:dots/ (main*) % curl -sSL 'https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&api_key=<snip>&user=dzshn&limit=1&format=json' | jq '.recenttracks.track[0] | [.name, .album["#text"], .artist["#text"], .image]'
[
  "ROBBING CHASE BANK WITH A MOP",
  "",
  "Wells Fargo",
  [
    {
      "size": "small",
      "#text": ""
    },
    {
      "size": "medium",
      "#text": ""
    },
    {
      "size": "large",
      "#text": ""
    },
    {
      "size": "extralarge",
      "#text": ""
    }
  ]
]

yop @empty jacinth

#

the urls r blank for that track

#

anyways I'll check ur pr soon

empty jacinth
green vessel
#

does it rlly matter

#

last.fm logo makes more sense for me instead of their own placeholder on their website

empty jacinth
#

for some reason the API returns the star for album art placeholder.

delicate totem
#

not using fake spotify RPC smh

viral roost
#

in the src folder

empty jacinth
#

How did you install Vencord?

opal fern
#

if you didnt install manually (which is omega unsupported) not much you can do relating to userplugins

empty jacinth
#

Question. If I make a user plugin, is it possible to install node modules in the user plugin folder?

viral roost
#

plugins run within chromium, no node

empty jacinth
#

But doesn't the build script bake in node modules?

#

Emphasis on modules, not on node

#

Node modules don't always require Node. A lot of them are designed to work on the web as well.

viral roost
#

then no idea

#

plugins that depend on external libs install it asynchronously from a link

#

see plugins like InvisibleChat or ShikiCodeblocks

empty jacinth
#

I'm going to assume that's ESM modules. I'll check in a second.

#

I have no idea what you mean by InvisibleChat doing that (all I see them downloading is a PNG asset), but for ShikiCodeblocks, it looks like the dependency is just included in Vencord itself.

viral roost
empty jacinth
#

my understanding from this is that the only way i can do this in a user plugin is by adding a <script> into the webpage.

green vessel
#

how can i find an app id for a rich presence

dull magnet
#

look at what they just linked

#

but you can also just add node modules

empty jacinth
#

Somehow I didnโ€™t see the line at the bottom. lol

#

And how would I โ€œjust add node modulesโ€? Iโ€™m making a user plugin, not one to be included in Vencord.

#

Would users need to pnpm i in the plug-in directory as well?

cedar olive
#

user plugins are super unsupported

dull magnet
#

ye

empty jacinth
#

oof.

#

guess i'll just make a replugged plugin then

woven lion
#

good luck

scarlet wedge
#

๐Ÿ—ฟ

magic sorrel
#

@dull magnet i think gif collections is ready. review it when you're free

thanks

minor jolt
#

how would i go about joining a voice channel in code ?

#

navigationrouter does "visit" the channel but does not actually join it

covert nimbus
#

@minor jolt just did some testing

const whatever = findByProps("handleVoiceConnect");
whatever.handleVoiceConnect(
    {
        // ChannelStore is in webpack.Common
        channel: ChannelStore.getChannel("channel id as a string")
    }
);```
 should work
minor jolt
#

damn man that works like a charm

#

tysm

covert nimbus
#

np

#

i had to read discord source to find this

give me a bit of eye bleach

minor jolt
#

i was trying different combinations of connect and voice in the search

#

but that one didn't hit my eye

covert nimbus
#

this is where i found it

minor jolt
#

my observation skills are near zero

#

any idea how to make it screenshare ?

covert nimbus
#

uhh I do not

minor jolt
#

back to the search it is

#

ty for the help

covert nimbus
#

np

minor jolt
#

apparently there is a handleGoLive function but findByProps doesn't pick it up

cedar marsh
#

how difficult would it be to add the class .custom-theme-background to the root html?

#

or parse the existing CSS and remove the .custom-theme-background selector from all of it, replacing it with *

#

I am pretty close to replicating custom themes entirely with css, but some things require .custom-theme-background for their stuff

with my own css:

#

with the actual thing:
(note the scrollbars and folders)

#

adding theme-custom custom-theme-background theme-dark to the classlist of the root <html> perfectly matches the second screenshot

cedar olive
#

if js is gonna be needed anyways you can just trick discord to let you use the real

cedar marsh
#

part of what I want to do is choose custom gradients and theme params

cedar olive
#

you should be able to just select the element using a query selector and add the class

#

unless discord remakes it, which would make the class disappear

cedar marsh
#

discord redoes the html classlist every time you change a channel

#

I would've already written some openasar injected stuff otherwise

cedar olive
#

but do they redo the root

cedar marsh
#

no clue, honestly not sure where :root is in the dom

cedar olive
#

no I mean the root html element

#

which you want to add the class to

cedar marsh
#

the one at the very top of the dom, the one that says <html>

#

yeah thats the one I tried in the first place

cedar olive
#

and they redo it?

cedar marsh
#

yeah

cedar olive
#

you can patch where discord puts their classes and add your own

cedar marsh
#

I don't understand plugin dev that well. I am spoiled by mc modding where finding what I need to change is stupid easy because mojang provides the mappings to deobsfucate their code

cedar olive
#

let me help you

cedar marsh
#

alright

#

how do I start searching through the source code

cedar olive
#

oh I'm gonna make the plugin for you

cedar marsh
#

ah

cedar olive
#

sorry I would help you understand if I had more time

cedar marsh
#

no problem

cedar olive
#

okay this is likely it

cedar marsh
#

which component is that in?

#

Rr?

#

It has to be one of the rootish ones in the tree

cedar olive
#

search for this (565e3) and scroll down

#

I will write you a patch real quick

#

what classes do you need?

cedar marsh
cedar olive
#

include the parenthesis

cedar marsh
cedar marsh
#

yes I found it

#

alright, I think I can eventually figure this out

dull magnet
#

slap that in start of ur plugin

cedar olive
#
/*
 * Vencord, a modification for Discord's desktop app
 * Copyright (c) 2022 Vendicated and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";

export default definePlugin({
    name: "RootClassAdder",
    description: "Add classes to the root element of Discord.",
    authors: [Devs.Nuckyz],
    patches: [
        {
            find: '"theme-dark theme-amoled"',
            replacement: {
                match: /(?<=className:.+?{)/,
                replace: '"theme-custom custom-theme-background":true,',
            }
        }
    ]
});
#

here you go

cedar marsh
dull magnet
cedar marsh
#

the new client themes experiment is objectively worse than the old one because it doesn't touch the values of --background-primary and the like

#

so now things that use those values directly are ugly

#

like my custom typing indicator

#

the old one directly changed those

cedar olive
#

bruh

#

that's so bad

#

we use discord color vars for a lot of stuff

cedar marsh
#

and the new one relies entirely on OVERLAYS implemented into the css that uses the vars

cedar olive
#

incredibly horrible

cedar marsh
#

I hate powershell with every inch of my soul

cedar olive
#

lol

cedar marsh
#

why is vencord based on tab depth 4?

#

aaa

#

can someone with real nitro figure out what css the new themes thing adds to settings?

#

turns out the css I found only covers the primary client

#

or someone just needs to develop a plugin equivalent to the old client themes plugin

cedar olive
#

hmm

#

can you tell me a class that discord adds for their custom theme

#

I may be able to find the other ones

cedar marsh
#

wait what?

#

oh

#

uh

cedar olive
#

actually

#

idk it seems like it's just those 2 classes

#

theme-custom

cedar marsh
#

I will dig through the css file then

cedar olive
#

and they also added a css rule there

#

with the gradient colors

cedar marsh
#

yeah

#

I got all that

#

its actually a lot

cedar olive
#
.custom-theme-background {
  --custom-theme-background: something;
}
cedar marsh
#

you need more than what fits in a discord message, and it doesn't cover the settings

cedar olive
#

wait you can preview

cedar marsh
#

yeah thats what I have been using

#

to figure all this out

#

I only have the middle teir nitro, the one they got rid of

cedar olive
#

I will make you not able to leave the preview

#

so you can figure the rest of the css

dull magnet
#

that's what I did

dull magnet
cedar marsh
#

4 SPACES PER TAB

#

2 spaces is way better

dull magnet
#

no lol

cedar marsh
#

I'm still disgusted

cedar olive
#

@cedar marsh lmao

#

preview a theme and restart your discord

#

the theme persists

#

discord so good

cedar marsh
#

I can't get that to work

cedar olive
#

are you previewing a gradient?

cedar marsh
#

yeah

cedar olive
#

dont do anything after clicking it

#

just restart with ctrl r

#

no?

cedar marsh
#

no

cedar olive
#

ok 1 sec then

cedar marsh
cedar olive
#
/*
 * Vencord, a modification for Discord's desktop app
 * Copyright (c) 2022 Vendicated and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";

export default definePlugin({
    name: "Aaaaa",
    description: "",
    authors: [Devs.Nuckyz],
    patches: [
        {
            find: ".Messages.USER_SETTINGS_APPEARANCE_GRADIENT_THEME_TITLE",
            replacement: [
                {
                    match: /(?<=\.getGradientPreset\(\).{0,100},\i=)\i\[0\](?=.{0,50}useState)/g,
                    replace: "false",
                },
                {
                    match: /(?:\i\.)?\i\.isPreview/g,
                    replace: "false"
                }
            ]
        }
    ]
});
#

use this

#

one of those made the thing persist lol

#

did it work?

cedar marsh
#

no

#

clicking anywhere in discord yeets the active theme

cedar olive
#

ik

#

restart your discord with it applied

#

and dont open the preview menu

cedar marsh
#

lmao wtf

#

ok that works

cedar olive
#

kekw

cedar marsh
#

so the new client themes just don't touch settings at all?

cedar olive
#

eh idk completely

#

but I changed some isPreviews to false

#

and that made the theme kinda persist

cedar marsh
#

ah

#

this new client theme experiment sucks so much ass though
it doesn't touch vars

#

I need a version of discord with the old one so I can recreate it

cedar olive
#

have fun experimenting with it lol

#

I will add the funcionality to fully bypass nitro for client themes on fake nitro tomorrow or something

cedar marsh
#

alright

green vessel
#

4 spaces indentation is objectively the only real indentation

cedar olive
#

cuz it's a function inside a component

#

which means it's not exported

silk sorrel
#

Wouldn't it be easier to overwrite the canUseClientThemes to always return true?
The gradient state is kept even after a restart iirc, unless they changed something

cedar olive
#

I will work on it

covert nimbus
cedar olive
#

ew monkey patch

covert nimbus
#

i am working on a plaintext patch rn too

cedar olive
#

It's the method handleGoLive calls inside it, but that one is exported

covert nimbus
#

would this be a viable plaintext patch for the canUseClientThemes function or is it just arsejs { find: "canUseClientThemes:function", replacement: { match: /canUseClientThemes:function\(\w\){return \w*\(\w*,\w*\)}/, replace: "canUseClientThemes:function(){return true;}" } }

minor jolt
#

brazilia numero uno

dull magnet
#

you can just

{
    find: "canUseClientThemes:function",
    replacement: {
        match: /canUseClientThemes:function\(.*?\)\{/,
        replace: "$&return true;"
    }
}```
covert nimbus
#

fr?

#

nice

minor jolt
#

this got lost in general so i'll ask here if it's not a problem

#

btw is there some way to force the overlay open via the console ?
(when running it in a browser)
since the keybind doesn't work

cedar olive
#

opening the overlay in a browser?

#

I don't think that's even possible

minor jolt
#

the overlay that supposedly opens in games, you can run it in the browser

#

you can get the url from Vencord.Webpack.findStore("OverlayBridgeStore").__getLocalVars()._overlayURL

minor jolt
#

yea probably that one lol

#

i mean it does more than vc

eternal lion
#

Maybe I'm confused

minor jolt
#

it can open like a mini-discord that communicates with the normal discord

eternal lion
#

Oh

#

Weird, idk

viral roost
#

no way that works in a browser

eternal lion
#

Never heard of it

cedar olive
covert nimbus
#

pressing this used to work but it doesn't anymore

minor jolt
covert nimbus
#

uhh you might wanna censor the url there i dont trust it

minor jolt
#

it's only a local token

covert nimbus
#

oh okay

minor jolt
#

not an account one

#

basically when it loads it gives you the little prompt with the keybind

#

but the keybind doesn't work (presumably the overlay webview doesn't handle it)

#

so clicking on the prompt before it disappears is the only way to open mini-discord

#

but i want to open it from the console

#

or just force it to always open tbh

dull magnet
#

the overlay is opened by electron

minor jolt
#

yea but it has to do some js event fuckery to open it. the mini-discord div has a "visibility: hidden" attribute, if i remove it manually it shows up but i cannot type in channels and it's not complete

dull magnet
#

it opens an entirely different window

minor jolt
#

yea probably opens a different browser view and loads the above URL

#

but how does it handle the keybind

cedar olive
#

I don't think you are quite understanding

#

the overlay is only officially used by discord on the client version

#

because it requires functionalities that the browser does not support

#

keybinds are one

#

and you simply can't take that browser window you are opening with the overlay url and apply it as the normal overlay

#

impossible

#

there is absolutely no reason to use the overlay on a browser

#

It can't do its main functionality, being an overlay

minor jolt
#

hmm, my idea with this was to use it with the CEF BrowserView Api on the Steam Deck, to open the little discord window in gamescope

dull magnet
#

the overlay likely requires DiscordNative

minor jolt
#

as in the native client ?

#

i can accomodate that

dull magnet
#

why

#

just use the desktop app

minor jolt
#

don't like having a non-steam game always open on the deck

covert nimbus
covert nimbus
cedar olive
#

no problem lol

dull magnet
#

are you starring in Halloween 2023

covert nimbus
#

y'know, the scientist that existed, and then didn't?

#

mr funny haha wingdings

#

that gaster

dull magnet
#

idk

covert nimbus
#

this fuck

#

(probably)

minor jolt
#

2017 was 6 years ago

covert nimbus
#

shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up shut up i feel old now despite not being that old

#

but holy shit really

lapis swallow
#

Oof

cedar olive
#

@dull magnet I require assist

#

I built rlottie already

dull magnet
#

the install script adds rlottie to system libraries

#

you just need to manually add it to the include path when compiling

cedar olive
#

ah

#

do I add this this directory to path

dull magnet
#

inc i think

cedar olive
#

didnt work

#

oh

cedar olive
#

ooh my god I will cry

#

for gods sake what's the issue now

#

@dull magnet please assist

#

full thing

strange igloo
#

aka long long unsigned int

cedar olive
#

that's not the issue lol

dull magnet
#

it installs it

#

to ur system includes

#

idk use linux

#

windows bad

cedar olive
#

I fucking did it

covert nimbus
#

liar

cedar olive
#

and now I have more issues

#

okay I will cry

#

so bad