#👾-core-development
1 messages · Page 220 of 1
fair enough
don't bother fixing it for now
why?
we might as well just change everything with the hashed variant
huh
wait
can we no longer find by intl strings
or where there be some util to map the contents of intl strings to their hashes
oh, neat
as I said to vee too
for future keys, we won't know their original
the reason for the hashing is to obsfucate
which means, might as well just change everything to the hashed variant
it's consistent and doesn't change between builds
if its a hash, it shouldnt it be just as stable as the normal one
meaning it will just be less readable
it is
oh
it's based only in the key name
this is just a pain in the ass more than a headache
so just like before if they change it the find breaks
it's just gonna be a magic string
rip to #🔧-discord-changes i guess
our finds already have so many
Do we know that for certain?
yes
but yeah we just need to calculate the hash for our old finds and update our patches
is this what they're using?
yeah
and change a bit since it's no longer .Messages.SOMETHING
now it's
i might make something to convert your clipboard for you in vscode
children: s.intl.format(s.t.l5FFq6, {
name: c
})
so its easy to hash
vs
children: N.Z.Messages.REMOVE_FRIEND_CONFIRMATION.format({
name: I.ZP.getName(t)
})
?remind one month hover for intl strings in companion
Alright @fossil inlet, in 1 month and 1 hour: hover for intl strings in companion
Make a \I{unhashed_string} fake escape, if it's deterministic
we dont know the new unhashed strings
as I'm saying I think it's not needed to do the conversation
tbh might be worth for current keys
I dont think so
we would have to hash in patches
i18n usage
webpack finds
many places
isnt that what canonicalize<...> is for
eaiser than updating with the hashed variant
alr
also it would preserve readability for a bit longer
Could put comments for what the keys used to be
if someone else wants to work on it for now
Or just git blane
here´s the hasher
/**
* Returns a consistent, short hash of the given key by first processing it through a hash digest,
* then encoding the first few bytes to base64.
*
* This function is specifically written to mirror the native backend hashing function used by
* `@discord/intl-loader-core`, to be able to hash names at runtime.
*/
export function runtimeHashMessageKey(key: string): string {
const hash = h64(key, 0);
const bytes = numberToBytes(hash);
return [
BASE64_TABLE[bytes[0] >> 2],
BASE64_TABLE[((bytes[0] & 0x03) << 4) | (bytes[1] >> 4)],
BASE64_TABLE[((bytes[1] & 0x0f) << 2) | (bytes[2] >> 6)],
BASE64_TABLE[bytes[2] & 0x3f],
BASE64_TABLE[bytes[3] >> 2],
BASE64_TABLE[((bytes[3] & 0x03) << 4) | (bytes[3] >> 4)],
].join('');
}
I'm busy with other stuff
ill throw something together
whats the function h64
find it here
it's part of that
oh this is from their code
they were kindly enough to make it open worse so everything is easier
guhhh even .Messages is obfuscated
so bad

