#👾-core-development
1 messages · Page 11 of 1
isnt [\w.] just .? Also would be better to use {1,3} or similar to not match half the module (it will inevitably happen <img src="https://cdn.discordapp.com/emojis/1033854064758362252.png" height="18">)
Thanks for the suggestions, will implement later
i am not? the PR description itself has it as a goal to not hardcode the url
although it doesnt actually hardcode it
I've set it as TODO because I had previously hardcoded it but then it turned out that I need to use discord.com instead anyways because the cdn endpoint can't be fetched for animated sticker because of CORS
I tried it right now and it makes it glitch even worse
Where to get the size from the real sticker from?
Can nitro users not use all stickers?
size 160 is exactly the same as real stickers

https://media.discordapp.net/stickers/1026517526106087454.webp?size=160
I tried to add ?size=32, ?size=64, ?size=128 and it doesn't seem that it makes a difference.
Some may be unavailable due to the server hosting them losing a premium tier or similar
It seems like it only works for the format of https://media.discordapp.net/stickers/1026517526106087454.webp?size=160 and not https://discord.com/stickers/1026517526106087454.png?size=160
Hm, how would I go and check if the sticker is currently available? Do you have a tip where I could look?
I'm literally blind, I looked inside the sticker object and overlooked that property 🤦
findByProps("getAllGuildStickers").getAllGuildStickers() => Map<GuildID, Sticker[]>
Nvm I think available is not correct as it's always true for me and I don't have Nitro
available means whether the sticker is available, not usable
Ah I see. So if the user has Nitro and it's unavailable it should use the bypass.
Turns out this needs another patch to make unavailable stickers clickable 😒
uhh....depending on the locale of the user, \d can match letters that represent numbers...
well, I guess there is no point worrying about that, since its kinda hard for those letters to be there in the first place
I just wanted to let you know that I didn't do it for no reason
It would be nice if this worked when editing a message as well
but in that case instead of adding an attachment you'd have to append the link at the end, and that wouldn't work well for animated stickers, so nvm
uhh....depending on the locale of the user,
\dcan match letters that represent numbers...
Oh, I didn't know about that. I think then I'll revert this change
nah its ok, the url is given by discord in the first place, so its kinda guaranteed that only european numerals (AKA [0-9]) will be there
Question: Can ya also resize the animated stickers?
(I know its not possible via the url query parameters since you are converting them to gifs in the first place)
Animated stickers are already created in the configured size
oh yeah, i was on an older commit, nvm then
I think now the glitching is the only thing that's left, any help is appreciated, otherwise I'd say we could merge it like this for now
Todo:
- [ ] Make prettier
- [ ] Marquee for long names
- [ ] Volume, Repeat, Shuffle Settings
- [ ] Seekbar

