#๐ช -progaming
1 messages ยท Page 3 of 1
or make an electron wrapper for your site
xd I dont think thats what Im looking for
tldr you can't make your users have rpc like that without they themselves having premid
yes it is
you can't control it from your website but you can write a premid integration for your site
which can gather whatever data from your site and set it as activity
or just ^ lol
working 
whatโs that
requiring everyone to use premid kinda sucks lol
Also with the self bot I think thats what Lunar Client might use to link to ur discord acc?
Whatโs that
it lets games "talk" to the discord client
wait bruh I would show the steps but canโt attach media ๐
ah cool
thatโs prolly application only tho
So create a dc bot right?
Then what :v
yeah selfbots dum idea
bro noone is gonna give some random website their token just for rich presence ๐ญ
i will
you have two options:
- premid
- make an electron app for your website
RPC is websites too but closed beta
simpliest thing is, make it a real app and use game sdk, or dont bother with rpc at. all.
i've only seen (ws-based) RPC in https://streamkit.discord.com/overlay and some mouse program
Customize, promote, and show off your Discord community directly on your stream. Display your Discord chat alongside your Twitch chat so the memes can be shown in unison.
cool stuff but obviously if they opened it to everyone it would be abused
i think it does have an oauth prompt
discord themselves abuses it
source: invite rpc
Could someone recommend a domain provider other than cloudflare? For me https never works with github pages for some reason
does anyone actually even find that useful
eh do they not use registered protocol urls there
i don't think that has an application id so it's a bit different
yeah i frequently get logged out on browser
It still has the websocket origin header
porkbun is the best
they don't
but i still use cloudflare for dns
what
this isnt what i mean
i have my ways
this works the other way around
what were you replying to
the "discord app detected" on the invite page via rpc where it just goes "oops lets go bother you over here"
hmm
uhm yes please enter ur full discord info in the form below