@limber skiff guhhhhhhhh is this related?
idk whats the error
@brazen bone does that download all lazy chunks?
Yes
Including the one that makes everything pink, annoyingly
Doesn't download css though; I've thought about including that but haven't had the energy to do that yet
None
None
None
None
not on my watch 
i've already fixed the strings differ, i will just have to go through node package hell tomorrow cuz discord decided to use a library with type: "module" which makes it impossible to import from ts without making your whole project a module as well
i only have bad experiences from dealing with node modules not working
well it could be worse, it could be python
python has the worst package manager ive every had the displeasure of working with
@limber skiff settings fixed
im not sure if how im fixing things is the best way
but guh
also loadLazyChunks is broken and idfk how to fix that
nevermind
it fixed itself after i fixed the settings patch
who knows
wait
no
its still broken
it just only fails when vencord is built with reporter
@rugged spire you will help me fix i18n
Thankful not to be a vencord maintainer in times like this
u should dm vee if u have donated 5$ or more or vgh in #🤖-bot-commands to get ur donor role 
wtf is that lmao
oh
it's cool but like u said before it won't work for new keys xd
mmhhh
I think we shouldn't rely on i18n keys much anymore
try to find better way
only rely on it if absolutely necessary
hmm
I wouldn't rely on it as much as we did before if possible
you are right
@limber skiff what plugins have you done so far
forgot an n
That’s what I started with last night
but whatever
I’ll start on that
Wait did you ever manage to recreate the load lazy chunks not working on reporter
I havent tested any of it
@limber skiff how cursed is this
export const { i18n } = mapMangledModuleLazy(['"en-GB":()=>', "getBinds"], {
i18n: m => true
});```
i tried a find by code but it woudnt work
I mean like
and wreq(number) gives it as an es module
oh, wait im stupid
this better?
export const { i18n } = mapMangledModuleLazy(['"en-GB":()=>', "getBinds"], {
// can be any i18n key
i18n: m => m["0+11F"]
});
do this actually
@limber skiff i happen to be a bit stupid
there was another module that is 10x better
how lol
@fossil inlet macros in js
jokes that gonna be horrible to work with inside regex lmao

im doing a horror untold to the formatting side of i18n
what's that

making something to work with the old formatting syntax
because i dont want to change everything to the new sytnax
nah
just do
but have a helper function which hashes and uses the correct functions inside
so it's easier
no need to keep this much backwards compability
ideas
#intl<KEY>
#[intl::KEY] yes rust
just intl::KEY?
#[intl::key]
i was doing to to change less things 😭
no point honestly
and there isn't much usage of i18n inside Vencord I think
sorryy if you put a lot of work into it already
nah it was just this horror code
export const formati18n = {
Messages: new Proxy<Record<string, ReturnType<typeof formatUtils>>>({}, {
get(target, key) {
if (!(typeof key === "string")) throw new Error("key is not string");
formatUtils(key);
}
})
};
emphasis on horror code
xml 
ugh
it turns into a set in regex
I'll just do #intl::KEY
looks pretty nice like that
ugh actually this won't work
can't find where it ends like that
maybe intl:ABC
or since <> is used in ecmascript regex, ::ABC:: or something like that
NAAAHHHHH
HORROR
i am aware that this is horror code, but it works
export const i18n: t.i18n & { Messages: ReturnType<typeof formatUtils>; } = proxyLazy(() => {
return {
...findLazy(m => m?.intl?.format),
Messages: new Proxy<Record<string, ReturnType<typeof formatUtils>>>({}, {
get(target, key) {
if (!(typeof key === "string")) throw new Error("key is not string");
return formatUtils(key);
}
})
};
});
// FIXME: fix types
export const formatUtils = a => {
console.log("running format utils");
const k = i18n.t[runtimeHashMessageKey(a)];
if (typeof (k().ast) === "string") return k().ast;
return Object.assign(k, {
format: (a: any) => i18n.intl.format(k, a),
formatToMarkdownString: (a: any) => i18n.intl.formatToMarkdownString(k, a),
formatToParts: (a: any) => i18n.intl.formatToParts(k, a),
formatToPlainString: (a: any) => i18n.intl.formatToPlainString(k, a),
});
};
guh
just don't do this lmao
it's gonna be useless for new keys anyway
for finds you can use string interpolation
or just add a comment
it's fine
you're overengineering this so hard xD
I get it it's a cool idea but it's not gonna be effective for new stuff
dont worry I'm enjoying it lol
just for now :)
slowly we can migrate to finds which dont use that
okay back to actually fixing now
FUCK YOU DISCORD
MoreUserTags (had no effect):
ID: 385499
Match: ```
/(switch(((?:\i))){.+?)case ((?:\i)(?:.(?:\i))?).BOT:default:((?:\i))=.{0,40}((?:\i).(?:\i).Messages).APP_TAG/
**__TypingTweaks (had no effect):__**
ID: `738619`
Match: ```
/(?<=((?:\i))\.length\?(?:\i).(?:\i)\.Messages.THREE_USERS_TYPING\.format\({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}\):)(?:\i)\.(?:\i)\.Messages\.SEVERAL_USERS_TYPING/
IgnoreActivities (had no effect):
ID: 293389
Match: ```
/(?:["1+O+Tk"]).+?}(),(?<={overlay:(?:\i),.+?=((?:\i)),.+?)(?=!((?:\i)))/
**__FakeProfileThemes (had no effect):__**
ID: `451392`
Match: ```
/RESET_PROFILE_THEME}\)(?<=color:((?:\i)),.{0,500}?color:((?:\i)),.{0,500}?)/
SupportHelper (had no effect):
ID: 600084
Match: ```
/BEGINNING_DM.format({.+?}),(?=.{0,300}((?:\i)).isMultiUserDM)/
**__ImplicitRelationships (had no effect):__**
ID: `270759`
Match: ```
/(\(0,(?:\i)\.jsx\)\((?:\i)\.TabBar\.Item,\{id:(?:\i)\.(?:\i))\.BLOCKED,className:([^\s]+?)\.item,children:(?:\i)\.(?:\i)\.Messages\.BLOCKED\}\)/
ServerListAPI (found no module):
ID: -
Match: ```
["7hB4kp),children
**__CrashHandler (found no module):__**
ID: `-`
Match: ```
#{intl:;ERRORS_UNEXPECTED_CRASH}
DisableCallIdle (found no module):
ID: -
Match: ```
.pps9zM
**__MoreUserTags (found no module):__**
ID: `-`
Match: ```
#{ìntl::USER_PROFILE_PRONOUNS}
PermissionsViewer (found no module):
ID: -
Match: ```
.VIEW_ALL_ROLES,
**__ReplyTimestamp (found no module):__**
ID: `-`
Match: ```
#[intl::REPLY_QUOTE_MESSAGE_BLOCKED}
ShowHiddenChannels (found no module):
ID: -
Match: ```
.Messages.CHANNEL_TOOLTIP_DIRECTORY
**__ValidReply (found no module):__**
ID: `-`
Match: ```
#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED
WebContextMenus (found no module):
ID: -
Match: ```
.Messages.SEARCH_WITH_GOOGLE
**__WebContextMenus (found no module):__**
ID: `-`
Match: ```
.Messages.COPY,hint:
waitForComponent(t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...)
find(e=>e.Messages?.["en-US"]...)
findByCode(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
extractAndLoadChunks(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/)
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")
findComponentByCode(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")
findComponent(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.incl...)
findComponent(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")...)
mapMangledModule(".Messages.GROUP_DM_ALONE", {
useChannelName: t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...
})
None
None
Ughhhhhhhhhhhhhhhhh
i have been asleep for way too long and only just got up
well
i woke up multiple times in the night and saw @fossil inlet's message but thats it
welcome welcome
@rugged spire rate
ValidReply (had no effect):
ID: 267128
Match: ```
/(?:["1i+hMj"]))/
**__MoreUserTags (had no effect):__**
ID: `385499`
Match: ```
/(switch\(((?:\i))\){.+?)case ((?:\i)(?:\.(?:\i))?)\.BOT:default:((?:\i))=.{0,40}((?:\i)\.(?:\i)\.Messages)\.APP_TAG/
TypingTweaks (had no effect):
ID: 738619
Match: ```
/(?<=((?:\i)).length?(?:\i).(?:\i).Messages.THREE_USERS_TYPING.format({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}):)(?:\i).(?:\i).Messages.SEVERAL_USERS_TYPING/
**__IgnoreActivities (had no effect):__**
ID: `293389`
Match: ```
/(?:\["1+O+Tk"\]).+?}\(\),(?<={overlay:(?:\i),.+?=((?:\i)),.+?)(?=!((?:\i)))/
FakeProfileThemes (had no effect):
ID: 451392
Match: ```
/RESET_PROFILE_THEME})(?<=color:((?:\i)),.{0,500}?color:((?:\i)),.{0,500}?)/
**__SupportHelper (had no effect):__**
ID: `600084`
Match: ```
/BEGINNING_DM\.format\(\{.+?\}\),(?=.{0,300}((?:\i))\.isMultiUserDM)/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
**__MoreUserTags (found no module):__**
ID: `-`
Match: ```
#{ìntl::USER_PROFILE_PRONOUNS}
waitForComponent(t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...)
find(e=>e.Messages?.["en-US"]...)
findByCode(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
extractAndLoadChunks(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/)
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")
findComponentByCode(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")
findComponent(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.incl...)
findComponent(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")...)
mapMangledModule(".Messages.GROUP_DM_ALONE", {
useChannelName: t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...
})
None
None
LOL WTF ARE YOU DOING
calculating hashes at runtime and making finds/matches based on that
yeah
this takes 5 hours of torture and shrinks it down to 1 hour of torture
im too fucking scared to restart my canary client
i already see breakage
You can't even open settings.
@limber skiff I maintain 20+ plugins I've developed myself and each one is maintained on its own branch
See why I want to 
Is this going to be unleashed upon the stable branch in the immediate future?
Probably
Gosh
I daily drive canary btw
Last night I spent a hour writing a script to hash the clipboard
and I've been called insane for it
1 hour wasted?
I do just to fix things faster
I mean, kudos to y'all that maintain the project and fix stuff every time discord fucks it up


It's okay. I only have this many plugins to fix
if you are only using the messages for finds it's pretty straightforward
I know
?remind one week update all my prs
Alright @fossil inlet, in 1 week: update all my prs
"i need a break"
ValidReply (had no effect):
ID: 267128
Match: ```
/(?:["1i+hMj"])"])/
**__MoreUserTags (had no effect):__**
ID: `385499`
Match: ```
/(switch\(((?:\i))\){.+?)case ((?:\i)(?:\.(?:\i))?)\.BOT:default:((?:\i))=.{0,40}((?:\i)\.(?:\i)\.Messages)\.APP_TAG/
TypingTweaks (had no effect):
ID: 738619
Match: ```
/(?<=((?:\i)).length?(?:\i).(?:\i).Messages.THREE_USERS_TYPING.format({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}):)(?:\i).(?:\i).Messages.SEVERAL_USERS_TYPING/
**__IgnoreActivities (had no effect):__**
ID: `293389`
Match: ```
/(?:\["1+O+Tk"\]).+?}\(\),(?<={overlay:(?:\i),.+?=((?:\i)),.+?)(?=!((?:\i)))/
FakeProfileThemes (had no effect):
ID: 451392
Match: ```
/(?:["L+Gmoa"]))})(?<=color:((?:\i)),.{0,500}?color:((?:\i)),.{0,500}?)/
**__SupportHelper (had no effect):__**
ID: `600084`
Match: ```
/(?:\["Qvg+6+"\])"],{.+?}\),(?=.{0,300}((?:\i))\.isMultiUserDM)/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
waitForComponent(t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...)
find(e=>e.Messages?.["en-US"]...)
findByCode(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
extractAndLoadChunks(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/)
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")
findComponentByCode(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")
findComponent(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.incl...)
findComponent(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")...)
mapMangledModule(".Messages.GROUP_DM_ALONE", {
useChannelName: t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...
})
None
None
i cant live without betterquickreact actually
Tbh I have no more motivation to fix this update
Real
Got a lot of other work
@limber skiff are you fixing game activity toggle button plugin
alright did
love
first patches
then finds
and then usages of i18n inside vencord and inside patches
I have work I need to do now, so I am going to go out and get tea.
ValidReply (had no effect):
ID: 267128
Match: ```
/(?:["1i+hMj)"])/
**__MoreUserTags (had no effect):__**
ID: `385499`
Match: ```
/(switch\(((?:\i))\){.+?)case ((?:\i)(?:\.(?:\i))?)\.BOT:default:((?:\i))=.{0,40}((?:\i)\.(?:\i)\.Messages)\.APP_TAG/
TypingTweaks (had no effect):
ID: 738619
Match: ```
/(?<=((?:\i)).length?(?:\i).(?:\i).Messages.THREE_USERS_TYPING.format({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}):)(?:\i).(?:\i).Messages.SEVERAL_USERS_TYPING/
**__IgnoreActivities (had no effect):__**
ID: `293389`
Match: ```
/(?:\["1+O+Tk).+?}\(\),(?<={overlay:(?:\i),.+?=((?:\i)),.+?)(?=!((?:\i)))/
FakeProfileThemes (had no effect):
ID: 451392
Match: ```
/(?:["L+Gmoa))})(?<=color:((?:\i)),.{0,500}?color:((?:\i)),.{0,500}?)/
**__Decor (had no effect):__**
ID: `532495`
Match: ```
/(?<=(?:\["7v0T9P)\)},"decoration"\),)/
ServerListAPI (had no effect):
ID: 416568
Match: ```
/(?<=(?:["7hB4kp)),children:)(?:\i).map((?:\i))/
**__SupportHelper (had no effect):__**
ID: `600084`
Match: ```
/(?:\["Qvg+6+)"],{.+?}\),(?=.{0,300}((?:\i))\.isMultiUserDM)/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
waitForComponent(t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...)
find(e=>e.Messages?.["en-US"]...)
findByCode(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
extractAndLoadChunks(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/)
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")
findComponentByCode(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")
findComponent(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.incl...)
findComponent(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")...)
mapMangledModule(".Messages.GROUP_DM_ALONE", {
useChannelName: t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...
})
None
None
I like to believe it gave up listing what is broken
spam
ok
so
i need to base upon the existing branch
@limber skiff do you intend to force push the branch with all the fixes
no

20 dollars discord will revert
nuh uh
ughh
how it feels wanting to explode
I have to escape +

i will delete that showTimeoutDuration file
how do you vertical split in vscode?
oh i dont think i even edited that patch 
press f1 type "split horizontally" press enter
ok nvm
it's View: Split Editor Right
i worded it wrong and figured it out anyways
@limber skiff will this code still work?
okay that's big progress
Most
MoreUserTags (had no effect):
ID: 385499
Match: ```
/(switch(((?:\i))){.+?)case ((?:\i)(?:.(?:\i))?).BOT:default:((?:\i))=.{0,40}((?:\i).(?:\i).Messages).APP_TAG/
**__TypingTweaks (had no effect):__**
ID: `738619`
Match: ```
/(?<=((?:\i))\.length\?(?:\i).(?:\i)\.Messages.THREE_USERS_TYPING\.format\({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}\):)(?:\i)\.(?:\i)\.Messages\.SEVERAL_USERS_TYPING/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
waitForComponent(t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...)
find(e=>e.Messages?.["en-US"]...)
findByCode(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
extractAndLoadChunks(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/)
findComponentByCode(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)")
findComponentByCode(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")
findComponentByCode(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")
findComponent(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.incl...)
findComponent(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")...)
mapMangledModule(".Messages.GROUP_DM_ALONE", {
useChannelName: t=>typeof t!="function"?!1:wa(Function.prototype.toString.call(t),e)...
})
None
None
@limber skiff can you confirm you have not touched any finds yet
only three patches
will do those later
now finds
they should be pretty straightforward too
tf is this tho
found it
pretty easy
MoreUserTags (had no effect):
ID: 385499
Match: ```
/(switch(((?:\i))){.+?)case ((?:\i)(?:.(?:\i))?).BOT:default:((?:\i))=.{0,40}((?:\i).(?:\i).Messages).APP_TAG/
**__TypingTweaks (had no effect):__**
ID: `738619`
Match: ```
/(?<=((?:\i))\.length\?(?:\i).(?:\i)\.Messages.THREE_USERS_TYPING\.format\({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}\):)(?:\i)\.(?:\i)\.Messages\.SEVERAL_USERS_TYPING/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
find(e=>e.Messages?.["en-US"]...)
None
None
new dependency
guh
ok time to see if ShowTimeoutDetails works
I still cannot click into another channel.
so all plugins that are merged into vencord you guys have to maintain yourself right?
unless a push is made
it’s not the developers that maintain those
that’s why alot of plugins get rejected (maybe)
from what i can see that is generally what happens
maybe? those plugins generally end up as userplugins though
yeah they all end up as user plugins usually
i have to go through 20 of my own personal plugins today
and "fix" them
Oh
It's AutomodIndicator causing the crash
this is why i won’t use patch’s
nope
my three plugins are still find
your plugins likely touch i18n
that has no fix yet
I can finally enter settings
@limber skiff How are you thinking of solving i18n.Messages.MESSAGE
I propose the API should be compatible without changes if possible
i wonder how bd users are doing
nop
too much backwards compability in a project like this is kinda bad
true
how do formatted messages work
also
can we get a i18n message lookup page in settings?
❤️
for formatted messages it will just be a second parameters which contain the values to be used
oh neat
have you committed this yet
can I just import the getIntlMessage function alone?
time to fix ShowTimeoutDetails and AutomodIndicator
how many times do you think I'll be running this today @limber skiff
I should be finishing soon I think
part of me thinks it'd be neat to have the API as a Proxy
did you not see what i sent earlier 😭
export const i18n: t.i18n & { Messages: ReturnType<typeof formatUtils>; } = proxyLazy(() => {
return {
...findLazy(m => m?.intl?.format),
Messages: new Proxy<Record<string, ReturnType<typeof formatUtils>>>({}, {
get(target, key) {
if (!(typeof key === "string")) throw new Error("key is not string");
return formatUtils(key);
}
})
};
});
// FIXME: fix types
export const formatUtils = a => {
console.log("running format utils");
const k = i18n.t[runtimeHashMessageKey(a)];
if (typeof (k().ast) === "string") return k().ast;
return Object.assign(k, {
format: (a: any) => i18n.intl.format(k, a),
formatToMarkdownString: (a: any) => i18n.intl.formatToMarkdownString(k, a),
formatToParts: (a: any) => i18n.intl.formatToParts(k, a),
formatToPlainString: (a: any) => i18n.intl.formatToPlainString(k, a),
});
};
did you give a good reason why that is a horrible idea or something
it works
is that compatible with how it worked before
yea
thats the whole point
ngl the older API was definitely easier to write
yop
the function call is bad IMO
where?
would there by any way to add an option to invert the functionality? as in to add an option that makes reply messages that despite having reply ping off always ping?
eh
I'm not sure if this works lol
someone type
,,
MoreUserTags (had no effect):
ID: 385499
Match: ```
/(switch(((?:\i))){.+?)case ((?:\i)(?:.(?:\i))?).BOT:default:((?:\i))=.{0,40}((?:\i).(?:\i).Messages).APP_TAG/
**__TypingTweaks (had no effect):__**
ID: `738619`
Match: ```
/(?<=((?:\i))\.length\?(?:\i).(?:\i)\.Messages.THREE_USERS_TYPING\.format\({(?:\i):((?:\i)),(?:(?:\i):)?((?:\i)),(?:\i):(?:\i)}\):)(?:\i)\.(?:\i)\.Messages\.SEVERAL_USERS_TYPING/
ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,(?:\i).jsx)((?:\i).TabBar.Item,{id:(?:\i).(?:\i)).BLOCKED,className:([^\s]+?).item,children:(?:\i).(?:\i).Messages.BLOCKED})/
None
None
None
@dapper tiger fix your plugin
something @dusk blaze would write
i thought nin0 only wrote sandbox escapes
@dusk blaze make i18n unhahser
already exists
where
what i can see here is
hash to string
key to hash to string
key to hash
hash to key 
impossible
brute force
lookup table
vencord hash cracking service
they're only xxh32 right

iirc they're 64 bit
but we know they're all caps, and delimited by _
yes
@fringe basaltthoughts on cracking the i18n hashes
i am making it less sandbox escape
by preventing the discord sandbox from silently nuking your system
done
None
None
None
None
nuckyz so good
probably possible to some degree with a dictionary attack, especially since xxhash is designed to be very fast
but idk about collisions
if it's any similar to murmurhash then it will have a TON of collisions
I am tired
guhhhh didnt think of colisions
amazing
is it on stable yet?
you will explode
i will need to merge in the real changes soon
?remindme 6h merge dev into plugin branches
Alright @rugged spire, in 6 hours: merge dev into plugin branches
vee should make an announcement saying you might have to manually repatch vencord in a few days if it breaks
Is there no way to force an update like you guys did a while back for that plugin issue?
This is called auto update
I can't really remember which plugin it was in particular
@grizzled halo how bad of an issue will it be if people cant open settings to update
#🏥-vencord-support-🏥 will be locked for a few days probs
No, it was a popup telling you to update
When you went to #🏥-vencord-support-🏥 ?
or what
maybe I think a "if its broken now do update" thing was pushed idk'
I don't remember well
I wish I could remember as well
Please ignore that this is based on #2993 for now
it only crashes if you patch settings itself with i18n
I'm pushing a fix to make it work
why is my discord crashing randomly when idle 


yeah
wow thats not much for me to fix in terms of i18n messages being displayed
only these
wont this not work for non-eng users @limber skiff https://github.com/Vendicated/Vencord/commit/5216bcca1eca1b79a5a397e2128414ef653daee7#diff-ae0cebf157bf2cc41f1424ed4f7ea72c4e1a1e3de0177fee8ef426ddb81253abR160
ah
so the API is stable?
I suppose
you gotta remember I love changing stuff
but I think I wont change this one
its vencord
so go ahead and use it
guhhhhhhh
the only thing thats stable is that its unstable
however the intl syntax is stable
if i dont have BetterQuickReact i will literally 
what even is betterquickreact
here's a brief explanation
#{intl:MESSAGE} gets transformed into .hash or ["hash
many emojis
HORROR
the second case is used if the hash contains special characters like +
SO BAD
so if you to target all the intl usaged in a module you need to do #{intl:MESSAGE}\) or #{intl:MESSAGE}"\]
depending in the case
nvm I'm blind AF
#{intl:MESSAGE}\) will match \i.intl.string(\i.\i.hash)
^^^^^
#{intl:MESSAGE}"\] will match \i.intl.string(\i.\i["hash"])
^^^^^^

why do we need that dependency?
for 64 bits hashing
@limber skiff
is that what discord uses too?
yeah
yes
@austere talon want to
?
this is hashing so we are effectively now forced to guess the translation keys
what am I supposed to see?
hilarious
match with \I
which we wont do

sorry what?
/iYSo6
I think I need to escape \ too
but I havent had issues with any patches so maybe not
I have a problem
yes
I am trying to match this ```js
"aria-label": E.intl.formatToPlainString(E.t["/iYSo6"], {
emojiName: t.name
}),
"aria-label":E.intl.formatToPlainString(E.t["/iYSo6"],{emojiName:t.name}),
lol I just added that try catch @austere talon
what part
@dusk blaze forgot i installed this
Grandmaster at Pain & Suffering
what's the key for this?
the original before hashed
yep
ADD_REACTION_NAMED
I think I've got it though

This is going to be much harder than I thought
@fossil inlet i need emotional support
are those all your plugibns
some of them are
i dont need help
ok 
if this throws an error, entirety of vencord will explode so this absolutely needs a try catch
please verify this won't cause crashes in case this throws (just make runtimeHashMessageKey throw and see). if it does, we need to add error handling somewhere - if it doesn't it's better not to
@austere talon this one doesn't need
it only tries if it's the better folders sidebar
which is wrapped in an error boundary
shitty highlighter job
basically to test just make ur getIntlMessage() throw an error always
and if shit crashes that needs fixing
it should still work worst case
maybe getIntlMessage() should have its own try catch and return the i18n key?
so if it breaks in the future shit will still kinda work
I'm not
I copied discord code
yeah fair
this is too early to do a webpack find
but all getIntlMessage calls need catch
yep
or maybe
function getIntlMessage(key) {
try {
return blahBlah;
} catch (e) {
console.error(`#getIntlMessage(${key})`, e);
return key;
}
}
it could catch on its own
what were the others again?
so vencord is still semi functional worst case
i confused runtimeHashKey with getIntlMessage
is there any reason why the "] isn't checked for here? it makes patches look ugly
I have just done #{intl::ADD_REACTION_NAMED}\"],{emojiName because of this (previously it was .ADD_REACTION_NAMED.format)
gave money to
unpaid intern
corporate slave
poor soul
what am I
my greatest works
unpaid intern?

actually I didnt even read the error message copilot just made it up 😭
put logger in a top level variable and return key
it's more useful to see ui string like VIEW_USER than just empty text XD
but yeah
wouldnt it be a hashed
well actually that's the one that accepts the hash
shtring
@fossil inlet lets patch all of discord to remove hashed translation keys
yes
yeah then not useful
but
well idk
i want opinions
Alright @rugged spire, in 10 minutes: bqr patch
someone should pin a warning in #1256395889354997771 saying that many plugins might be broken due to these changes
VV VV [1;2m[4;2m[0m[0m[4;2m[1;2msqaaakoi[0m[0m
VV VV [2;35m[0m[2;35mVersion: [0m[0m1.10.5 ~ 61acc9af (Dev) - 2 Nov 2024[0m[2;35m[0m
VV VV [2;35m[0m[2;35mClient: [0m[0mCanary ~ Vesktop v1.5.3[0m[2;35m[0m
VV VV [2;35m[0m[2;35mBuild Number: [0m[0m341146 ~ Hash: d69a6c6[0m[2;35m[0m
VVV
[2;35mCCCCCCC [2;35m[0m[2;35mPlatform: [0m[0mLinux (Linux x86_64)[0m[2;35m[0m
[2;35mCC [2;35m[0m[2;35mPlugins: [0m[0m104 / 179 (official), 32 / 53 (userplugins)[0m[2;35m[0m
[2;35mCC [2;35m[0m[2;35mUptime: [0m[0m113388s[0m[2;35m[0m
[2;35mCC
[2;35mCCCCCCC[0m [2;35m[0m[2;35mDonor: [0m[0mno[0m[2;35m[0m
[2;35m[0m[2;35mContributor: [0m[0myes[0m[2;35m[0m
[2;40m[2;30m███[0m[2;40m[0m[2;31m[0m[2;30m███[0m[2;31m███[0m[2;32m███[0m[2;33m███[0m[2;34m███[0m[2;35m███[0m[2;36m███[0m[2;37m███[0m

there you go @rugged spire
NoUnblockToJump (had no effect):
ID: 348238
Match: ```
/.?(.{1,10}.show({.{1,50}(?:.j7eA/v))/
**__NoUnblockToJump (had no effect):__**
ID: `494404`
Match: ```
/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}(?:\.j7eA\/v))/
NoUnblockToJump (had no effect):
ID: 619753
Match: ```
/if(.{1,10})(.{1,10}.show({.{1,50}(?:.j7eA/v))/
**__NoOnboardingDelay (found no module):__**
ID: `-`
Match: ```
.Alcl/f
ThemeAttributes (found no module):
ID: -
Match: ```
./6mw19
**__WebContextMenus (found no module):__**
ID: `-`
Match: ```
.Rd/Mkp
None
None
None
I broke stuff

None
None
None
None

@rugged spire, <t:1730661613:R>: bqr patch
nice
btw theres a console shortcut to hash a key
is it even worth having a cache when the mods themselves are max, a few kilobytes https://github.com/Legcord/Legcord/blob/dev/src/discord/extensions/modloader.ts
okay maybe more like half a megabyte but still
This is the privilege of having good internet
Genuinely try stock Vendroid and you'll hate it
mmm yeah the actual api checks are probably a few bytes
Ughhhhhhhhhhhhh
Finally getting around to SimplifiedProfileNotes
which is blatantly broken
lol wtf
@rugged spire@rugged spire@rugged spire@rugged spire@rugged spire
@limber skiff @fossil inlet i found an odd side effect from my broken plugin
what is it
honestly that plugin has seemed kinda of obsolete ever since the new profile popous came out
wrong
the point is to restore it to how it was
if there is a note rendered on a profile in my simplifiedprofilenotes plugin, and the profile popout was opened from a mention, the mention just Disappears

at this point i might as well rename the plugin
then do like Nuckyz did pronoundb
i've noticed that failed patches aren't being logged at all
ok I regained my sanity
?remindme 2d find a suitable name and description for simplifiedprofilenotes
Alright @rugged spire, in 2 days: find a suitable name and description for simplifiedprofilenotes
@fossil inlet i think I've fixed everything
it only took ~4 hours (including breaks)
This plugin makes discord installable as a PWA when used in browser, it's effectively a more than slightly worse version of Vesktop, but since it can re-use a browser that's already in use, does wonders for reducing RAM usage even further on devices which have little of it.
Brilliant idea with a few too many assumptions about where the code is running.
Ignore the outdated stuff, you made a lot of changes did many force pushes while I was trying to review this.
there has to be a better way of doing this. fetch this at runtime from within Discord
Remove this, it's irrelevant
This import is static. You do not want to be doing this with the styles you have. Take a look at GameActivityToggle for a good example as to why you should and how you can use a managed style
A PWA might be installed but the app might not be running within a PWA. Consider checking if you're in a PWA before overriding the stock behaviour. https://web.dev/learn/pwa/detection might help you
i can tell even though I've left my thoughts on it, this will be stuck in PR hell
quite literaly copied 1:1 from vestkop, with types and not any
vesktop didnt, but oh well
uuuuuh??? english pls?
IIRC it was required on some browsers to register a PWA
there's no PTB on web? or am I missing something?
there's no PTB on web? or am I missing something?
I'm against this. It requires basic competence from the user, since this isn't reactive, if a user goes into pwa mode without restarting shit will break
Most seems like it’ll be closed because it’s very niche
Or that too
I'm against this. It requires basic competence from the user, since this isn't reactive, if a user goes into pwa mode without restarting shit will break
True. I'm not actually sure what this would look like. Perhaps some hackery with CSS media queries could be done directly? I say this as I don't know if using a React hook would work here. Is it even worth checking?
Assuming other web plugins like web right click and web keybindns dont... no?
I see little value in inlining this, so i wont
uuuuuh??? english pls?
You might not need to be loading it all like this, if you lazy load the stores using findStoreLazy you should be able to directly call addChangeListener on the stores here.
If that doesn't work, I would recommend replacing waitForAndSubscribeToStore with a promise wrapper around waitFor that also attaches the listeners and then using. Promise.all like Promise.all(["Store"].map(waitForAndSubscribeToStore)).then(() => setBadge()).
Make sure to replace the...
@Sqaaakoi any chance if you know if discord still hardcodes 720p 30fps for screensharing? I remember from GM days the browser code looked something like:
screenShare(videoQuality, audioQuality) {
// just ignore the settings lol
return navigator.mediaDevices.getDisplayMedia({ video: { height: 720, frameRate: 30 } })
}
but I'm struggling to navigate the new minified code, I wanted to fix that in this plugin too, but I can't verify if it's an issue
Assuming other web plugins like web right click and web keybindns dont... no?
They check a different way, which reminds me, Vencord plugins can be specified as web only by adding a .web suffix to the plugin folder name. You should probably do this for your plugin.
right, wish this was documented lmao
theres a web vencor plugin for this already
isnt that just the 2500kbps patch
None
None
None
None
@rugged spire, <t:1730659145:R>: merge dev into plugin branches
already did
@Sqaaakoi any chance if you know if discord still hardcodes 720p 30fps for screensharing? I remember from GM days the browser code looked something like:
screenShare(videoQuality, audioQuality) { // just ignore the settings lol return navigator.mediaDevices.getDisplayMedia({ video: { height: 720, frameRate: 30 } }) }but I'm struggling to navigate the new minified code, I wanted to fix that in this plugin too, but I can't verify if it's an issue
I'm...
adds a new tab to serverinfo plugin that shows server members that are also in your other servers, sorted by amount of mutual servers
None
None
None
None
did they push stable yet
no?
None
None
None
None
None
None
None
None
I suspect this isn't going to work when using the userscript version because of Discord's CSP. I tried to manually inject the webmanifest just by copying the code out of here:
Refused to load manifest from 'blob:https://discord.com/2720f46f-fefa-4280-ac70-2df63a550683' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.
I'm unsure why? This plugin works fine on my end? I'm running brave with the vencord extension
I mean the userscript version of Vencord, not the extension.
ah yeah, it defo won't work there, nothing you can do about it, but it's a non issue, the extension is fine, and it's not heavy or problematic in any ways, the bigger issue is discord calls randomly dying because chromium suspends audiocontext in the tab for inactivity
I tried the extension build, and it's dying on document.querySelector('link[rel="icon"]') being null. For some reason Discord replaces that icon on load with a base64 version? Don't know why it's not being found by this code during load.
ah right, that'd make sense, hmmmm
That worked. However the scope needs to be scope: location.origin because it's trying to make a relative url to the base64 blob (Chrome reports this as an invalid url).
window-controls-overlay should be removed if you don't plan on handling that. Trying to hide control just draws it on top of the discord ui:
because it's trying to make a relative url to the base64 blob (Chrome reports this as an invalid url).
que? this part works fine for me?
window-controls-overlay should be removed if you don't plan on handling that.
that's what this is for
que? this part works fine for me?
open devtools and look at the application > manifest, it reports an invalid scope url.
that's what this is for
I don't know what that does, if anything.
I'm uncertain why that patch wouldn't work for you, I copied it 1:1 from vesktop
I'm uncertain why that patch wouldn't work for you, I copied it 1:1 from vesktop
Does it for you? Can you make a screenshot.
I'm doing these updates from my lap on my phone
yes im aware, but i'm patching discord to use native title bar, it's not for some reason
nelly.tools shoutout
idk if adding new plugins is their priority rn but for now you can just use this as a 3rd party plugin
they probably won't push to stable for a while
new intl still has bugs on other languages
well id imagine with Vencord half broken rn, cause discord won’t push to stable that no plugin might be merged rn
yeah...

despite the breakages i think my PRs still work 😎
nuckyz manifested it...
nuckyz what did you do
wanna do a deploy?
i was thinking about pinging you
i'm sick of the 500 people in #🏥-vencord-support-🏥 complaining 
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
@jolly egret
thanks
we just need to close the whole server and post a message telling people to update
Wait did discord push?

it kinda surprises me how many people can come in on breakages like these, how often are y'all starting/restarting discord so that our joins increase 500%
General will be flooded in two seconds
I think it's more that it has such a large user base that within any given period of time x amount of users restart their discord.
there are 1mil+ users
insane
hopefully I didnt forget anyone who also did a lot
my bad
imagine they revert because theres some bug thats apparent with stable
(please don't)
dont even joke about that
btw, noblockedmessages seems to crash right now
#1303451511464132648 message noticed it here and tested it myself
you need to hotfix the hotfix 😭
ill take a look
👍
oh, iirc no blocked messages read i18n values
i was the one who pushed that change 😭
you doomed us

surely we can change what stuff we push for review on the extension or else we are gonna be pushing another one so soon lol
oof
messagelogger also crashes when you have the collapse option on
prob same issue
yea
@austere talon lol we really need remote plugin disabling
disable for devs 
fwiw you can kinda do that by pushing an update zzzz
me when no auto-update
Elvyra jumpscare
chrome extension
rce
I should have waited a bit before bumping
happens
@austere talon is it possible to cancel a review
hopefully we can do that, force push the tag and submit for review again 🙏
itd be weird if you couldnt
there must be a way
@high oracle
We can report the review to Google for them to delete it
I’m not sure if there’s a way to delete your review from the userside, let me check
extension update review lol
not user