b6d7e07 pointer cursor for clickable stuff - Vendicated
5f35757 feat: support CSS modules - MeguminSama
This PR adds support for CSS modules to Vencord.
These can be used as follows:
import styles from "./MyComponent.module.css";
function MyComponent() {
return (
Hello, World!
);
}
Dependency Updates
esbuild-css-modules-plugin@^2.6.2
Adds support for CSS & CSS Module importing. ~37.5kB build size.
string-hash@^1.1.1
String hashing module used to generate class hashes.
This comes as a subdependency of esbuild-css-modules-plugin, so has no e...
0927e4e remove trailing semicolon - MeguminSama
LMAO the embed removes the <div>s
this injects the css text into the js?
Wouldn't it be better to generate a separate css bundle and load that with webFrame.insertCSS / a separate style sheet in browser?
Can you use scss with this?
How about auto prefixer (on web builds)?
merge megu
I've been using this for a while now and it LGTM from a user perspective ^^
hi github
5dbc0a5 React to device changes, hide after 5min inacti... - Vendicated
f877158 would probably help to emit changes - Vendicated
is this still needed? I told you how to get the stickers from Discord dynamically
why not via a patch? what if a new sticker is created after loading
the corruption is pretty bad @vagrant topaz
do u really have no idea why it happens
also cool warning
i found the issue
you're gonna have to use width, height, left and top of each frame and do some math
also gotta account for possibly not being square
like this one is not square
trying to fix it rn
better*
@vagrant topaz HORROR
gotta implement that
I FIXED IT
by implementing that very thing i just sent
you love @vagrant topaz
ebd68fa fix(nitroBypass): remove obsolete whitespace - D3SOX
2d8eb1f refactor(nitroBypass): use \d shorthand for digits - D3SOX
7a2f083 feat(nitroBypass): add basic sticker bypass - D3SOX
2582bb0 fix(nitroBypass): add warning when trying to us... - D3SOX
b8e61d0 fix(nitroBypass): don't modify when sticker is ... - D3SOX
could just patch this entire function to always return true
then that will cover sticker permissions, unavailable stickers, etc
lol
amazing
gonna fix it in a second
the apng creation is still not perfect, for example try the frog Hammer gif from replugged
but it does most stickers flawlessly now
okay i reverted the spotify controls commit lmao
my bad
as for the discord stickers, wanna do what I said? aka pre convert all lottie stickers and dump them somewhere
i can do it probably
also could u pls extract the sticker logic in its own logic and refactor it a bit to not be nested 6 levels deep
btw theres this utility
so you can eliminate ur sticker pack logic and use this
isPremiumPack(sticker) (i think?)
yeah dw
take ur time also gm
gonna do the lottie to gif conversions for premium stickers
wonder if ffmpeg can do it
is this really the only way https://github.com/transitive-bullshit/puppeteer-lottie
spawning headless chromium to render lotties lmao
actually i remember using a telegram bridge and it being able to convert lottie to gif
matterbridge
gonna see how it does it
it's basically svg but animated
lottie files are json with the paths
ah okay they use this https://pypi.org/project/lottie/
bro
nah arch
i wrote it myself
command_not_found_handler () {
local pkgs cmd="$1"
pkgs=(${(f)"$(pkgfile -b -v -- "$cmd" 2>/dev/null)"})
if [[ -n "$pkgs" ]]
then
printf '%s may be found in the following packages:\n' "$cmd"
printf ' %s\n' $pkgs[@]
first="$(echo "$pkgs" | sed -E 's:\w+/::; s:\s.*$::' | head -n 1)"
printf 'Install %s? [y|N]:' "$first"
read res
if [ "$res" = "y" ] || [ "$res" = "Y" ]; then
sudo pacman -S "$first"
fi
else
printf 'zsh: command not found: %s\n' "$cmd"
fi >&2
return 127
}
(zsh)
uh i never do it
btw not all builtin stickers are lottie
why do u even check if the sticker is built in pack?
just check sticker.type
enum StickerType {
PNG = 1,
APNG = 2,
LOTTIE = 3
}
you can link built in stickers
lol
you cant access lotties via media
cause media doesnt support json content type
so no resize possibly
converted with lottie_convert.py
black backround jumpscare
yeah its not too bad
but it takes a while to convert
like 10 seconds for that one
yeah
i will
uhhh
lmao
LMAO
so changing width and height makes it weird
maybe you can reverse engineer how Google skia plays lotties
just gonna resize the output gif with image magick probs
ig this is fine
wait this has a lottie2gif tool https://github.com/Samsung/rlottie
apparently this lib is also what discord uses
Ave's tech notes
Future edit: I was informed that rlottie exists (which is used by Telegram and Discord): https://github.com/Samsung/rlottie It comes wi...
brb 
wait it didnt give me lottie2gif
scammed
holy shit that one is fast
it made this gif in like less than a second
but no transparency pensive
time to add alpha support
lol this is written by cutthecord dev
nice
epic
sure
I'm gonna convert all the funnies in a bit
anyway do u have any idea how to host them @vagrant topaz
I don't really wanna host them on github or similar cause its kinda copyright violation
converting with 8 cores rn
my laptop loves
okay done
it only took like 30 seconds to do 150 stickers
love @crude hearth
hate
vencord worse than bdfdb soon
im not including them guh
your foreskin
vendy likes default stickers
source hut or gitlab maybe 
or imgur
where is bat Clyde sticker
On Imgur while not signed in
looks like your disk storage is full
wha
u can move /var/lib/docker to a different directory
smh husk when docker daemon supports custom directory
god damn