How does vencord do it w the rpcs then
becsuse it has direct access to discord
it's literally running inside discord
just make a desktop app via electron
quick and easy
Hmmmmm, yeah Iโve got the electron ver working xd
Is there any way I can like integrate electron into a website
no lmao you need to make your users download and install your program
<iframe>
it is dead
oh :(
why do people do this
{
foo: function() { }
}
drives me crazy
{
foo() {}
}
```๐ญ
const foo = function() {
}
I HATE IT SO MUCH
if its to implement a type, okay..
like
const foo: SomeFunc = function (arg, arg2) {
}
but anything else nononono
i personally prefer (arg, arg2) =>
ya ofc but sometimes u cant
with any sensible usecase?
I can't believe after so many years of js
I did not know you could do that
I thought it was arrow functions only like that
WHAT

did you not know you could use functions as a value without declaring them
yes
what kinda yes
it's also pretty common to do const thing = function
isn't it?
even though it's useless idk
dont think so
how long have you been doing javascript
but anyways the use case for it is using the differences in the this arg and the arguments variable
OH YES
because this differs from arrow functions and normal functions
like 4 years
and you can't have a type for a standard function declaration
i think i wrote terrible js 8 years ago
but I learned so much about the hidden features with Vencord
๐ฟ
dang
my 2021 js was also somehow just as bad
okay, so i don't get terminated
i'm pretty sure i did some stuff in either 2016 or 2017 when i was at most 10
or did i maths wrong
but honestly i didn't make anything particularly cool
what do you expect LOL
I see
you touch programming early
nahh dont say that
you prob did a lot of things privately
even the small things they still add up
AW HELL NO
actually i think first started with python but i couldn't get "hello world" to work because i was so dumb
I PAY FOR NITRO WHY IN SHIT DO I GET ADS
i used to write mods for mcpe
i think i wrote print "hello world" or print("hello world" or something
and i had no idea what was wrong
blocklauncher my beloved
insane that they used js for mods
i remember i was really excited when i got php working
you're 16?
surely someone already found a way to make it think you're actually streaming the game instead of downloading that much
so what would you like to learn about that plugin?
or my modifications
Honestly was just gonna look through, havent yet, assume itโs just kinda going until ratelimit rn?
yeah, but im not really htting any rate limits
Googleโs limit is pretty high to be fair, DeepL would be a good idea as a backup option
Just for subpar or low quality translations
What google has failed at, deepL has had my back on
Could compare two translations at each check, and the higher score would be shown, but damn would that be taxing
I could do that, but I dont wanna waste ressources unnessecarily
also how would i evaluate whats better?
i could connect a local llm to it 
I think I really go for img translation, i kind of want it
@alpine lily 2010 it was 100k per day
I am not really worried
Image would be neat, just use OCR like tessie does
Yeah Iโd say, OCR translate for images would do numbers
OCR?
You could easily have just that merged to the main branch without the auto translate
Optical Character Recognition
yeah, I may do it next week
but man
vencord plugin writing is so good
like holy
Typscript is a great language
Might actually do a dev install on canary or development and check it out
์์ ๋กญ๊ฒ ๊ทธ๋ ๊ฒ ํ์ธ์. ctlr r์ ์คํํ๋ฉด ์ฆ๊ฐ์ ์ธ ๋ณํ๋ฅผ ๋ณด๋ ๊ฒ์ด ์ข์ต๋๋ค.
|>> feel fre to do so, doing ctlr r and seeing instant change is good
์ ๋ง ์ข์ ๊ฒ ๊ฐ์
|>> like really good
Yeah cus the plugin is now loaded, so code changes are all its checking on load
First time load is the client restart, anything after is just a Refresh
@frosty obsidian should i make the mpv events a flow in kotlin
currently its just kt while (true) { val event = mpv.waitEvent(1000) if (event is MpvEvent.EndFile) break }
what is 1000
its the timeout
so
1000 ms
* no event was received. A MPV_EVENT_NONE is returned on
* timeout. A value of 0 will disable waiting. Negative values
* will wait with an infinite timeout.```
if its possible yeah
should be i think
How would I be able to get a list of all the group dms/chats I am in?
Thread checking ie finding threads in a specific threadchannel ie ones I created/own
Emoji downloads as in complete server or any emoji I select
(this would also be appreciated if i could get help with it
(please reply ping if have a solution, will luckily be asleep soon)
@frosty obsidian should I make KMP image manipulation library
the deco is worth it
banner checks out
/j
There's a plugin to not use the nitro decos lel
Tho it requires nitro anyway for the animated ones lmao
Real
why do u even care, isn't it just tucked away in the gift menu
as long as they don't advertise it in random locations it's not really a big deal
not to mention free decor is epic :D
Yeah quests are a cool feature
Free stuff and things to do if you want
- it's not invasive
there's a free decoration?? how can i cheat and get it without playing a game i don't want to
legends has it that #๐-js-snippets has your answer
Chat pfps go crazy rn
yes
is anyone able to help me make this code work? i forget the login for my account but i have the token
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login("")
how would you ever forget your login but still have your token
seems really sus
who just has their token lying around
ong
/** set token **/
findByProps("getToken","setToken").setToken("token here"); // you have to refresh after running script!!
/** get token (DONT SEND YOUR TOKEN TO ANYONE, IT PROVIDES FULL ACCESS TO YOUR DISCORD ACCOUNT!!! DONT DO IT...)**/
console.log(findByProps("getToken","setToken").getToken()) // (DONT SEND YOUR TOKEN TO ANYONE, IT PROVIDES FULL ACCESS TO YOUR DISCORD ACCOUNT!!! DONT DO IT...)
found this
thanks
still very sus
i can even record myself doing it if its that sus
just wondering why......
i lost access to my other account which has my ukrainian family on it so i really need to get into it
white name behavior
homie just got someone hacked
you?
shh i'm a rlly cool color at heart...
okay that's just skiddy garbage
this won't even work
atleast they a white name thatโs aware of how most white names act
true
real
real
pink? ๐ฅบ
maybe...
how do I get an output for console.log() in a plugin
Ctrl shift i then console tab
wtf
oh discord has a console tab..
ok nevermind I didn't know this was possible, or if vencord added this
that's all lol
or use toasts for a nice developer experience
Discord is an electron app, practically all of it is web dev
Spent 10 seconds wondering wtaf toasta was
LMAO
Spent 10 seconds wondering wtf wtaf was
How would I be able to get the list of group chats/dms(willing to export it to json)?

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.default?.loginToken).exports.default.loginToken("token")
i used this when switching to canary

All I need is way to export the group chats/dms I am in
I am in a lot of them and this allows me to keep track of every gc I am in
Vencord.Webpack.Common.ChannelStore.getSortedPrivateChannels()
Huh that's all of them?
you can't get all of them
i'm pretty sure that's everything that shows up on the home page though
You cannot get all the group chats/dms that are you in?
i think group chats are always there
That's just group chats right?
well dms are eventually closed
Is there a way to filter to just group chats?
.filter(channel => channel.type === 3)
idk if there's a constant
Vencord.Webpack.Common.ChannelStore.getSortedPrivateChannels().filter(channel => channel.type === 3)
Then ?
turn it into json
Hmm?
I barely know js
I tried learning but that was faster knowing it enough to extract flash files and other content with inspect element
do you know how to create json data
is there any css to get rid of this dumb white space where badges are?
I do not know how to create json data
#๐จ-theme-development is prolly a better place for that question
Vencord.Webpack.Common.ChannelStore.getSortedPrivateChannels()
did not really help
I think it dumping to a json file would be best
that was funky output
how do I make it a json?
add "on"
add on for what ?
Idk know js
well if you have "js" and you want "json" you just put "on" on the end of it
That was a weird joke
@formal belfry check usercss when creating a new style
ok
I did that it just says the metadata error
check the metadata then
How do i check that?
I had that before lol,
i made a new style and just put in the code at it works
Thanks
Appreciate it

i got a random question, idk if this is possible but is there a way to get an html mockup of a discord server page? i need it for a previewer i'm making
there are many mockups on Figma (Design Program)
I saw them, but you can only export as css, I need 1 solid full page
I'll look at it tomorrow ig
They're more images than they are pages
How would I turn:
Vencord.Webpack.Common.ChannelStore.getSortedPrivateChannels() into a json?
and would i be able to dump a server's emojis in a folder?
(thinking about making a copy of emojis I uploaded)
but locally not on discord
you don't
go read #๐-js-snippets
Does anyone know if its possible to pass arguments to the vencord linux installer because i have a script to automatically update discord and run the installer though i would like if it could just go with predetermined settings
Use the CLI version of the installer
Thanks i didnt notice the help option from the dropdown before
yes welcome to floating point decimal representation enjoy your stay
I read that as await client.query("BOJACK");
๐
hoarse
why isn't this just a catch lol
try {
xyz
} catch (e) {
rollback
}
or something
unless you use the done variable somewhere later
if u need a "done" variable in a non complicated context ur doing something wrong
uint64_t xpf_find_pmap_bootstrap(void)
{
__block uint64_t pmap_asid_plru_stringAddr = 0;
PFStringMetric *asidPlruMetric = pfmetric_string_init("pmap_asid_plru");
pfmetric_run(gXPF.kernelStringSection, asidPlruMetric, ^(uint64_t vmaddr, bool *stop) {
pmap_asid_plru_stringAddr = vmaddr;
*stop = true;
});
pfmetric_free(asidPlruMetric);
__block uint64_t pmap_bootstrap = 0;
PFXrefMetric *asidPlruXrefMetric = pfmetric_xref_init(pmap_asid_plru_stringAddr, XREF_TYPE_MASK_REFERENCE);
pfmetric_run(gXPF.kernelTextSection, asidPlruXrefMetric, ^(uint64_t vmaddr, bool *stop) {
pmap_bootstrap = pfsec_find_function_start(gXPF.kernelTextSection, vmaddr);
*stop = true;
});
pfmetric_free(asidPlruXrefMetric);
return pmap_bootstrap;
}
*stop = true;
in a non complicated context
is this really that complicated
not the function itself but working with the kernel (doing whatever the fuck that is) yea
this could probably be refactored i just have no idea wtf it is
it finds something in the kernel
that's it
lol
lots of uppercase and lowercase = complicated
to ensure that it's run in every case where the function exits
if there was an early return by mistake rollback would not be called
and this may not be complicated but i should keep things consistent
@royal nymph #๐ณ-plugin-requests message
necaise i'm lazy
because*
and i have other shit to do
can't type in that channel
i'm currently going tru hell, because I'm making my own W3C compliant WebRTC polyfill for Node.JS and Bun
and the fucking negotiation isnt going tru
and i wanna cry
its like x4 faster than wrtc
BROOO
WHY
you are insane lmao
because
seek help

not fair.
what did u just say ๐ญ
YEHA IKNOW BUT
๐ญ
bruh firefox made itself my default browser without my consent
kill.
yeah this impl is faster than google's
so we'll finally have good shit to run webrtc on node
firefox is the only browser that deserves to do that
after that i'll be doing ws most likely
because npm:ws fucking sucks too
IT FUCKING WORKS
HOLI
is this good https://github.com/uNetworking/uWebSockets.js
ive seen people praise this
its less shit than npm:ws
which is a low bar
i've never once seen itself compare to other ws implementations, like go, C etc
so i assume it underperformed so much they shy-ed away from it
shied? shyed?
idfk
๐คฎ
We've been fully standards compliant with a perfect Autobahn|Testsuite score since 20162. ยตWebSockets powers many of the biggest crypto exchanges in the world, handling trade volumes of multiple billions of USD every day. If you trade crypto, chances are you do so via ยตWebSockets.
edge setting itself as default with consent -> EEEEVIL
firefox setting default without consent -> very good it deserves to do that
so it's made by scammers
no graphs
why are they only doing socket.io https://github.com/uNetworking/pubsub-benchmark
mood
uwebsockets is actually really good and is used as the standard in Bun, ironically made with C++
what is worse
everyone knows if u just share blog posts and articles you seem smart u dont actually have to read whattheyre about
are websockets that effcent
well its c++ so thats a start
something something linkedin users would do this
reviewdb websocket for notifications soon (5gb of memory usage)
i mean websockets shouldnt be much less efficient than plain http
in fact modern http uses a socket like method of connecting
http has polling
it keeps the connection open
yeah but you are keeping connection alive
so does http
modern http keeps the connection alive usually for 5 minutes
to reuse it for future requests
what about websockets
edge/chrome-based browsers -> EEEEVIL
anything else -> very good it deserves to do that
part of the improvements of http1.1 / 2
also isnt keeping alive on http just saving the session
hahaha
actually fucking clueless
XD
what I mean by that is dont websockets send data in time to ensure its not broken
it reuses the same connection
there are so many god awful WS implementations
does reviewdb even check for notifications on a schedule
you have no idea
when you have lots of clients that heartbeat can be a little resource consuming
reviewdb WS would be horror
idk
I am wondering if we had connection to every user would it cause so much resource usage
over 100k its hard to keep ws on a single machine
you need to do sharding and shit
its fucked
with 10k connections and 1k payload being sent it only uses 300mb of memory but lots of cpu
if you are efficent enough would it be really a problem
also the amount of requests you send
yes
@calm ruin what are the specs of the reviewdb server
requests arent the issue
this sends 1k payloads for example
keeping the connections open is the issue
reviewdb would send 1 request every billion years
i know from https://tracker.webtorrent.dev/
A free-to-use public WebTorrent tracker.
24gig memory 4ocpu
aquatic has some rust based ws impl
and its insane
but its so insanely giga specialized for webtorrent
that it wont work on anything else
but man, does it go brrrr on webtorrent
ok so
@cerulean plover
what is this
native: 50k, yah we gucchi
/run
class Penis {
execute(args, event) {
console.log("penis")
}
}
console.log(new Penis)```
Here is your js(18.15.0) output @pine coyote
Penis {}
discord really cooked by adding bulk ban but they didnt add the option to dm users a reason
so if u wanna use bulk ban you have to first dm all users
then bulk ban

/run
class Penis {
execute(args, event) {
console.log("penis")
}
}
console.log(new Penis())```
Here is your js(18.15.0) output @pine coyote
Penis {}
AYO WHAT
COOKING TIME
am i stupid
i mean regular ban doesnt have an option to DM users first
yes but
yes
regular ban is finee cause u just dm().then(() => ban())
dont you need to do some promise.all shit
this is requests per second
imagine like
let users = [...] // 200 elements
users.forEach(dm)
bulkBan(users)
1 million reqs per second is insane
this doesnt have to do with connection count
please learn to read legends
why do you even need to do bulk ban anyway
is bulkban built in the api or is it api spam
wha
just make it 3 secs 
api
/run
import { register } from 'node:module'
register('./', import.meta.url)
@supple whale I only received js(18.15.0) error output
(node:4734) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `โnode --trace-warnings ...`โ to show where the warning was created)
/piston/jobs/8691ce10-d5d6-4d80-a076-7758034a154f/file0.code:1
import { register } from 'node:module'
^^^^^^
SyntaxError: Cannot use import statement outside a module
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
mmmmmmm
oh lmao bulk ban
discord api endpoint
wdym
you have to dm all users first
i think creating 200 dm channels and dming everyone takes at least a minute
yes understood troll
/run
const { register } = require('node:module')
register('./', __dirname)
@supple whale I only received js(18.15.0) error output
/piston/jobs/ab137c9e-afa3-476a-8cc4-9f8c0e514d6f/file0.code:3
register('./', __dirname)
^
TypeError: register is not a function
at Object.<anonymous> (/piston/jobs/ab137c9e-afa3-476a-8cc4-9f8c0e514d6f/file0.code:3:1)
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
maybe just dont use bulkban 
imagine people getting banned message then spamming in server
boooo, no fun allowed
ban reasons dont show to users right
@royal nymph you didn't explain why you even need to bulk ban anyway
ah yeah, register is v20
discord soooo dumb
nop
he will wipe the server suddenly for epic trolling
raids mb?
this is something you do manually with eval
to ban people?
yes but what case requires banning 200 people at once
how did you get all of them
okay realized
I tihnk
lots of spy pet account have 22 februlary account creations
wait how did you find
and back to december 2021 but still that isnt enough?
did you check online activities over long time or smthn
or did dolfies hack into spy pet and gathered all accounts
their api for some reason leaks the accounts
NO WAY
i think he did an oopsie
oh
LMFAO
first i thought it was just a troll but half of the accounts have the same pfp
wait really
also yeah
true....
why bother
give them temporary role, make channel that only that role can see, ping role with ban reason, it will stay in their notifications, then ban
(do not)
me too -- how could somebody be so dumb
insert clueless emoji
BREAKING NEWS: kiwifarms user is stupid
part of me thinks they could have an elaborate plan to trick people into ban sharing
and the other part thinks they forgot an ! in an if statement
but they still might be clever enough to weaponise their mistake
https://a.spy.pet/api/event they collect info on everything you do 
Express js as backend 
LMFAO
export function pluralise(amount: number, singular: string, plural = singular + "s") {
return amount === 1 ? `${amount} ${singular}` : `${amount} ${plural}`
}
i hate grammar
plurals. the number 1 enemy of programmers
easy solution
you have 1 product(s)
you have 300 product(s)
just add (s) so and dont bother to add s 
why tho
i hate this
why the fuck are they that stupid to hotlink that
if (/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname) || "file:" === a.protocol)
return s("localhost", e);
if (window._phantom || window.__nightmare || window.navigator.webdriver || window.Cypress)
return s(null, e);
try {
if ("true" === window.localStorage.plausible_ignore)
return s("localStorage flag", e)
} catch (t) {}
amazing bot protection
why th would someone use webdriver to automate gathering data
imma do a cursed
const pluralise = (amount: number, singular: string, plural = singular + "s") => `${amount} ${amount - 1 ? plural : singular}`
only while logging in I think
requesting users dont require captcha
it doesnt no
and you can prob easily bypass this
the captcha no]
they use captcha solvers for it
which is why they use webdriver
I mean the webdriver check
but using it to farm is braindead
captcha is hard to bypass yeah
but you also dont need to automate logging in
whatever
ngl. i thought we were talking about discord
not the spypet shit
oh lmao
i can prolly make a script to take it down if they are using an api i can spam it to all hell with events and crash it
not the first time ive taken down a skid
i even found a way to bypass cf lel
how th would you even bypass cf
but anyway I think since its the API its easy to spam yea
i use the same method in mewdeko for the nhentai api
since they blocked it off with turnstile the stupid bastards
anyway when you get succesfully let through you get 2 cookies, csrf and one more
use those with the same ip and useragent and it lets you through no problem
lmao
you dont even need to use webdriver
i don't think this works will all languages
i don't like non anonymous arrow functions
im not joking either
yes. you can use Intl.PluralRules to work across languages
but last I checked venbot wasn't localised
i18n is for nerds
**NHentaiClient.cs: **Line 23
public NHentaiClient(string userAgent, Dictionary<string, string> cookies = null)
@royal nymph will vencord ever get localization
its really fucking braindead
why does this api even exist
why is the plural customisable
ohh
english
its one of the most used functions of my bot lel
even english has pretty crazy rules
unfortunately
why the fuck
it's not surprising
english is crazy
??? ๐ญ
i forgot
1 person
2 persons
i love persons
what is this?
spiderfoot
osint tool
lmao
LMAO
A lightweight, non-intrusive alternative to Google Analytics.
cant hide from spiderfoot
lmao
oh kek but still
meh I dont think it'll find anything
it doesnt use some old freamwork
just astro with expressjs api
funny thing is they still use google analytics anyway
hmm theres a login page too
actually its a bad idea to post that
WAIT
NO SHOT
THERES NO WAY THEY ARE THAT DUMB
it has publickey tho
it gives us the server ip
thats true
probably has a decent password or honeypot
@undone pasture get them to index yuri and then report them to hetzner for cp
we can bypass cloudflare
doubt they are that smart

