#๐Ÿ‘พ-core-development

1 messages ยท Page 48 of 1

austere talon
#

this is really ironic considering vencord's name

cunning canyon
stark flint
#

Aethcord trolley

austere talon
#

vfaq themes

nimble pendantBOT
#
My themes broke and now I can't open settings or disable them

open the dev tools with CTRL + Shift + i and click on the "console" tab at the top. Then paste and run (with enter) the following code.

It will

  • disable custom css (you can turn it back on in Vencord Settings)
  • copy your current theme links to your clipboard as a backup
  • remove all themes
(() => {
    Vencord.Settings.useQuickCss = false
    copy(Vencord.Settings.themeLinks.join("\n"))
    Vencord.Settings.themeLinks = []
})()
charred monolithBOT
#

open the dev tools with CTRL + Shift + i and click on the "console" tab at the top. Then paste and run (with enter) the following code.

It will

  • disable custom css (you can turn it back on in Vencord Settings)
  • copy your current theme links to your clipboard as a backup
  • remove all themes
(() => {
    Vencord.Settings.useQuickCss = false
    copy(Vencord.Settings.themeLinks.join("\n"))
    Vencord.Settings.themeLinks = []
})()
brazen phoenix
#

how scuffed is patching a component to include a prop that adds a little bottom margin on that component trolley

austere talon
brazen phoenix
austere talon
#

way simpler

brazen phoenix
#

i could add top margin to the review component, but then that's gonna make it weird on regular profile ๐Ÿ˜ตโ€๐Ÿ’ซ

austere talon
#

add a margin top to the User Reviews heading

austere talon
#

does the member since have any specific classes