stickers
uh oh
already
already how
ye i deleted
im pushing to gitlab instead
its stuck here
isnt that chinese git lmao
horror
ye but i dont wanna host on those
cause they're open source non profit ones
i will host discord sticker files on catvibers @placid wave
NOP YOU WILL NOT
100mb of gifs
wot the stickers for
i will explod your account if you do
confusing
how about https://codeberg.org
@maiden fog you cannot read
i could just host on discord and generate json with all the cdn links
skil
I forgot to add trolley guh
DO
peculiar
some fuck can easily report it and it will be gone
that'd be funky if it is
@placid wave
guh a lot of them failed
i love rate limit
@vagrant topaz use https://distok.top/stickers/PACK_ID/STICKER_ID-small.gif
yes
lmao
i found out exactly the moment i finished uploading them all

which ones
wdym?
then there's an issue in ur apng fetching
yes
fetch sized apng lol
you already do
well fix it
since if it gives u a massive apng that means fetching is buggy
what
it does
maybe idk
vendy only allows for pretty code
what about (pretend im using backticks)
messageObj.content = messageObj.content ? messageObj.content + ' ${stickerLink}\' : stickerLink
this is probably the worst way to do it and looks even worse
if (messageObj.content) {messageObj.content += " "}
messageObj.content += stickerLink
ok here me out
if (messageObj.content) {messageObj.content += ` ${stickerLink}`}
messageObj.content ||= stickerLink
this is actually really fun to come up with ideas for
messes up the discord formatting
you know with the whole code block thing

works for other stickers does it not
might be just static stickers
anyway i just fixed it using the wrong resolution
python3 -m pip
python3 -m ensurepip
installs it
But not on PATH
holy shit 43commits
yeah i know
could you do the refactor i mentioned earlier please?
aka extract the sticker logic into its own function
reduce the indent
phpstorm 
but why phpstorm lmao
webstorm exists
or just plain intellij
also resolution isn't used at all now is it?
nahhh
yes
wrong resolution
yes
using the user defined resolution is wrong because it's not guaranteed that the apng is actually that big nor is it guaranteed that it's square
you gotta do custom resize logic if u want a specific resolution
you can use this
basically do the math for the scale factor to get from the actual width to the specified width
then apply that scale before making the gif
By default, one unit on the canvas is exactly one pixel. A scaling transformation modifies this behavior. For instance, a scaling factor of 0.5 results in a unit size of 0.5 pixels; shapes are thus drawn at half the normal size. Similarly, a scaling factor of 2.0 increases the unit size so that one unit becomes two pixels; shapes are thus drawn at twice the normal size.
const [width, height] = blah;
const resolution = blah;
const scale = resolution / width;
ctx.scale(scale, scale);
// rest of code
try if that does the trick
Well this looks promising
maybe just gotta mess with canvas width and height?
oh wait
you need to change the width and height in the gif encoder write call
that should work ig
oh lmao
oh because u also need to change the getImageData call probably
is that smaller
i can't tell, mobile shows full width
yo nice
now try a bunch of stickers
uh
might be because of the blend stuff
but transparency doesn't translate well from apng to gif so not every apng will be good
cause apng has proper alpha channel
uh compare those without the scale
try
oh yeah
thazs probably the issue
maybe
idk
I mean this is considerably better
the other one has really glitchy outside
wha
?
incredible and life changing.
i'll contrib stuff once it gets merged
oh why not now? you can pr to that branch @tropic wagon
if u need any help with how to do that u can just ask me
it's super easy! just git checkout branchname
did you guys solve the apng2gif lottie thingy to make it clear last frame?
just like make sure to always update every pixel in the gif, not just the ones that changed
or smth
nah
that was how it originally worked but that led to even worse glitches
I purposely made it not clear the whole area because that's how the apng spec goes
I think I know what the issue is tho
gonna try my theory in a bit
there's an instruction that makes it restore the current frame's area to the previous frame
I implemented that but instead of doing only the frame area I do the entire area
I think if I change that it might fix it
apng spec is weird lol
Why only web
is_dev
its dev only not web only
lmao
it spams ur console and cripples performance
(not really but every bit matters imo)
so i made it dev only
mainly to easily catch bottlenecks
i already discovered messageactions took like 100ms to start thanks to it
and fixed it
so @lament nimbus what you wanna do is pnpm watch