iykyk
we can report them to hetzner/cf anyway for violating data privacy laws
yes true
but
do not report them to cf
because they will forward your dox to the spy.pet skid
also it seems to be correct server
who will post the info on kf
das a lot
ports 80 and 443 are open
ssh is not cf'ed probably though
I alr ran nmap
btw whats that tool
spiderfoot
lets scan all 65k ports
see if they have anything interesting running elsewhere
it uses apache h
Some services are down
GOOD
LMAO
is the ssh subdomain returns cf as the ip
but cf never has 22 open, ever
theres some other fuckery going on
tbh i dont get why you would put a ssh subdomain to your server
normal people use regular ip adresses
that makes me suspicious now
its also using apache while normal server is using express
(unless headers are modified by cloudflare )
they can be
cope
ig it could be a honeypot but we will see

how do you know
lemme do a favicon check from shodan to confirm
nop it is dutch government servers
do you mean like they redirected dns to there
yes afaik
meh
queryying ip doesnt really give any results
and that ip seems to be from netherlands
i looked up their asn info
thats why
imma back away slowly and nuke some traces rq
shodan returned nothing for the favicon
lmao
i think the dutch government would be very displeased to find out someone is using their servers to distract people researching an illegal data scraping service
yeah that kinda makes it worse lmao
probably also true
this guy is cocky
wtf do u expect from a kf user
tru
netherless this is not the server yeah
https://www.duo.nl/particulier/ is this some sort of university
idk I cant read german
wait its not german 
any1 here got bun set up?
welp, if some1 is bored enough, feel free if https://www.npmjs.com/package/webrtc-polyfill segfaults on bun, im on windows and cba doing wsl for bun
when native code segfaults when running in an environment that it isn't expected to run in
MessageTags already does this
test replace :^)
it shound run fine in bun tbh
a lot of node native code does
true
huh
its not really mature and while dx seems good initially, doing anything serious with it is nothing short of trying to krill yourself, also half of the documented stuff doesnt even work (or atleast didn't work when i was still using it)
generally the dx goes from insanely good to insanely terrible
users_ids
trol
fixing
just wait for it
183:40 error Missing space before value for key 'user_ids' key-spacing
funny
LMAO
the formatting is funny
why do u do that
delete_message_seconds: options.deleteMessageSeconds,
user_ids: options.userIDs
its pretty but also inconvenient
do any of you know Android app development
nop
nop
ill just wait for stable release
its not big of a deal this is a rather niche command
wont need it any time soon probably xd
thanks tho
because I like it that way 
so true
fair fair
I do the same thing with enums as well, though those have to be done manually ๐
yea
english
@calm ruin minor typo
haha i see
"minor typo"
nledodWOCN OFQOEPPKO DEWF
sorry minor typo
neat
String.raw({ raw: strings }, ...values);
this syntax is so odd
export const stripIndent = (strings: TemplateStringsArray, ...values: any[]) => {
const string = String.raw({ raw: strings }, ...values);
const match = string.match(/^[ \t]*(?=\S)/gm);
if (!match) return string.trim();
const minIndent = match.reduce((r, a) => Math.min(r, a.length), Infinity);
return string.replace(new RegExp(`^[ \\t]{${minIndent}}`, 'gm'), '').trim();
}
stripIndent`
Hi
Hello ${"World"}
`
i think you're supposed to use tagged templates for that
tagged templates are fun
yes thats the point
this is identity function for tagged templates
they look so stupid in code
yeah idk why the raw strings are in an object
anyway it works 
at this point nodejs should make it inbuilt
the fact that there are several stripIndent libraries with dozens of millions of monthly installs
maybe they could do it like other languages:
`
this keeps its indent
`
`โ``
this strips its indent
`โ``
oh i know
basically, if you call a func with func`hi`
then you can access the raw parts of the template via arg1.raw
so String.raw just accesses & formats arg1.raw
we can trick it into thinking the normal string is the raw part by passing it as { raw: thing }
@royal nymph hi
hi

In this video we'll port the (very cute) JavaScript library Oneko.js from vanilla JS to Svelte 4 and Svelte 5.
Original library: https://github.com/adryd325/oneko.js
Repo: https://github.com/khromov/svelte-neko
no way
oneko!!!!
how tf did u find this
80 views
i still dont see an use for this
just evaluate it as a string in the first place?
stripIndent(string)?
why bother with the whole template shit
like its cool you can have the raw string and shit, for other string parsers and command inputs
but i've only seen one good use for it
google's zx
so by extension, execa and bun shell
but it's all google's zx code
i prefer calling as ```js
stripIndent h
instead of ```js
stripIndent( h)
yes, but outside of being slower, and not supported on all engines, whats the point?
like have you ever actually found a good use for it?
legit curious
cuz i've also had this in the back of my had for ages now, but i cant think of a good use for it anywhere
i thought mby gql templates for JS, but that aint it either
slower
literally how lol. maybe marginally but it's irrelevant
not supported on all engines
who cares im using node
templates are really useful for anything where u need to heavily format strings
sql, html, gql
sql`
SELECT * FROM users WHERE id = ${user.id};
`
oh
there are multiple frameworks that use this
input sanitisation?
yes
your sql func gets the values and the string slices
can just escape and join it together
same for gql, html etc
import React from 'react';
import styled from 'styled-components';
// Create a <Title> react component that renders an <h1> which is
// centered, palevioletred and sized at 1.5em
const Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
// Create a <Wrapper> react component that renders a <section> with
// some padding and a papayawhip background
const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
function MyUI() {
return (
// Use them like any other React component โ except they're styled!
<Wrapper>
<Title>Hello World, this is my first styled component!</Title>
</Wrapper>
);
}
but html yeah I can see that
this is cool too
CSS for the Age. Style components your way with speed, strong typing, and flexibility.. Latest version: 6.1.8, last published: 3 months ago. Start using styled-components in your project by running npm i styled-components. There are 24117 other projects in the npm registry using styled-components.
why, just use the global CSS styles and keys typescript already has
cri
typescript has no css api idk what u mean
if you mean
<div style={{ color: red }}>
that's react prop
then again, if you write raw SQL in js you're insane
you're not insane to write raw sql in any lang
sometimes you dont need an orm
debug script that is run once in a blue moon by devs only
yeah let me just pull in a whole ass orm and write my fancy little structs/interfaces (as opposed to like what a couple lines of sql)
function createWithStyles (element: string, styles: CSSStyleDeclaration) {
const x = styles.width
}
so u can then do
createWithStyles('div', { color: 'red', background: 'purple' })
and it links to MDN
this is generated, so you wont find it in typescript's source code
but
if you install it
oh yeah i'm just way too used to creating a data structure, and having a database, api, types and interfaces generated for that data structure
i rarely write sql manually anymore, 90% of the time its generated
sometimes i write queries for limited views, to say expose limited data from a protected endpoint without authorisation
chat...
does anyone know how to make a css transition
i want to make elements slide in
i can show an example of what im talking about
https://ven.earth/ like this
if u literally have an example
why not just kang it
open devtools and see how they do it
it uses some bloated ass animation library
i want to do it in css but i'm clueless
i wonder what the best way to implement discord buttons is...
i think it's bad just to store all of the data in the buttons
for a bot
yes
you get up to 100 chars afaik
yeah but what if somebody finds some kind of exploit to inject something
idk
but how do you encode a callback function in there ๐ญ
you'd just have to encode all of the captured variables
i'm specifically trying to implement this
which is kind of a pain
pagination
oof
wtf are you doing no
no no no no no
nooo
should be shortcuts wherever possible
i want an easy way to do it everywhere
you put the callback into some kind of map where the index is "messageId:option" or something like that and you look that up when the interaction is recieved
?
what if callbacks[message.id]button.customID
even better
write your own garbage collector
just use some snowflake to date parser
so you can edit commands and the response updates
how do you make a map where stuff expires
and do something like ```js
Object.keys(callbacks).filter(id => snowflakeToTimestamp(id) < Date.now() - something).forEach(id => delete callbacks[id])
that seems bad practice
yes it is