brazen phoenix
austere talon
#
[class|=section]:has(> [class|=memberSinceContainer) + .ReviewDB {
    marginTop: 8px;
}```
#

should work

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
umbral hedge
#

his ass is not converting issue to discussion

charred monolithBOT
#

I notice it tends to get a bit slow loading the full member count(especially on big servers with thousands of members) so perhaps it would be faster to load an approximation? For example, load 29K instead of 29,318(as a setting, not everyone would like that change!).

Fixed!

Also, some members, like myself, don't really care about the amount of online members, so I think it would be useful to be able to disable that to declutter the member list.

You can do this with css

umbral hedge
charred monolithBOT
jagged cloak
austere talon
#

^

umbral hedge
#

guh

charred monolithBOT
charred monolithBOT
limber skiff
#

@lime stone do you still need help finding the dm widget thing? I can find it for you if you want, I iust need you to explain what that is cuz I couldn't understand

austere talon
#

i think this

jagged cloak
#

wacky it got merged finally

limber skiff
#

TAGS CREATION GLITCH

charred monolithBOT
charred monolithBOT
lament nimbus
jagged cloak
#

me when i open the inbox and delete something random called "password"

frail skyBOT
#
Bad Patches

BadgeAPI (had no effect):
ID: 655619
Match: /alt:" ","aria-hidden":!0,src:(?=.{0,10}\b([A-Za-z_$][\w$]*)\.(?:icon|key))/g

WebContextMenus (had no effect):
ID: 759725
Match: /return [A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\?(?=\(0,[A-Za-z_$][\w$]*\.jsxs?\)\([A-Za-z_$][\w$]*\.Menu)/

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

BadgeAPI (found no module):
ID: -
Match: Messages.ACTIVE_DEVELOPER_BADGE_TOOLTIP

Bad Starts

None

Discord Errors

JSHandle@error

austere talon
#

my hatred

lament nimbus
#

Honestly if you do it right a "discord pin" plugin could be cool
(Right meaning not just "overlay an element")

quaint sapphire
#

JSHandle@error is very descriptive

frail skyBOT
#
Bad Patches

BadgeAPI (had no effect):
ID: 655619
Match: /alt:" ","aria-hidden":!0,src:(?=.{0,10}\b([A-Za-z_$][\w$]*)\.(?:icon|key))/g

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

BadgeAPI (found no module):
ID: -
Match: Messages.ACTIVE_DEVELOPER_BADGE_TOOLTIP

Bad Starts

None

Discord Errors

JSHandle@error

austere talon
quaint sapphire
#

Oh nvm

lament nimbus
austere talon
#

define doing it right

quaint sapphire
#

Yeah I misunderstood what you said

austere talon
#

it's impossible to do it right if by right you mean being actually secure

quaint sapphire
austere talon
#

the right way to do it is to log out/lock your screen

lament nimbus
quaint sapphire
#

Ah yes

lament nimbus
#

though tbh just screen lock lmao

quaint sapphire
#

I always lock my screen when I leave my pc, I can't see why some people find that hard to do

quaint sapphire
charred monolithBOT
lament nimbus
#

horro

quaint sapphire
#

I can't think of an OS w/o a lockscreen

#

Wait I can

#

SerenityOS, but does that count?

lament nimbus
#

If it doesn't let you lock your computer that's on you for using a bad os

quaint sapphire
#

A person that would ask for a plugin that locks discord would most likely use an OS that has a lockscreen imho

quaint sapphire
austere talon
#

no matter how safe u make it, you can just uninstall vencord...

quaint sapphire
#

But that would leave you logged out

austere talon
#

there's no way for us to make it properly safe, just lock ur screen bruh

quaint sapphire
austere talon
#

nice update discord!!

lament nimbus
charred monolithBOT
#

When activated, freeze discord and have a notice asking for ransom to unfreeze discord.

This plugin would open the donate page.

(A tiny x button would be at the top right corner, as small as a mobile ad's close button, to unfreeze discord w/o paying.)

PS: This is an Easter egg, not an actual ransomware.

quaint sapphire
austere talon
quaint sapphire
#

Easter egg

austere talon
#

okay fixed badges

quaint sapphire
austere talon
#

ye

#

probably

charred monolithBOT
austere talon
#

what

#

whys that embed goofy

#

did discord break markdown in embeds

#
#

what

fleet depot
#

huh

fleet depot
austere talon
#
fleet depot
#

alrighty

austere talon
#

lol

#
#

??

#

weird

#

lol

#

u cant have numbers in hyperlinks

fleet depot
austere talon
#

i think i broke it somehow

frail skyBOT
#
Bad Patches

WebContextMenus (had no effect):
ID: 759725
Match: /return [A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\?(?=\(0,[A-Za-z_$][\w$]*\.jsxs?\)\([A-Za-z_$][\w$]*\.Menu)/

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

Bad Starts

None

Discord Errors
Cannot use SettingsStoreAPI without setting as dependency.

austere talon
#

ayyy

#

i did indeed fix the funny error showing as JSHandle

austere talon
# frail sky

@limber skiff settings store api jumpscare hahaha

austere talon
frail skyBOT
#
Bad Patches

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

Bad Starts

None

Discord Errors
Cannot use SettingsStoreAPI without setting as dependency.

limber skiff
#

why is that showing

austere talon
#

idk ahaha

#

both of those are weird

#

i think its cause i force load all chuinks so it loads before settings or whatever

#

but no dia

woeful sable
#

can someone point me in the direction of some sort of documentation

#

im lost asf here

#

im trying to create a plugin that, on a message sent event, it sends the contents, user, etc to a websocket

fleet depot
woeful sable
#

bruh

#

let me explain

#

so basically

#

im making a plugin for steam vr

#

so it sends me a little notifcation for discord dms

austere talon
#

I would look at a plugin that listens to messages

#

for example moyai

woeful sable
#

this is confusing asf

jagged cloak
#

i remember using some hacked up thing that hijacked streamkit to do that

#

but tbf im usually on discord with an overlay anyways

charred monolithBOT
cunning canyon
#

oh my god why does this client mod not have 4-digit passcode lock
literally unusable must uninstall !!111!!1

charred monolithBOT
lament nimbus
woeful sable
charred monolithBOT
limber skiff
#

wtf

#

markdown is dying

#

wait did I break it with fake nitro thing ๐Ÿคจ

#

ok good

#

I did not

#

discord did ๐Ÿ˜‚

limber skiff
charred monolithBOT
limber skiff
#

foxymachine is typing...

golden gulch
#

@woeful sable for your steamVR usecase, I kinda suggest that you look into discord's existing options for game integrations. You can subscribe to and listen for notifications over the RPC socket that discord already runs, and you won't be depending on a client mod to implement it. Additionally, discord specifically allows subscribing just to notification events, so you wouldn't even need to do any message filtering yourself.

#

(I'm very late but better late than never)

#

the RPC socket is pretty easy to get working (libraries in most languages, if you want to go that route) and tbh much more reliable in the long run than trying to implement a plugin for a client mod (no matter how simple the plugin is)

lime stone
#

that is what i meant yes

charred monolithBOT
lime stone
#

i probably could've found it by searching for other things, it can be very hard though :P

lime stone
charred monolithBOT
lime stone
#

i've managed to patch!

#

although I should probably make it hidden in streamer mode

#

force pushing was a mistake

#

i think i've crashed github oops /j

tight vapor
#

a

quaint sapphire
#

CHECK OUT THE PLUGIN HERE: https://github.com/yoavbls/pretty-ts-errors

I have no idea how I survived without pretty-ts-errors before but it is quickly becoming an essential part of my TypeScript experience. VS Code support for now, more soon?

Hopefully that's enough keywords for people to find this vid in the future

ALL MY VIDEOS ARE POSTED E...

โ–ถ Play video
lime stone
#

i haven't used typescript much but it's hard to believe this is what you have to deal with!

quaint sapphire
#

yep yep

#

you either have to train your eye to read the blob of text in the error message, or just give up

#

not many choices

#

but this plugin makes life easier

pure skiff
#

from the markdowned diagnostic messages

charred monolithBOT
lime stone
#

ahh so this is why pronouns don't show in the modal

#

this needs to be patched too, but they didn't reuse the component :c

#

they just created another one on the spot it seems lol

woeful sable
charred monolithBOT
#

i was on the edge for a while inbetween using betterdiscord and vencord JUST for this plugin, but to be honest vencord is so clean and neat, this plugin would be the cherry on top.

i really just donโ€™t want friends who visit me to check my dms, you know? and for my keybinds to reset once i log out, and take like 10 tries to log in because i cant type my 40 something letter long password

jagged cloak
#

hm what's private beta

charred monolithBOT
#

because notifications arent the problem, say a family member asks you โ€œcan you go do that?โ€ instead of logging out and taking time to log back in and keybinds dont even save, you just do ctrl L, look at the better discord plugin and youโ€™ll understand, however i do see how this can be confusing.

also, locking my computer doesnโ€™t really work as it also means i have to put a password which is long there already. and most of my family members use the pc too, not just me so yeah.

From w...

austere talon
#

they don't know how to make components reusable

#

So they just copy paste code for minor changes

jagged cloak
#

true

charred monolithBOT
#

i already requested this before https://github.com/Vendicated/Vencord/discussions/659
i feel like this is the biggest plugin that vencord is missing right now and the 75153 people that downloaded it from betterdiscord agree with me

Download count != People that use it

One person can download the same plugin thrice, does that person count as 3 people?

(Yes I am not that dumb, I understand the message that's actually being conveyed)

#

that doesnโ€™t fix how keybinds donโ€™t really save, and also a qr code takes long anyways too,
just look at how the better discord plugin works.

and yes, its so they donโ€™t see it on accident, or well, the original works for both situations really, but now that i switched to vencord i have to logout every so often.

I didn't really see the other thread where you talked about the keybinds before I sent the message you replied to.

As for the security, it only works for people that are not...

#

thats what they say, but it had worked really well for me for a pretty good time, thereโ€™s a reason a bunch of people have the plugin, and if anything even a plugin that helps save keybinds would be real nice. iโ€™m really set on the lock idea though. also eventually iโ€™d be asked for the pin if i locked my pc, now for discord i can be like โ€œyou donโ€™t need itโ€

lime stone
#

whyy

cunning canyon
lime stone
#

maybe the patch could just replace the duplicate component with the other one which looks exactly the same

charred monolithBOT
austere talon
#

stop

charred monolithBOT
jagged cloak
#

most active GitHub discussion

austere talon
#

bruh I just locked it

jagged cloak
#

discussion lagger

charred monolithBOT
lime stone
#

i kind of still have an issue

#

it does work though

charred monolithBOT
lime stone
#

hm, maybe i needed to update again

#

or maybe it's just being inconsistent

#

yes, the error has gone after reinstalling

#

but it wasn't there before ๐Ÿ˜ตโ€๐Ÿ’ซ

charred monolithBOT
quick ibex
#

E

lime stone
#

github is behind

#

(webhook)

charred monolithBOT
austere talon
#

from arguments

#

arguments is a magic variable that refers to the arguments of the current function

#

(0,p.Z)() is the same as var a = p.Z; a()

austere talon
#

i hope what i'm saying makes sense to you? @lime stone

#

if no just feel free to ask

lime stone
lime stone
austere talon
#

different semantics

#

this changes

lime stone
#

poof

austere talon
#

/run ```js
const someObj = {
method() { console.log(this) }
}

someObj.method();
(0, someObj.method)()

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

{ method: [Function: method] }
<ref *1> Object [global] {
  global: [Circular *1],
  queueMicrotask: [Function: queueMicrotask],
  clearImmediate: [Function: clearImmediate],
  setImmediate: [Function: setImmediate] {
    [Symbol(nodejs.util.promisify.custom)]: [Getter]
  },
  structuredClone: [Function: structuredClone],
  clearInterval: [Function: clearInterval],
  clearTimeout: [Function: clearTimeout],
  setInterval: [Function: setInterval],
  setTimeout: [Function: setTimeout] {
    [Symbol(nodejs.util.promisify.custom)]: [Getter]
  },
  atob: [Function: atob],
  btoa: [Function: btoa],
  performance: Performance {
    nodeTiming: PerformanceNodeTiming {
      name: 'node',
      entryType: 'node',
      startTime: 0,
      duration: 42.83453369140625,
      nodeStart: 3.3094940185546875,
      v8Start: 6.3908843994140625,
      bootstrapComplete: 33.70618438720703,
      environment: 16.927398681640625,
      loopStart: -1,
      loopExit: -1,
      idleTime: 0```
lime stone
#

ah, you forgot the run

#

oh, thanks!

austere talon
#

see how it's the object the first time and the global the second time

lime stone
#

so this stays the same

#

what's the 0 for?

austere talon
#

it's just to get the value of the function

#

(0,"a") just returns "a"

lime stone
#

wait i guess you're using some kind of comma operator

austere talon
#

the same happens when storing the func in a variable

#

/run ```js
const someObj = {
method() { console.log(this.method) }
}

someObj.method();
(0, someObj.method)();
var variable = someObj.method;
variable()

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

[Function: method]
undefined
undefined
lime stone
#

i hate js sometimes (most times)

austere talon
#

the reason the code uses (0,method)() is because of how Discord's code looked:

import { method } from "someplace"

method()
lime stone
#

ohh

austere talon
#

so it compiles to

var a = require("someplace")
(0,a.method)()
#

if it didn't do this, and instead did a.method(), that would change the semantics of the code

lime stone
#

ah, but i guess here it doesn't matter?

austere talon
#

it doesn't matter in 99% of cases but still needs to be done by the bundler to preserve semantics

lime stone
#

yes..

austere talon
#

you can just call it directly if that's what you're asking, yeah

#

but yeah that's why you see (0,foo.bar)() everywhere

lime stone
#

i guess it could create confusing errors otherwise

austere talon
lime stone
#

so just pretend the 0 isn't there and remove the redundant parentheses

#

thank you!

austere talon
#

the 0 is just to use the comma operator

lime stone
austere talon
#

/run ```js
const obj = { method() { console.log(this.method) } };

(obj.method)();
(0,obj.method)();

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

[Function: method]
undefined
lime stone
#

xD

#

yes..

#

so does it matter what 0 is?

austere talon
#

yes

#

it's whatever

#

the important stuff is just the comma operator, as it returns the rightmost thing as a value

#

oh

#

no it doesnt matter at all what the 0 is

#

you could also do (obj.method,1+1,object.method(),window,globalThis,obj.method)()

lime stone
#

so everything would be evaluated but only the last called?

austere talon
#

yes

#

exactly

lime stone
#

so i guess it allows you to run random code without "touching the ground"

austere talon
#

anyway u dont need to worry about this

lime stone
#

touching the ground = ;

austere talon
#

just pretend it's not there :P

lime stone
#

ok lol

#

it is interesting

#

this feels like something you don't need unless you're doing super... low-level... js!

#

lol

austere talon
#

yeah you wouldn't ever encounter this in normal code

lime stone
#

i'm pretty sure i remember other ways to do it

#

bind i think

#

i guess this is shorter

austere talon
#

Well bind has a different purpose

#

the purpose of this is to not have any this attached

#

the purpose of bind is to have a custom this attached

austere talon
#

/run ```js
const MyCoolLogger = {
log(...args) {
console.log("MyCoolLogger", ...args)`
},
error(...args) {
this.log("error", ...args)
}
}

MyCoolLogger.error("oh no!!");
[1, 2, 3].forEach(v => MyCoolLogger.error(v));
[1, 2, 3].forEach(MyCoolLogger.error);

vital lionBOT
#

@austere talon I only received js(18.15.0) error output

/piston/jobs/831f7786-2b1f-4182-a1e6-815bb0146654/file0.code:13



SyntaxError: Unexpected end of input
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
austere talon
#

erm

lime stone
#

oh no!!

#

/run

const MyCoolLogger = {
    log(...args) {
        console.log("MyCoolLogger", ...args)
    },
    error(...args) {
         this.log("error", ...args)
    }
}

MyCoolLogger.error("oh no!!");
[1, 2, 3].forEach(v => MyCoolLogger.error(v));
[1, 2, 3].forEach(MyCoolLogger.error);
vital lionBOT
#

Here is your js(18.15.0) output @lime stone

MyCoolLogger error oh no!!
MyCoolLogger error 1
MyCoolLogger error 2
MyCoolLogger error 3
/piston/jobs/a49a9b3d-9b08-4358-8096-a3039dff1fe7/file0.code:6
         this.log("error", ...args)
              ^

TypeError: this.log is not a function
    at error (/piston/jobs/a49a9b3d-9b08-4358-8096-a3039dff1fe7/file0.code:6:15)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/piston/jobs/a49a9b3d-9b08-4358-8096-a3039dff1fe7/file0.code:12:11)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
austere talon
#

same thing

lime stone
#

you had a `

austere talon
#

you pass MyCoolLogger.error to forEach as a value

#

So you remove the this context

#

I still think this behaviour is really dumb and shouldn't exist

#

but it's too late for js to change it now

lime stone
#

yes

quaint sapphire
lime stone
#

virtually everything in js makes no sense to me though

austere talon
lime stone
#

idk if you can see without this plugin but

#

it's green!

austere talon
#

I'm on phone

lime stone
#

ohh

quaint sapphire
austere talon
austere talon
#

I struggled with that a lot as a beginner

lime stone
#

yes

#

it should act like java's MyCoolLogger::error

austere talon
#

as an experienced js developer you just know you can't pass a method as a value like that

austere talon
lime stone
#

or c++'s same thing with & at the beggining

#

although this is kind of acting as a class with all static methods i guess

austere talon
#

js classes are just really bad!

#

which is why I almost always opt not to use a class

lime stone
#

oh, yes

#

js feels like twitter with the #variables

austere talon
#

and ive rented about them a lot of times

#

they're truly private with no way to access them outside of the class

#

which is just terrible

lime stone
#

don't you want things private sometimes?

#

i personally find it a hassle that you need to type the prefix when accessing them

austere talon
#

there are many many valid use cases for wanting to access private members

#

and every language doing it correctly offers you ways to do that

lime stone
#

well that's what reflection is often for

austere talon
#

yes

#

but js doesnt have reflection

#

it's just impossible to access them

lime stone
#

ah, js doesn't have it does it :(

#

impossible? oh dear

austere talon
#

you need a native library doing magic with the native javascript engine like v8 or use the debugger

lime stone
#

or patching it i guess

austere talon
#

but that's not portable and impossible in the browser

#

java does this right

#

java even lets u change final members :3

lime stone
#

i don't think you can any more

austere talon
#

u can

lime stone
#

how?

#

it requires reflection on reflection iirc

quaint sapphire
#

This reminded me of c#
Where the visibility is kinda fake

It only applies at compile time, so if you target a fake dll that has everything public, even when you use the real dll at runtime it will work fine.

lime stone
#

oh, java has an illegalaccesserror iirc

lime stone
#

and do a casual & ~Opcodes.ACC_FINAL or whatever (i think)

quaint sapphire
#

We don't really need visibility modifiers in JS

#

You can use a scoped variable that is not exported anywhere

lime stone
#

or have something about being fired in the name lmao

quaint sapphire
lime stone
#

sometimes you want stuff private so that it's clear it's internal

quaint sapphire
#
const gg = () => {
    let scopedVariable = "hi";
    return {
        getTxt() { return scopedVariable; }
    }
}

gg().getTxt()
#

Should work

#

(I'm on mobile)

austere talon
#

/run ```java
import java.lang.reflect.*;

class Silly {
private final String j;
private static final Silly instance = new Silly("heh");

public Silly(String j) {
this.j = j;
}

public static void main(String... args) throws Throwable {
var modField = Field.class.getDeclaredField("modifiers");
modField.setAccessible(true);
var instanceField = Silly.class.getDeclaredField("instance");
modField.set(instanceField, instanceField.getModifiers() & ~Modifier.FINAL);
instanceField.set(null, new Silly("oop"));
System.out.println(instance.j);
}
}

vital lionBOT
#

@austere talon I only received java(15.0.2) error output

Exception in thread "main" java.lang.NoSuchFieldException: modifiers
	at java.base/java.lang.Class.getDeclaredField(Class.java:2569)
	at Silly.main(file0.code.java:12)
austere talon
#

hiddenapi ported to desktop

lime stone
#

i've tried this on newer java versions and it doesn't work

austere talon
#

cause they filter what u can access

lime stone
#

yes

#

pretty sure this is only <=8

austere talon
#

no

#

it still works on latest

#

u just gotta bypass reflection limits

lime stone
#

how do you do that?

#

:i_tried:

#

i think you have to do it with command-line flags

#

is there any way which doesn't require that?
i don't think so

quaint sapphire
#

I'd assume it depends on the JVM

austere talon
#

broken in java16+

#

but u can disable the limitations

#

hold on

lime stone
#

something like --allow-access

#

rn i'm trying to get a good string to search but devtools keeps crashing xd

#

hm, ,"--profile-gradient-primary-color" should work

austere talon
#

/run ```java
import java.lang.reflect.;
import java.lang.invoke.
;

class Silly {
private final String j;
private static final Silly instance = new Silly("heh");

public Silly(String j) {
this.j = j;
}

public static void main(String... args) throws Throwable {
var lookup = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup());
var modifiers = lookup.findVarHandle(Field.class, "modifiers", int.class);

var instanceField = Silly.class.getDeclaredField("instance");
modifiers .set(instanceField, instanceField.getModifiers() & ~Modifier.FINAL);
instanceField.set(null, new Silly("oop"));
System.out.println(instance.j);

}
}

vital lionBOT
#

@austere talon I only received java(15.0.2) error output

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access using Lookup on Silly (file:/piston/jobs/94693477-efff-4b6c-99f5-55f392b2e90f/file0.code.java) to class java.lang.reflect.Field
WARNING: Please consider reporting this to the maintainers of Silly
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.IllegalAccessException: Can not set static final Silly field Silly.instance to Silly
	at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:76)
	at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:80)
	at java.base/jdk.internal.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
	at java.base/java.lang.reflect.Field.set(Field.java:793)
austere talon
#

Please consider reporting this to the maintainers of Silly

austere talon
#

/run ```sh
cat > Silly.java << 'EOF'
import java.lang.reflect.;
import java.lang.invoke.
;

class Silly {
private final String j;
private static final Silly instance = new Silly("heh");

public Silly(String j) {
this.j = j;
}

public static void main(String... args) throws Throwable {
var lookup = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup());
var modifiers = lookup.findVarHandle(Field.class, "modifiers", int.class);

var instanceField = Silly.class.getDeclaredField("instance");
modifiers .set(instanceField, instanceField.getModifiers() & ~Modifier.FINAL);
instanceField.set(null, new Silly("oop"));
System.out.println(instance.j);

}
}
EOF

javac Silly.java
java --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED Silly

vital lionBOT
#

@austere talon I only received sh(5.2.0) error output

file0.code: line 25: javac: command not found
file0.code: line 26: java: command not found
austere talon
#

explod

#

anyway trol

lime stone
#

anyway

austere talon
#

LOL

#

what were u even doing

lime stone
#

i think it was nanohttpd and i didn't like the logger

#

lmao

austere talon
#

i think the best way to do this now is to use JNI

#

android has so called HiddenAPI, stuff u cant access with reflection but u can easily bypass it with JNI

lime stone
#

or just use a ClassLoader?

#

or instrumentation?

austere talon
grave mangoBOT
# austere talon https://github.com/Aliucord/hook/blob/main/core/src/androidTest/java/com/aliucor...

**UnitTest.java: **Lines 130-152

// Should fail due to being hidden api
try {
    obtainHiddenMethod();
} catch (NoSuchMethodException ignored) {
    hiddenMethodFound = false;
}
try {
    obtainHiddenField();
} catch (NoSuchFieldException ignored) {
    hiddenFieldFound = false;
}

assertFalse("Method found without bypass", hiddenMethodFound);
assertFalse("Field found without bypass", hiddenFieldFound);

XposedBridge.disableHiddenApiRestrictions();

// Now should work
var method = obtainHiddenMethod();
var field = obtainHiddenField();

assertEquals(method.getName(), "setHiddenApiExemptions");
assertEquals(field.getType(), Class.forName("dalvik.system.VMRuntime$HiddenApiUsageLogger"));
lime stone
#

wait nvm i don't think you can change flags when the class is already loaded

#

unless you're using a special โœจ jvm

#

but if you're making a mod for something you probably are using a classloader!

austere talon
#

i love java for this kinda stuff

#

just make ur own jdk fork Clueless

#

or use Unsafe

lime stone
#

hehe

austere talon
#

u can very likely still do this with Unsafe

lime stone
#

(i.e. it's unlikely to stop working)

#

i'm curious why you'd want to modify something final if you're not also doing other magic

#

one issue is that arguments[0] would need to be captured ๐Ÿ˜”

#

oh well not too hard

#

imagine if discord was made with awt!

austere talon
#

yeah u can still do this with unsafe

lime stone
#

oh, nice!

#

but it's unsafe

austere talon
#

/run ```java
import java.lang.reflect.;
import java.lang.invoke.
;
import sun.misc.Unsafe;

class Silly {
private final String j;
private static final Silly instance = new Silly("heh");

public Silly(String j) {
this.j = j;
}

public static void main(String... args) throws Throwable {
var f = Unsafe.class.getDeclaredField("theUnsafe");
f.setAccessible(true);
var unsafe = (Unsafe) f.get(null);

unsafe.putObject(instance, unsafe.objectFieldOffset(Silly.class.getDeclaredField("j")), "oop");
System.out.println(instance.j);

}
}

vital lionBOT
#

Here is your java(15.0.2) output @austere talon

oop
charred monolithBOT
lime stone
#

this looks like directly accessing memory though which doesn't look good

austere talon
#

it does LOL

#

thats the entire point of Unsafe :P

lime stone
#

you're changing what it points to?

austere talon
lime stone
#

hm

#

time to try it with different types!

austere talon
#

but yeah Unsafe is like the name implies inherently unsafe as it allows u to do raw memory manipulation

#

it literally has memCpy

lime stone
#

/run

import java.lang.reflect.*;
import java.lang.invoke.*;
import sun.misc.Unsafe;

class Silly {
  private final String j;
  private static final Silly instance = new Silly("heh");

  public Silly(String j) {
    this.j = j;
  }

  public static void main(String... args) throws Throwable {
    var f = Unsafe.class.getDeclaredField("theUnsafe");
    f.setAccessible(true);
    var unsafe = (Unsafe) f.get(null);

    unsafe.putObject(instance, unsafe.objectFieldOffset(Silly.class.getDeclaredField("j")), new Silly("oop"));
    System.out.println(instance.j);
  }
}
vital lionBOT
#

Here is your java(15.0.2) output @lime stone

Silly@4d49af10
lime stone
#

/run

import java.lang.reflect.*;
import java.lang.invoke.*;
import sun.misc.Unsafe;

class Silly {
  private final int j;
  private static final Silly instance = new Silly(2);

  public Silly(int j) {
    this.j = j;
  }

  public static void main(String... args) throws Throwable {
    var f = Unsafe.class.getDeclaredField("theUnsafe");
    f.setAccessible(true);
    var unsafe = (Unsafe) f.get(null);

    unsafe.putObject(instance, unsafe.objectFieldOffset(Silly.class.getDeclaredField("j")), new Silly("oop"));
    System.out.println(instance.j);
  }
}
vital lionBOT
#

@lime stone I only received java(15.0.2) error output

file0.code.java:18: error: incompatible types: String cannot be converted to int
    unsafe.putObject(instance, unsafe.objectFieldOffset(Silly.class.getDeclaredField("j")), new Silly("oop"));
                                                                                                      ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
error: compilation failed
lime stone
#

/run

import java.lang.reflect.*;
import java.lang.invoke.*;
import sun.misc.Unsafe;

class Silly {
  private final int j;
  private static final Silly instance = new Silly(2);

  public Silly(int j) {
    this.j = j;
  }

  public static void main(String... args) throws Throwable {
    var f = Unsafe.class.getDeclaredField("theUnsafe");
    f.setAccessible(true);
    var unsafe = (Unsafe) f.get(null);

    unsafe.putObject(instance, unsafe.objectFieldOffset(Silly.class.getDeclaredField("j")), new Silly(5));
    System.out.println(instance.j);
  }
}
vital lionBOT
#

Here is your java(15.0.2) output @lime stone

-518367768
lime stone
#

haha

#

this is very unsafe indeed

#

/run

import java.lang.reflect.*;
import java.lang.invoke.*;
import sun.misc.Unsafe;

class Silly {
  public static void main(String... args) throws Throwable {
    var f = Unsafe.class.getDeclaredField("theUnsafe");
    f.setAccessible(true);
    var unsafe = (Unsafe) f.get(null);

    unsafe.getByte(0);
  }
}
vital lionBOT
#

Here is your java(15.0.2) output @lime stone

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9fcd2c247e, pid=5995, tid=5996
#
# JRE version: OpenJDK Runtime Environment (15.0.2+7) (build 15.0.2+7-27)
# Java VM: OpenJDK 64-Bit Server VM (15.0.2+7-27, mixed mode, sharing, tiered, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# J 135 c1 jdk.internal.misc.Unsafe.getByte(J)B java.base@15.0.2 (7 bytes) @ 0x00007f9fcd2c247e [0x00007f9fcd2c2420+0x000000000000005e]
#
# Core dump will be written. Default location: /piston/jobs/1d92ba6f-7682-4301-b66d-adcd3ffb5535/core.5995
#
# An error report file with more information is saved as:
# /piston/jobs/1d92ba6f-7682-4301-b66d-adcd3ffb5535/hs_err_pid5995.log
Compiled method (c1)    1142  135       3       jdk.internal.misc.Unsafe::getByte (7 bytes)
 total in heap  [0x00007f9fcd2c2290,0x00007f9fcd2c2580] = 752
 relocation     [0x00007f9fcd2c23e8,0x00007f9fcd2c2410] = 40
 main code      [0x00007f9fcd2c2420,0x00007f9fcd2c2500] = 224
 stub code      [0x00007f9fcd2c2500,0x00007f9fcd2c2530] = 48
 metadata       [0x00007f9fcd2c2530,0x00007f9fcd2c2538] = 8
 scopes data    [0x00007f9fcd2c2538,0x00007f9fcd2c2548] = 16
 scopes pcs     [0x00007f9fcd2c2548,0x00007f9fcd2c2578] = 48
 dependencies   [0x00007f9fcd2c2578,0x00007f9fcd2c2580] = 8
austere talon
#

haha

lime stone
#

do you mind if i just hardcode e or should i capture it?

austere talon
#

Aliucord uses unsafe a bunch

lime stone
#

whyy

austere talon
#

we mainly use it for unsafe.allocateInstance()

lime stone
#

why do you need that?

austere talon
#

which lets u allocate instances of classes without invoking constructor

#

aka of classes you normally wouldn't be able to construct

lime stone
#

such as..?

austere talon
#

for example any class that has a private constructor

lime stone
#

you can use reflection for that

#

right..?

austere talon
#

some classes are impossible to construct

#

a lot of Discord's auto generated classes are

#

their gson classes

lime stone
#

they auto-generate gson classes?

#

why do you need to create them?

#

ohh, i see you probably do

austere talon
lime stone
#

i guess if you want to create a custom instance of something normally deserialised from json

austere talon
lime stone
#

actually relevant

austere talon
lime stone
#

well you could just transform it away?

#

idk, i need to see how aliucord works

lime stone
austere talon
#

why would u hardcode e?

#

just use arguments[0]

lime stone
#

oh, you can do that?

#

what's arguments?

austere talon
#

/run ```js
function foo(e) {
console.log(arguments[0])
}

foo("meow")

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

meow
austere talon
lime stone
#

oh my god

#

i didn't realise you meant literally!

#

this is very design

austere talon
#

i think the most cursed thing about arguments is that it syncs with the actual argument variables

#

/run ```js
function foo(e) {
arguments[0] = "eeeeh?";
console.log(e);
}

foo("meow")

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

eeeeh?
lime stone
#

it's a pointer??

#

well i guess pointers are everywhere but hidden :p

#

what if you pass arguments into another function?

austere talon
#

/run ```js
function printMyFirstArg() {
console.log(printMyFirstArg.caller.arguments[0]);
}

function foo(e) {
printMyFirstArg()
}

foo("hiii")

vital lionBOT
#

Here is your js(18.15.0) output @austere talon

hiii
austere talon
#

javascript is a beautiful language

#

Function.caller & Function.arguments are both deprecated tho and won't work in strict mode which discord uses AyameXD

limber skiff
#

wtf you can access parent arguments

#

insane

austere talon
#

you can access the entire callstack and all their arguments

#

but deprecated and throws an error in strict mode

limber skiff
#

๐Ÿ˜ญ

#

meh

#

it would be bad to depend on that

#

if the order changes you are screwed

austere talon
#

discord's code is strict so we can't

#

vencord is strict too

#

js has so many cursed things

lime stone
#

oh so we can't do arguments[0] after all?

#

:c

austere talon
#

no you can

#

arguments is not deprecated

#

only function.arguments is

lime stone
#

whaat

#

ok

#

i just want to compile java into js at this point

austere talon
quaint sapphire
#

Why not use kotlin?

lime stone
#

personally i prefer java

quaint sapphire
#

Better than java and can compile to js

lime stone
#

they're both cool though!

quaint sapphire
austere talon
#

kotlin js is unusable

lime stone
#

i find it awkward doing var thing: Type

#

also final arguments is annoying

#

i like mutating things to the point of them not being recognisable!

quaint sapphire
#

I don't get what you mean by final arguments

austere talon
lime stone
#

you often have to in kotlin though

#
fun noFun(input: String) {
    input += "hi";
}

this doesn't work :c

austere talon
#
- const foo: SomeType = bar
+ const foo = bar as SomeType
quaint sapphire
austere talon
#

i prefer the 2nd

lime stone
#

i also kind of prefer optionals to null, but javas lambdas kind of ruin it

austere talon
#

optionals??

austere talon
#

i hate optionals they're terrible

lime stone
#

hm, maybe just don't use null then

quaint sapphire
lime stone
#

null is very not good

#

i don't usually write ts

austere talon
#

null is good

quaint sapphire
#

Look, I can spend an entire day hating java, but I won't, cause java ain't worth my time

austere talon
lime stone
#

anyway i find java is a better experience for me

#

one of the main reasons is because intellij takes too much ram and eclipse and netbeans have virtually no support

quaint sapphire
lime stone
#

well eclipse keeps hanging

quaint sapphire
#

You will fall in love with LINQ

lime stone
quaint sapphire
#

That's old

#

It got a lot of improvements lately

lime stone
#

well i'm on linux so i can't use vs

#

generally i enjoy writing java

quaint sapphire
#

You don't need VS for C#

lime stone
#

well there's rider which costs money

quaint sapphire
#

And you can run C# on Linux with mono

lime stone
#

i think there's a vsc extension?

lime stone
quaint sapphire
lime stone
#

are there any other good options?

#

i haven't tried the vsc properly

quaint sapphire
#

Uhh, vscode should work well enough

But I prefer Rider

lime stone
#

i think it's a recurring payment though - i'm not a fan of those

austere talon
#

u can get rider for free if you're a student or open source developer

jagged cloak
#

yop

#

my GitHub thing runs out in like a month or two

#

I will be open source developer yopo

austere talon
#

i could request some intellij licenses for vencord

jagged cloak
charred monolithBOT
#

So, i was using discord-screenaudio (i'm using Arch btw) for a while now, and it is very convenient since standart discord client can't even stream sound out-of-the-box, and i, unlike many linux users, am too lazy to fix this issue myself.
Vencord has some very cool plugins, but it seems that the installer cannot install it on a discord-screenaudio client. Will there be any way to fix this, or, perhaps, a similar feature?

golden gulch
# woeful sable private beta :/ and not accepting new members

you can still use it just fine, right underneath the private beta notice is this

For connections to the RPC server, a list of approved testers is used to restrict access while you're still developing. You can invite up to 50 people
It's not amazingly ideal but it's no worse than needing a client mod to use it.

austere talon
#

@pure ledge is this alright?

charred monolithBOT
lime stone
#

hmm, for the profile panel it will be hard to locate this

#

function o

#

there's nothing both unique and unchanging here

austere talon
#

whats that

lime stone
#

the profile panel always uses the global theme setting afaik

#

it doesn't matter whether the accessibility option is on or off

austere talon
lime stone
#

useTheme?

pure ledge
#

thats cool

lime stone
#

what's that?

pure ledge
#

it shouldnt have that much of an effect

#

if im right

austere talon
#

this is the entire code of that module

pure ledge
#

people only wont get notified from when they last closed discord to when relationshipnotifier updates

lime stone
#

i'm trying to do this inside the patch

austere talon
#

yes but useStateFromStores is stateful

#

it will update whenever the value changes

lime stone
#

ohh, well in my testing the theme made the code run again anyway

#

basically all i know about react is it's meant to make a thing happening make another thing happen lmao

#

could i just pass in useTheme()?

austere talon
#

that means discord is already using useTheme somewhere

#

so u dont have to anymore

lime stone
#

how would i use this inside a patch?

#

well i guess i could extract it to two separate functions

austere talon
#

tested my pr and it seems to work

charred monolithBOT
austere talon
#

so they will lose like 10 seconds of coverage at most

pure ledge
#

yeah

charred monolithBOT
lime stone
#

is it OK to use the name arg0?

#

it's just a sort of hook

charred monolithBOT
austere talon
lime stone
#

inspired by eclipse ide

#

lol

#

i'm pretty sure that's what it defaults to if it doesn't have any local variable info

#

(when overriding)

austere talon
#

wait did typing indicator break

#

oh no

charred monolithBOT
austere talon
#

its just that it's trying to get current user

charred monolithBOT
lime stone
#

wait useTheme is from shikicodeblocks

#

ohh, right

#

you were talking about a hypothetical module

austere talon
#

thats useTheme

lime stone
#

i explained it badly!

#

anyway no need to use it!

#

i've made it much cleaner now! :3

#

tysm for the help!

charred monolithBOT
lime stone
austere talon
lime stone
#

ah..

#

i think e => would be cleaner

#

done

charred monolithBOT
fleet depot
#

...but it just looks like discord ๐Ÿ˜‚

#

do they want something like:

jagged cloak
#

the screenshots from chrome/firefox extension work lol

charred monolithBOT
charred monolithBOT
charred monolithBOT
limber skiff
austere talon
#

no

#

just spams errors when u switch account using account switcher

#

about reading property id on undefined

lime stone
austere talon
#

which comes from UserStore.getCurrentUser().id

lime stone
#

i hope :p

limber skiff
#

oh lol

charred monolithBOT
charred monolithBOT
limber skiff
austere talon
#

making plugin cards is pain

charred monolithBOT
jagged cloak
#

true

charred monolithBOT
austere talon
#

whats a ImplicitRelationship

woeful sable
#

in the friend list

frail skyBOT
#
Bad Patches

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

Bad Starts

None

Discord Errors

woeful sable
#

some people that are not even your friend show up thrre

#

these people have implicit relationship with you

#

and thats why they appear there

median rapids
woeful sable
#

ong dolfies ,.,.

median rapids
#

tl;dr: people you are likely to be friends with

median rapids
woeful sable
#

truly

#

explode

median rapids
#

aww shucks

frail skyBOT
#
Bad Patches

WebContextMenus (had no effect):
ID: 638525
Match: /(?<=showApplicationCommandSuggestions;)if\(![A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*\)/

WebContextMenus (had no effect):
ID: 638525
Match: /("submit-button".+?)(\(0,[A-Za-z_$][\w$]*\.jsx\)\([A-Za-z_$][\w$]*\.MenuGroup,\{children:[A-Za-z_$][\w$]*\}\),){2}/

Bad Starts

None

Discord Errors
Cannot use SettingsStoreAPI without setting as dependency.

limber skiff
#

I tried with my account and I got nothing

calm shore
limber skiff
#

nop

#

wait

#

yes

#

vencord blocks tracking though

calm shore
cunning canyon
#

omfg gold bug hunter

limber skiff
austere talon
#

I have it off as well lol

#

I have all of them off bleh

median rapids
#

yeah then affinities wont exist for you

charred monolithBOT
lament nimbus
charred monolithBOT
charred monolithBOT
crisp bison
#

has anyone requested soundboard available in private vcs yet?

jagged cloak
#

at least someone is using that group for something

limber skiff
cunning bobcat
#

PFFT

limber skiff
#

even adding sounds in your side only

cunning bobcat
#

aliucoin, the new currency

limber skiff
#

would need a lot of work, but seems super doable

crisp bison
#

and bypass nitro check

limber skiff
#

hm

#

I dunno actually

#

depends on how discord plays the sounds

#

if it's in your client it's doable

#

else we can't

crisp bison
#

in client i believe cos the sound comes from you

limber skiff
#

ig

#

SoundboardPlus

charred monolithBOT
cunning bobcat
#

why is aliuplugins here

verbal pumice
#

why not

charred monolithBOT
#

Kinda lame but there is a similar one in bd where it automatically types an uppercase letter in the beginning of you text and also after each . which was kinda useful and shouldnt really inpact the performance of vencord i think since it aims to be lightweight

shut verge
#

I wonder if it'd be possible to add a way to select text and use a key like caps lock to switch capitalization on the selected bit of text (all caps, all lowercase, caps on first letters of the sentence, maybe camel-case/caps on every word's first letter), sorta like on mobile

shut verge
lime stone
#

Why can't you press shift though/

#

I can't press question mark I guess

cunning canyon
#

lazy

charred monolithBOT
shut verge
# lime stone Why can't you press shift though/

I'm thinking shift might be used for other stuff that would trigger it when you want to do something else. Idunno, caps lock just seems more useful for it, though with CLock there's of course the problem of it being in an undesired state afterwards

#

Like if you were to mark it all to copy and alt-shift up/down to another channel-
I mean I'll admit it's a stretch, but I guess stuff like that should still be accounted for

lime stone
#

hm

#

Problem is you'll end up with something like this. which isn't great.

shut verge
#

Yeah... I mean I guess problems with using shift would all end up being fairly fringe cases anyway, so I guess shift could work

lime stone
#

well you could add something to add it at the start of all sentences

#

but then you may also want auto-fullstop

#

I think generally if you want to be formal it's best to just to spend more time writing something!

#

it's not just a capital letter, it's also punctuation and spelling words right which i don't think a plugin can fix :p

shut verge
#

Yep true, I was just thinking about the capitalization toggle thing, since something like that I feel could have some utility, at least in some situations

limber skiff
calm shore
#

they forgot to nitro lock it tho

#

itโ€™ll be fixed soon iโ€™m sure

limber skiff
#

lmao

limber skiff
#

yeah just tried

#

neither things are possible to do

austere talon
#

@turbid hatch sooo

#

remember how I added the rel canonical

#

it didn't work husk

#

THEY'RE IGNORING OUR CHOICE

#

FUCK YOU GOOGLE PART 38292929

median rapids
#

lmfao

turbid hatch
#

This error means that Google thinks that the tested page isn't a duplicate of the user-declared canonical. Instead, Google thinks that the tested page is a duplicate of the Google-selected canonical.

#

If the user-declared canonical is not similar to the current page, then Google won't ever choose that URL as canonical. A duplicate page must be similar to the canonical. (That's what duplicate means.)

#

they're literally identical

somber ginkgo
#

skill issue

austere talon
#

we could just disable the stupid vercel domains

turbid hatch
#

that wont stop google from indexing them

#

it could take weeks to be dropped

#

there is, however, a solution to this

somber ginkgo
#

just return 401 when a page is scraped by googlebot xddxdd2

turbid hatch
#

that also takes ages to be dropped

austere talon
#

wait

turbid hatch
#

what you can do

austere talon
#

I made the vercel domain redirect to our domain

turbid hatch
#

is that

#

yes

austere talon
#

God how is google so terrible tho

#

like

somber ginkgo
#

cant you force a recrawl

turbid hatch
#

WHY IS THIS BROKEN AGAIN??

austere talon
#

we literally communicate our own preference and it still ignores our choice

turbid hatch
#

but it takes up to a week for them to actually do it

somber ginkgo
turbid hatch
#

its to prevent abusing canonical URLs

#

but for some reason its bugged

somber ginkgo
#

average google shitcode

turbid hatch
#

VEN

#

STOP ISSUING VALIDATION FIX REQUESTS

austere talon
#

nuh uh

#

they will get to work now

turbid hatch
#

btw

#

they dont actually do anything on any of the issues you selected

#

LOL

austere talon
turbid hatch
#

if the source isnt tagged as website its meaningless

austere talon
#

So we just explode

turbid hatch
#

you just gotta wait until google decides to redo its index for our site

#

the alternative is that you claim vencord-website.vercel.app as a property and then instruct them to remove it from the search

austere talon
#

I will issue more fix validation requests until Google explodes

austere talon
#

cause its not ours

turbid hatch
#

you can by using the google-site-verification meta tag

#

:3

somber ginkgo
median rapids
#

had to do this when they marked my vercel domain as malicious

austere talon
#

LMAO

#

they marked ours as malicious too

#

idk if fixed now but Google safe search said our site was a Phishing site

#

but only the vercel one

charred monolithBOT
fleet depot
#

just use favorite's server ๐Ÿ˜Œ

#

made my life easier

#

also def a duplicate smh

#

iz okay!

#

wait if you're here

#

i was gonna answer

#

actually for posterity's sake ill make a comment anyway

cunning canyon
charred monolithBOT
fleet depot
#

@quaint sapphire would this optimization be possible if the match/replaces were attatched to different predicates

#

ex)

{
    find: '("guildsnav")',
    predicate: () => settings.store.closeAllHomeButton,
    replacement: {
        match: ",onClick:function(){if(!__OVERLAY__){",
        replace: "$&$self.closeFolders();"
    }
},
{
    find: '("guildsnav")',
    predicate: () => settings.store.alwaysClose,
    replacement: {
        match: /(GUILD_TOOLTIP_A11Y_LABEL(?!.{5,50}FAVORITES).{40,70},onClick:)(\i)/,
        replace: "$1function(){$self.closeFolders();$2(...arguments)}"
    }
}
quaint sapphire
#

type wise that should work

fleet depot
#

cool! ty

charred monolithBOT
charred monolithBOT
quaint sapphire
#

@junior olive I got a patch for u

#

made it so that when you right click the home icon (or long press using a touch screen) to reload the user map
[deleted patch file]

#

to apply it to ur code do git am [path filename]

#

actually uhh, you cant really apply the patch, it will conflict

#

darn

#

and the util I added

export const waitForElem = (selector: string, callback: (elem: HTMLElement) => void) => {
    let found = false;
    let elem = document.querySelector<HTMLElement>(selector);

    const interval = setInterval(() => {
        elem = document.querySelector<HTMLElement>(selector);
        if (!found && elem != null) {
            found = true;
            callback(elem);
            clearInterval(interval);
        }
    }, 200);
};
charred monolithBOT
junior olive
austere talon
#
#

but idk if work

lime stone
#

ooh

austere talon
#

doesnt work at all lol

lime stone
#

ohh

#

:(

quaint sapphire
austere talon
#

i hate how terrible typoescript is

#

i made import aliased and it works if u import manually

#

but intellisense cant fgind them

#

wait

#

i just had to add module: commonjs

#

but it's preferring the full path instead of the alias

charred monolithBOT
austere talon
#

third party plugins and stuff

charred monolithBOT
austere talon
#

okay types are working mostly

quaint sapphire
#

whats your emergency?

charred monolithBOT
#

Discord Account

No response

What happens when the bug or crash occurs?

Whenever you scroll in a channel with reactions, every time WhoReacted loads a new icon the scroll position jumps, making it very hard to continue scrolling.

What is the expected behaviour?

Scrolling should be smooth as when WhoReacted isn't enabled.

How do you recreate this bug or crash?

  1. Enable WhoReacted
  2. Open a channel with a frequent reactions
  3. Scroll up
  4. Notice scroll jitter

E...

limber skiff
#

that's why my scroll jumps

charred monolithBOT
austere talon
#

insane

charred monolithBOT
limber skiff
#

discord is drunk I think

royal bane
#

lmfao

lime stone
#

what's the punchline?

charred monolithBOT
fleet depot
#

sounds like gullivers travels maybe

charred monolithBOT
austere talon
#

ready

#

now with that out of the way time to make le silly plugin template

swift fjord
#

can't wait for aa to make ThisWillCrashYourDiscord

limber skiff
#

NO

austere talon
#

working on le plugin template

royal bane
#

what vsc theme :o

austere talon
lime stone
#

yay

austere talon
#

not fully done

lime stone
#

still nice

austere talon
#

it's very very similar to how plugins in normal Vencord look

#

just slightly uglier imports

lime stone
#

as typeof :P

#

surely there are things that could go wrong by having both internal/built-in and external plugins?

royal bane
#

gpu explode

lime stone
#

explod

royal bane
lime stone
#

this server = <3

#

lmao

#

it has about all of the most emotes of all time

royal bane
#

the emotes of all time

lime stone
#

the most emotes of all time

royal bane
#

no

true gullBOT
#

Does it have trans_catresort though

#

Didnโ€™t think so

royal bane
#

trasn

quaint sapphire
#

@austere talon how cors in vencord?

median rapids
#

cors fear

limber skiff
#

third party plugins breaking built in ones