i love how like 20% of vencord's code is only included in dev builds
xd
why doesnt esbuild inline this function
fr
I know
did you know that was a joke
its supposed to
u(e)
what is the purpose of this function
it's definePlugin
as a transparent modifier callback or something like that?
export default defineFunction({
name: "blah"
})```
is vencord dev slower?
not really
you won't notice a difference
dev is just stricter and more logging and patch helper
lmfao
because there's no better way to have proper type info on default exports without using an intermediate variable
nice number ( ͡° ͜ʖ ͡°)
hugmegu took 0.0001ms
https://cdn.discordapp.com/emojis/1020485465821941790.gif?size=48&quality=lossless figured it'd be faster to just do it myself than review
oh god the nitro spoof lmao
yeahh lol
same
i spoofed myself as non nitro to test
sadly some stickers still glithced
but can't really fix ig
cause gif doesn't support alpha
like any apng that uses alpha will be glitchy
shouldi merge spotify controls for now
it's pretty much done, just needs to be beautified but that can be done later
hell yeah time for use a nitro spoof as a nitro subscriber
classic no stickers moment
oh lol by nitro spoof I just meant the sticker thing
yeah ik haha
Gonna merge this for now since it's basically done and I feel like people would like having this plugin earlier
Mfw no scroll
lmao
wdym scroll
oh
marquee
yeah i was gonna implement that but haven't yet
feel free to pr
ehh ill be happy with it
you have the fucking contributor role asscrack
it should technically work without premium but i havent tried so can't confirm
maybe who knows
everything works without premium
ðŸ˜
mb lmao
why did my thumb go blurry
mfw i wrote that error message myself and still forgor
btw just enable that plugin and it will work
i love how it prints an unrelated error instead of my error lmao
guh what
ok github 
github having a normal one
MenuItemDeobfuscatorApi is a funny plugin
btw i added html classes to every element in the player so it's easy to theme
i can probably do the second one pretty easily
youre not bro
yeah sometimes patching stuff is awkward
did u see my reverse image search fix
horrible regex but it works
im looking into the source for voicetimer and what the hell
if (!Array.isArray(args[0].children)) {
args[0].children = [ args[0].children ];
}
whats weird about it
react children is either an array (multiple children) or single element/undefined
isn't there a better way to do this
nah
single element includes a lot of jazz
string, number, other component
null
Currently when you try to use an animated sticker and send it discord detects it as an attachment and you have to press enter to send it, something tedious, I do not know if this is the expected sharing, but it would be nice if the message box had text and when not that the sticker is sent directly.
this is intended and changing it is a bad idea because some stickers convert very poorly so you probably don't wanna send it
I understand, but still with the current system animated stickers still convert badly to gif for some reason.

And I think that since it is the expected result (passing the sticker as an attachment) it would be great if the message was sent directly together with the attached sticker automatically. And what just didn't do it when there is text in th...
-2 hours 38 minutes left
ill look into it
best i can do is this
that context menu thingy is adding weird spacing
guhh
yes catppuccin mocha
so cozy
acc i cant even do this cuz it misaligned it for regular ppl
love
fair
tho i only use it on github and discord
don't use bad theme
isn't hardcoding everything with the px unit a bad idea
did it work before his pr?
I mean idc about fixing some different theme that unconditionally themes random stuff
isn't hardcoding everything with the px unit a bad idea
Yeah, probably shouldn't use px for gap and width. But Discord uses px for font size, so I just did what they did.
Discord hates disabled people confirmed https://www.24a11y.com/2019/pixels-vs-relative-units-in-css-why-its-still-a-big-deal/
i love discor
looks good otherwise though, thank you!
instead of this, you could use discords Forms.FormText, which supports a ton of different styles (for better consistency)
(just change that p to Forms.FormText)
ah I didn't see cause he didn't reply
oh is the default style already satisfactory? @robust basin
figured you'd need to customise the style to get a good one
cause they have a crap ton of styles for the text, you can see a list of all of them somewhere in Discords developer settings if you enable experiments

(namely)
pls pin this
ok somebody pliz help. i want to open a pr of afns fork,but i already have forked vencord for a pr i did in the past and it won't let me.
i would delete my fork, but doesen't that mean i lose the contribution credit?
you cant do that
github only allows you to create one fork for one repo

you
45%? also why not have this in the css file
are these importants necessary?
className={cl("ellipoverflow")}
50 is too high.
i can move it i guess.
it didn't wanna apply i was mad.
lemme test if they are
basically i just did the changes ven requested ok
ok im waiting for afn to merge
ok @xafn i did some changes ven requested :yesyes:
did u pr to wrong repo lmao
I understand, but still with the current system animated stickers still convert badly to gif for some reason.
Yes, that's the point. Stickers are converted to gifs first because they are in an image format Discord doesn't support. Sometimes the conversion goes poorly, so you may want to see the result before sending it
ye
dang
you just know once u get familiar with discords code base
im totally just messing i searched for premiumType comparison in code and saw x.p9.TIER_2
ye cause we don't convert those
the ones i posted in #assets are all rright resolution
what if someone hosts a wrapper to get the image from distok and allow resizes
what they don't see
LMAO
but they get to enjoy spotify controls
poor afn hahaha
thats what matters
its 4pm babe time for ur daily 200 prs
yes honey 
same but with unnecessary info removed
could strip channel id as well
i used conventional commits for one of my projects
it was fine i guess
but i havent commited to it in like 3months
all the files on there are exactly 160x160
but conventional commits pain
so 100% same as real stickers
lmao I mean that could work
just host vencord stuff on discord so that it is the same origin 
@austere talon
I'll die and this still won't have been merged :skull:

@austere talon MERGE
Hmm, that sounds fair, but an option to customize that behavior would be nice.
I've created a plugin to bypass Discord's clientside check for whether or not you have Spotify Premium. Thus, you can use Spotify Premium-only features such as group listening for free.
Spotify without the stop, ify
real
yeah that's true
thanks for your work polar but yeah as others said its already part of ify
good patch but you gotta be careful with the find
l.Z.getActiveSocketAndDevice
don't rely on minified variable names they'll change every update
.getActiveSocketAndDevice() would be better (if its unique)
while the Z should be safe as-is, please change the l to \w{1,3} or equivalent as this could change
xd megu not reading chat
were u using patch helper btw
no
no, the patcher doesn't validate this it just applies to the first found module
but generally your regex wouldn't match something in another module so the worst that will happen is the plugin not working
regex isn't supported in find because its not really necessary and string is faster
real
real
ty 
please make themes instead of just css
pls
i will explode
ah crap
E ception gone wrong
@MeguminSama you forgor to close so i decided to do the mockup
but i did do it
(even tho i only did one part of it rn but it gives the idea)
THE MOCKUP! THE MOCKUP IS REAL!!
ok so now
now you need to take a screenshot of the discord client
and place that mockup where you want it in the client
and send that 
@umbral hedge
did it
it took some editing
yes mixed with the custom theme it sucks
lol
will i fix it? no
Third party CDN so re-uploading to github in case it gets deleted serverside

fixed it but it sucks now more :earthexplode:
just edited his comments 
I just noticed this breaks when the user previously opened the cover view, need to push another fix
I'm code-tarded
how do I install this
This can be done with CSS. Aka making it a plugin would be redundant asf. This issue should be closed as it isnt a plugin req
there are already themes doing things like this
This can be done with CSS. Aka making it a plugin would be redundant asf. This issue should be closed as it isnt a plugin req
It would be interesting to have a plugin/css that puts all the discord user settings within tabs in the discord home menu.
slash = "or" its common sense
idiotrs
wh
@austere talon merge
this fixes stickers with small resolution being in top left corner
aka it upscales them
ofc
the bug was just this
lmao
uh how could u expand cover if img is null?
Expand cover, then play a local file
ah i see
w
3b65384 fix(spotifyControls): add album/cover null chec... - D3SOX
this behaviour is the same as stock btw, it also just adds the sticker

now merge 187
Yeah, but only when you typed something.
Btw, a suggestion I had a while ago I wasn't sure if we want to implement this: When sending non-animated stickers it just adds the URL to the message, but that looks very ugly when sending it, so I think it would be better if it was downloaded and then attached as image. This could apply to emojis and stickers.
prettier cringe, vs code formatter good enough imo
I thought this was intended...
Uploading the gif means that it won't show as a link
petition to be able to load plugins like this
wait im a idiot
yea so insane
you will
@import "https://raw.githack.com/GeopJr/DNOME/main/dist/DNOME.css";
to quickcss
horror it looks so weird
yes some stuffi s broken
it will look same no matter what de you use
i dont think it was supposed to be ran in windows
guhh you are insane
crycord??
yea
.....
why
why would you need both at the same time
when vencord does the same stuff
????
https://github.com/GeopJr/exorcism whos gonna try and implement this thing as a plugin in vencord
unlike what the name says its a mp4 corrupting tool t hat can do funny stuff liek infinity and negative
its mostly in svelte javascript and typescript
so funny
only the svelte parts will take time the javascript and typescript ones are already finished for you lol
totally
its a suggestion for someone to make it
also i cant post there for soem reason (#1032200195582197831)
İNSANE
NO
ven be like: reviewing pr hard
also ven:corrup mp4s plugin (he made it after 2 hours someone asked)
guh it took me 5 minutes to make
5ae38a4 feat(plugins): add vc effect to moyai plugin - MeguminSama
🗿🗿🗿🗿🗿🗿🗿🗿
ven will drop the reviewdb
hate
Basically what the title says, for convenience reasons
soon
I didn't look at ur pr yet because I always get heart attack when I see your code
it's not good for my health
yeah
Love
My code is good wdym
?
!
wtf is ur keyboard
I don't even know how to type '
it's so bad on German keyboard cause we never use it
On turkish
shift 2 is "
Your keybord stupit
you know you can just use single quotes and it will automatically change them when you save file right
What does that button output then
Well enable lint on save
The button above the esc key
your plugins make my aliucord lag
How
NOW
enable
Also found the guy who only uses Javascript and python
I wont ever use it again while making prs
you wouldn't say this if you used any other languages where single quote = char, double quote = string
.
Ven loves C
ven: loading webpack
Worst
ye
Also another reason double quotes are superior is that you don't have to escape '
But you need to escape "
just don't use
I will
If you use single quote you can use " with nı problem
I just use single quotes for quoting things inside string
Bad
I have too many husks
Love
no need for using a different component, just use Vencord's Link component and set its disabled prop to !a.id
doing some imporvements
will push in a bit
uh
updating title is really buggy with local songs
for some reason
cause they dont have an id
so the comparison is always true
should work now
Aleph 0 poggers
ye
pushed changes check it out and see if u want to change anything else @vagrant topaz
Spotify api is weird they don't actually have a way to like
you gotta add to library
wdym crash?
15f1207 spotifyControls: make title/artists of local tr... - D3SOX
010523e feat(plugins): add vc effect event to moyai plu... - MeguminSama
don't hardcode this and pass a proper id (Toasts.generateId())
you will make component without using 3 trillion discord classes @crude hearth
also impossible
then they look ulgy
get gud at css
hard









