#development
1 messages · Page 155 of 1
Most likely yes, it will eventually turn out when this sharding starts to work
So many JS projects
Fr
Do Discord modals only support text input?
Yea
Lame
Maybe someday they'll add other options, but for now, just text
I would like to see some dropdown menu like select menu or buttons
Or True/False
True
I would give you mine but I can’t access my host
oh ?
I don't have this problem it is hosted in my living room 
yeah this kept happening so im guessing someone broke it
outch
And I imagine that you only have the dashboard to connect to this kind of "host"
Yours ? @dense nimbus
Most bots clicking on them you have an "add bot" line
for example
click in bot ^^
thanksss
no problem
Yessu
I need to split a string every time whenever it matches the regex /[^0-9a-z ]/gi
E.g.:
! . $ % a b %1
becomes ["! ",". ","$ ","% a b ","%1"]
How can I do this? (JavaScript)
str.split(/[^0-9a-z ]/gi)
then your regex is wrong
Could you help me on that?
well, splitting a string removes the character you're splitting on
mhm
so if you split on ! it removes the !
and creates an array from everything before and everything after as the indeces
let me try smth
I'm not the best at regex
try this regex: /(?=[^0-9a-z ])/gi
@surreal sage
This code is to send attachment to a particular discord channel. This code is working fine. But when I take more than 30 seconds to input the url, the program crashes
import server_id from config
import asyncio
import token from config
@bot.event
async def on_ready() :
print("Connected !")
channel_id = str(input("Enter the channel id: "))
server_id
while True :
server_id
url = str(input("Enter the url of the file: "))
server = await bot.fetch_guild(server_id)
channel = await server.fetch_channel(channel_id)
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
print("Reading file...")
img = await resp.read()
with io.BytesIO(img) as file:
print("Sending file...")
await channel.send(file=discord.File(file, get_filename(url)))
print("File Sent !")
print()
time.sleep(0.5)```
**The error is :**
```[2023-08-06 10:39:08] [WARNING ] discord.gateway: Shard ID None heartbeat blocked for more than 70 seconds.
Loop thread traceback (most recent call last):```
because you're in a while true loop within your main thread
you're blocking everything else from working
never use a while true like this
@wheat mesaAny solution please 🥺 ?
I think you should use a timer instead of a while loop
timers should yield processing time and not block your entire program
unless asyncio has some kind of yield function/wrapper which lets you use a while loop without blocking
wait does python even have an interval/timer function 💀
makes sense tbf since its single threaded by nature
What I don't understand is why?
Why not make this a command?
Why are you waiting for console input?
how to use it 😅
I really mess up in args[]
You should make this a command and restrict it to yourself, having blocking console input AND a while true loop in a discord bot is less than ideal to say the least
Okay I'll try. Thanks
I didn't see the input
wonder how those skull oscillations around an axis are so perfect
Is it illegal if I send the attachment using python requests?
Probably not, unless it's a self bot
Yay thanks
how do you even solve this anyways without the input
I'd assume you'd make a new thread and do a while true sleep
but idk if the python library is thread friendly
unless asyncio has its own stuff for that
I don't know, I don't use python
I just know that this is terrible design
I assume there's some async input you can use without blocking
Where you can receive an event every time you get input
Something like that
I think it let's you add a function to the event loop
essentially turning it into a js process.nextTick or something
though when the event loop is free as opposed to the next tick
pythons weird
ironically it's single threaded nature by default makes it more confusing than simple
I have converted my code from discord.js v12 to v14. I am very new to v14 and I'm encountering some errors. Is there anyone who can help me?
You need to specify intents in your client
new Discord.Client({
intents: [ Some Intent Flags Here ]
});
Lol had the same problem look hat the guide of discord.js it helped me a lot
You definitely do NOT need all those intents
Unless you somehow have a genuine use for every single one
Which one should I add as intent then?
The ones your bot needs. If your bot doesn't receive private messages then the intents associated with them are useless
Same with everything else. If your bot doesn't need to see/handle webhooks then it doesn't need this intent
I added it because my bot is a generic bot, but it would be nice if you could point out the ones that didn't work.
Only direct messages?
I get the same error when I delete the intents of the direct message. I left my Discord.js version down.
What does your bot do? You should only add the intents it needs
The bot serves categories such as moderation, server setting, giveaway, entertainment and more.
And my bot generally sends moderation actions to the server owner's dm.
You don't really need @discordjs/builders package.
This is not a good idea. Your bot may be blocked by rate limits related to creating new dms
Yes, the rate limit had been eaten.
What intent doesn't a generic bot need here?
Depends on what your bot is doing
Commands like caps-lock protection, profanity protection, antiraid, ban, kick, ad protection, role protection, channel protection, auto-role are available in moderation.
I have decided to convert it to V13, thanks for your interest.
Yeah do that and then convert it to v14 xD
does anyone have some ideas how i can improvide this page?
Gekke Nederlander

Maybe you know do everything Dutch or everything English not both xD
hahahhaha ja ik heb een paar woorden door elkaar gehusseld

maar qua design ?
Yea, dark theme would be great
yeah might add a dark theme indeed
me personally, i don't like this cart view
idk it looks so.. strange or something
but can't wrap my head around what to change
Sorry Aurel Im sure you can understand it right? You’re from Germany xD
outch
Hm?
Hello
Dark ree and bright white don’t contrast well
Also you shouldn’t make a buy or submit button dark red
It bad ux
Should be an inviting color
Like blue, green, etc
Also your buttons are rounded but the image isn’t which breaks up the contrast
There are a few more small things that are bad ui/ux but I guess the rest is fine
Also since its a cart view you should but the buttons below the last item, since you’re making too much white space and you’re increasing the distance between clicks which is bad ux
If the user wants a compulsive experience then sure
Not so much bad ux rather than making people subconsciously think there is little in the way of making a purchase. If someone really wants something then mouse travel time/physically pressing towards the bottom of the viewport isn't an issue
I see, thanks for all the tips!
The farther you put similar buttons away from each other the worse the ux is, in this example the user has to open the cart at the top and then travel all the way down
I did that once too, luckily the day before I made a backup of everything from the VPS

F
so I have to boot into rescue, update ufw, and yeahhh
a restart disables ufw?
or just by default
time to fuck everything up
copy paste my ufw folder into the dedi
yolo
surprisingly worked
yes it does
(idk what a ufw is im just trying to make conversation)
firewall stuff
ohh right
gamerss
i need next.js help
ok basically - i am making an API route that returns a PDF file to only whitelisted users. however, it keeps trying to download the PDF file rather than render it
is there a way to fix this? i've disabled the responseLimit config option but its still happening
make sure you set the proper content type and content disposition to inline instead of attachment
Currently transforming my desktop site to a mobile site without any fucking css library 😭😭
There’s a lot of space. Would anyone know a good suggestion ?
They just don’t have a lot of products to fill the space
When I click on add to cart I have like a little popup. Maybe have that at the bottom instead of top?
Put ads in there, lots of ads
😭
Couldn't you make one instead of two columns?
It would probably be easier to read when it comes to descriptions
Indeed. Thanks for all the help guys, makes my web development career a lot easier
Need some help, i'm trying to create an Player Notification on my app, but it gets (123, 44): Type mismatch: inferred type is PlayerNotificationManager but Notification! was expected.
Line 123:
val notification = createNotification(this)
startForeground(NOTIFICATION_ID, notification)```
createNotification function:
private fun createNotification(ctx: Context): PlayerNotificationManager {
// ...
val playerNotificationManager = PlayerNotificationManager.Builder(
ctx,
NOTIFICATION_ID,
"playbackChannel"
)
// ...
return playerNotificationManager
}
even if i try to change PlayerNotificationManager to Notification i'll get something like:
Type mismatch: inferred type is PlayerNotificationManager but Notification was expected
I tried searching for something to fix but all the example code I found is deprecated
not sure what language this is, and unsure whether i can help you a lot but it looks like java so lets give it a try. what does the builder return?
the PlayerNotificationManager.Builder.
it's kotlin
what it seems like is that you are returning a PlayerNotificationManager and not a notification.
I'm assuming that startForeground(_, SomeType) is expecting SomeType to be Notification
why is the variable called notification and the function called createNotification, if the function and the variable return and hold a playerNotificationManager?
If PlayerNotificationManager extends or implements notification you can try to cast manually but not sure whether that works like that in kotlin.
And then Kotlin's typechecker is complaining because it wants to infer that notification is Notification from the function signature, but can't because createNotification() returns PlayerNotificationManager
thats what i found in an example website 💀
Question.
I have a lock channel command but it requires Administrator permission for some reasons, is that normal?
With any other permission, it just throws 403 forbidden
I've tried to put the bot's role at the top but no good
i guess it's because of the way i made the command
what permissions did you try, besides admin?
everything, i even turned all of the permissions on except admin and nope it throwed a 403
im currently trying another method
yeah it worked rn, im rlly an idiot it was trying to overwrite @ everyone permissions
Hey guys my mobile view looks kind boring imo. Would anyone have suggestions to add
Or would y’all think this is alright?
Idk i kept in mind that minimalistic is what I wanted to achieve
Personally, I would give some background to those "menu buttons" at the top
It looks weird when the logo has a background and the buttons don't
in the top left maybe use just the flame from the logo since (im assuming) the name is on the main page there anyway
it is xD
you can add a white shadow on the top of the page to improve the contrast for the menus
@peak drum Finally, I'm planning to make a documentation of my commands on my webserver
Alright well goodluck with that xD
does anyone know how to make a site fit in every browser?
for some reason some positions are different in safari than google chrome
May you be referring to the viewport height (vh)?
no not really
safari has a different styling than google
so what happens is that it ruins my fucking layout
as it reserves like 20% for the safari dock at the bottomn (or top) of the screen
"every" is kinda hard to achieve
chrome and safari is enough tbf
your best bet is to stick to mdn docs and pay attention to the compatibility list for every thing you use
the 3 main browsers are chrome mozilla and safari
Yeah I think that relates to vh
yeah it does
but i changed everything to use vh and vw
still fucks up some container designs
ig i will have to learn bootstrap to make this easier
Conquering Responsive Layouts (free course): https://courses.kevinpowell.co/conquering-responsive-layouts
Join the Discord: https://kevinpowell.co/discord
Viewport units often feel like this cheat code that makes things so much easier when you first discover them, but they actually are problematic for a number of reasons, from creating horizon...
@eternal osprey
3:17
use dvh on mobile
to not count adress bar
or svh
or lvh
Gl having anything work how you want in safari
might just wanna give up on that endevour 
Safari is the problem child of web browsers
Apple try to implement web standards properly challenge (impossible)
ong
I'm loving flex-box
yeah ^-^
Now I have to remember
Never knew this was a thing
but hey it is actually fun
Yup
I learned something new about css
or re-rembered idk been ages since I touched it
but order is a valid property
Yup
took me 10m to figure this out
@civic scroll css jail help
i have an angular component with some html stuff and some css stuff, but for some reason some of the css is not being applied
its not even being compiled, like there is no mention of it anywhere in the inspector
im using a PO-UI, an UI framework for angular
for example i have this in my component html
<div class="po-wrapper">
<po-toolbar p-title="{{titulo}}"></po-toolbar>
<po-menu [p-menus]="menus"></po-menu>
<po-page-default p-title="AppName">
<p> AppName page </p>
<po-button p-label="meuLabel" (p-click)="onClick()"></po-button>
</po-page-default>
</div>
and this in my component css
.po-button-label {
color: black;
}
po-button {
background-color: red;
}
the po-button-label element exists inside po-button, its part of the PO-UI framework, but for some reason i cannot target it with this css
i can target po-button, but i cant read the label inside the button, tried all types of selectors
is there some kind of component isolation going on that the child component cannt see the parent's css?
open devtools, is the rule present there?
it should be
and it's highly being overriden by other rules
nope, its not present at all
its just gone
dev tools shows this
SAAME lol
I need help! Why it doesn't select the others h2 after the first h2 ?
this doesn't work too
Cant u just do
h2 {
Styles...
}
figured it out
in angular child components indeed cannot see parent component classes
unless you use ::ng-deep or disable encapsulation
why "po-button" and not ".po-button" ?
po-button is an element/tag
Ah ok
wait, you can use host query selectors
oh wait...
:host selector points to the component itself from the element level
say you have ExampleComponent - example-component
:host points to example-component when used in context of ExampleComponent's style defs
iirc there is a way to query parent
in my case i have example-component which contains po-button, which is an element managed by an addon/framework
i dont have direct access to it
css is magic
actually
you can assign a class
unless i hijack it by creating a component for po-button?
class has higher priority than element selectors
because po-button already has its own component, managed by this addon library
if i create a new component using the same selector, will it override it?
no, that would cause a conflict
if you wanna hijack it, use selectors with higher priority
like how?
if you mean css selectors, i already tried it
do i create a component with a more specific selector or what?
have you tried using classes?
<po-button class="button" .../>
in your code i didn't see it
well what worked for me in the end was either disabling encapsulation or using ::ng-deep
thansk to stackoverflow
for example, this works
::ng-deep .po-button-label {
color: black;
}
po-button {
background-color: red;
}
po-button works because its visible in the component html
One message removed from a suspended account.
but po-button-label is something that is added inside po-button by po-button's own component
i dont see it from my component's html
One message removed from a suspended account.

find me some
One message removed from a suspended account.
One message removed from a suspended account.
oh dear
Atenzione pickpocket
so how do people show their current discord statuses on their websites? Like does someone have a link to proper api docs for that
I know a lot of people use this: https://github.com/Phineas/lanyard
Owh damnnn
So dvh doesn’t include the safari bar,?
wtf is ~ in css
Dayum that’s so awesome
But does this mean that on pc view I must use vh and vw, but on mobile view using media queries using dvh dvw
Uh I don't know, but maybe not recommended to use dvh, dvw, svh, etc for desktop
vh and vw is not recommend though
Conquering Responsive Layouts (free course): https://courses.kevinpowell.co/conquering-responsive-layouts
Join the Discord: https://kevinpowell.co/discord
Viewport units often feel like this cheat code that makes things so much easier when you first discover them, but they actually are problematic for a number of reasons, from creating horizon...
Just look at this
Lanyard is the best so far. Most of the other free alternatives just provide a canvas lol
so ive made my own discord status listener, it works fine except for some reason I dont see vscode in the data ...?
{"event":"presence","status":"idle","data":[{"name":"Custom Status","type":4,"url":null,"details":null,"state":null,"applicationId":null,"timestamps":null,"party":null,"assets":null,"flags":0,"emoji":{"animated":null,"name":"🗿","identifier":"%F0%9F%97%BF"},"buttons":[],"createdTimestamp":1691435524650}]}
{"event":"presence","status":"online","data":[{"name":"Custom Status","type":4,"url":null,"details":null,"state":null,"applicationId":null,"timestamps":null,"party":null,"assets":null,"flags":0,"emoji":{"animated":null,"name":"🗿","identifier":"%F0%9F%97%BF"},"buttons":[],"createdTimestamp":1691435658515}]}
import Event from "@/bot/event"
import presence from "@/globals/presence"
export default new Event()
.listenTo((events) => events.PresenceUpdate)
.listen((ctx) => {
console.log(ctx)
if (ctx.interaction.userId !== ctx.env.BOT_PRESENCE_USER) return
presence.set({
event: 'presence',
status: ctx.interaction.status,
data: ctx.interaction.activities
})
})```
It doesn't show on your profile either
I still don't see it
uhh
that was pretty informative
i used to use viewport units a lot, didnt know about small and large viewports, also didnt know about the clamp() function in css, very cool
i've actually seen lots of videos, articles and even courses that tell me that vw and vh are good practice for responsive displays.
why does html even have so many scaling types
Okay I'm lazy, I'm gonna put the commands on my website later... my bot has like 30+ commands
Guys any advice on getting this intent accepted?
Well
You need a valid reason to use it
If you don’t have a valid reason don’t apply
why do u want it?
Mainly to send my bot online however I still don't really know what function to create
u dont need that intent to check if your bot is online
you always have your own status
No, that's what it says to me:
because you're trying to use the intent
you can get your own status without the intent
oh
that intent is only required if:
- you want to check if someone else is online (or their status whatsoever)
- you want to see someone else's activity
besides, u dont even need to check your bot's status, as your client will already have the connection info
Thx man
presence intent is literally so pointless
i think they only added it so not many bots have it bc its very heavy on the api
there is no data security implications on it
whats stopping you running a self bot and scraping everything
it had a lot of privacy implications
bots watching whenever you come and go
and profiling your activity patterns
I can see the issue with having unrestricted access to presence, especially with the rise of more advanced AI technology, you could make a lot of assumptions about a lot of people
lol
wait until you hear about botlabs
they were offering a targetted ads service with information collected from YAGPDB, Carlbot, Piggy and all of their bots
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
there was someone here who was offered 8k for his bot
by botlabs
he refused the offer
good
2 472
wait really?
i thought bot labs was just a service to help big bots
dang bot labs pulling a google

Yes
The service also seemed to scam people
If you look up the reviews it’s mostly negative and saying no payout
lol
@spark flint https://www.reddit.com/r/discordapp/comments/hbfpal/psa_some_of_discords_largest_bots_may_be_tracking/
they have a valid point tbh, a random pastebin from anonymous shouldn't really be considered as a credible source
the reality is probably not as bad as people thought it would be
especially since YAGPDB itself is open source
Aren't these Botlab bots?

yes
Iirc bluestacks is also associated with botlabs in some way
mhm
they are probably paid by bot labs to advertise it
the same way how #announcements is mostly about medal nowadays
Probably another sister company like thing yes
how can I make the Voting message coming from webhook in embeds and like attach links to texts
ERROR: authentication failed: Your account is not permitted to use the agent ingress "connect.ngrok-agent.com".
ERROR:
ERROR: ERR_NGROK_122
ERROR:
Does ngrok have a quota or what
can someone tell me how do I get png or jpeg link? like from where I can get it?
go to that imgur link, right click the image, click open image in new tab
there you will have the real image link with the real extension
whats a good react lib to display durations like discord does for activities?
so i am logging a table from terminal and this is what it shows, is it normal cuz it's supposed to be true and false
t = true, f = false
i guess
thats how they chose to display it lol
for some reason
I got the link but it still shows the same here's the link I got https://i.imgur.io/trKRerp_d.webp?maxwidth=640&shape=thumb&fidelity=medium
when your brain freezes you just ask bing chilling
They own it afaik
you can rename the webp part to jpg or png
okay
And the rest?
like ?maxwidth=640......
that?
Usually, query strings don't have that big of an effect on the response
This is what it shows now
use https://i.imgur.com/trKRerp_d.webp?maxwidth=640&shape=thumb&fidelity=medium
aka
replace the io with com
then it shows it isn't a jpeg
Still replace the webp with jpg
The error messages and what you have to do are pretty clear
Then convert your webp to a jpeg and upload that to imgur
It’s not hard to read that error message right?
yeah it isn't
i think he is pasting in a jpeg file tho
try to remove the attributes after the questionmark
I did try it too
ohh
then also same error
I did try jpg too
wait no
and even png
it should be the same tho
yeah 🥹

looks a bit too generic imo
Agree and bad for people with deuteranopia which is most common form of color blindness
I prefer using some other colours contrast
Okay
so you have a better contrast with the white text
you can leave them dark gray for now and see how it looks like
looks good on the current page/background
i need help
idk why
but my lvl card is french
but i wanna english
i use canvas
i wanna 1st no 1er
you're using a library or code from a french developer probably
eh i liked the first one more its more clear and easier on the eyes to glance at but idk
it will depend on your final design
yes but i wanna this eng
how i can put this eng'
?
are you usiong a library
or did you copy someones code for that
show code
ok
might not be that easy if its a library
Just edit the source code of the library in your workspace
const Discord = require("discord.js")
const Canvas = require("discord-canvas-easy")
module.exports = {
name: "rank",
description: "See the xp of a member",
permission: "Aucune",
dm: false,
category: "Experience",
options: [
{
type: "user",
name: "member",
description: "Which member you want to see the xp",
required: false,
autocomplete: false
}
],
lets rule out the easier solutions first :p
async run(bot, message, args, db) {
let user;
if(args.getUser("member")) {
user = args.getUser("member")
if(!user || !message.guild.members.cache.get(user?.id)) return message.reply("No member !")
} else user = message.user;
db.query(`SELECT * FROM xp WHERE guild = '${message.guildId}'AND user = '${user.id}'`, async (err, req) => {
db.query(`SELECT * FROM xp WHERE guild = '${message.guildId}'`, async (err, all) => {
if(req.length < 1) return message.reply("This member don't have any xp !")
await message.deferReply()
all = await all.sort(async (a, b) => (await bot.function.calculXp(parseInt(b.xp), parseInt(b.level))) - (await bot.function.calculXp(parseInt(a.xp), parseInt(a.level))))
let xp = parseInt(req[0].xp)
let level = parseInt(req[0].level)
let rank = all.findIndex(r => r.user === message.user.id) + 1
let need = (level + 1) * 500;
let Card = await new Canvas.Card()
.setBackground("https://media.discordapp.net/attachments/1127863739962621963/1138385468791193651/ROBLOX_PROFESIONNAL_LEAGUE_5-PhotoRoom.png-PhotoRoom.png?width=1000&height=375")
.setBot(bot)
.setColorFont("#ffffff")
.setRank(rank)
.setUser(user)
.setColorProgressBar("#ff0000")
.setGuild(message.guild)
.setXp(xp)
.setLevel(level)
.setXpNeed(need)
.toCard()
await message.followUp({files: [new Discord.AttachmentBuilder(Card.toBuffer(), {name: "rank.png"})]})
})
})
}
}
ok discord-canvas-easy is not the same as canvas
so what i put?
yeah doesnt appear to have any way to change the language
youd have to modify the library or use something else
just use node-canvas
lol
they dont have a github repo either
most discord bot npm libraries/wrappers are like that
so you cant PR or create an issue
bro needs to start caching
yandev is that you
this is why i always refuse to use wrappers of wrappers
pov: the entire bot dev community
learn discord.js and canvas before knowing about the basics of programming 
turns out it were my privacy settings 
Im proud of the result now though
its the same thing
it is
canvas is their npm name, node-canvas is their github name

Alright this what I used
But the npm lib node-canvas is not the same thing
this lib doesn't work
maybe to not confuse people with the web api
yeah
@quartz kindle @frosty gale THIS tbh https://youtu.be/J0p2Psy7NfA
Recorded live on twitch, GET IN
https://twitch.tv/ThePrimeagen
MY MAIN YT CHANNEL: Has well edited engineering videos
https://youtube.com/ThePrimeagen
Discord
https://discord.gg/ThePrimeagen
guysà
àùéè
"people these days use severless databases on serverless companies launching javascript that is transpiled 6 different times"
xDDDDD
glad I went through the pain and always just tried to do everything myself. definitely not always the best but Im very good at devops and programming now thanks to that
self-learning is 💪
yeah, like, software development is such a huge world, its impossibe to learn it in a couple months like people these days do
we, as devs, have been inside this world for like 10+ years and still learning new shit every day
and newcomers are building entire full stack apps after a 3 month udemy course
i've only been developing for 3 years
ive only been developing for like 1.5 years
took me a year to fully get used to nodejs and another year to get comfortable with it
same goes for my learning process with C/C++ and Python
if you know most fundamentals, everything gets quite easy to undrstand and get into, but those fundamentals do take a lot of time to get
and thats where people get lazy and skip
:^)
*js devs
the js community is a mess
jabbascript
is it true js developers love boba
wut
@earnest phoenix does 
I'm 16 and I learnt JS, HTML, CSS, NodeJS, Svelte and others libs mysellf
I have been doing like programming for 3 years
(I'm older brother is way better than me)
I think the earlier you start the easier you have it, I started learning at 13 (with 0 knowledge) and now with 14 I can basically accomplish everything I dreamt of
yeah, the younger you are the more flexible your brain is
i'm 17 and i've learned pretty much every tech stack myself
it has an easier time adapting to different ways of thinking
I want to make a video game but can't 
i guess i started a bit too late 
i started when i was 13
programming and computer science in general should be taught in schools tbh
Hacking into a company evaluated at more than $100 millions feels good.
FIlling the report rn hoping for a big bag
starting with middle school
i started way too late lol
it was a sudden hobby change lmao
i didnt actually start programming until i was like 25

and yet u are so good at it lol
before that it was just bits and pieces of html/php/wordpress
cruicial steps
my advantage was that i started messing with pcs at 15
so i had a good grasp of how computers work
i grew up with computers lol
i mean 10 years from now there are going to be devs learning since they were 2
I started programming like 4-5 years ago, now look at what I've become and what I do :^)
can confirm?
no matter how good you are there will always be a chinese kid better than you

yeah but you have infinite time and 200 IQ
like how do you even have time for school + job + maintain 10 different projects
I can confirm that I, a JavaScript developer (and maintainer), love boba and vagne
I don't have school anymore, it's just tons of work and maintainership of many large projects, it's very draining and time consuming but I organize my schedule quite well to not go insane while doing all that
i would die lol
you're the goat

Though I'll most likely not try to become a maintainer of any other large projects because that would ruin my schedule and would put a lot of more stress onto the whole process of maintaining all of them
Maybe I'll join the Unicode consortium, but that's the last one, probably
you're crazy
:^)
join linux
just agree with all of linus torvalds controversial ideas and he will welcome you

how do the linux core maintainers even work
i know theres a few of them
and if you want to propose a pr or issue you email them
but are they responsible for different parts of the kernel or
I did at 11 but never really took it seriously and stopped for like 2 years between 13 and 15 and I’m regretting it now
When tim sais you’re the goat you better know it’s true
Every Linux kernel maintainer is responsible for different parts/modules of the kernel, for example, one is responsible for the drivers, one is responsible for security-related parts, one is responsible for the API/ABIs, one is responsible for the network modules, etc etc
These are called code owners
Also tim if you started so late how did you get so good at it? Did you just code 24/7 or did you try problems or how did you?
that sounds tricky
what do you even count as a module/part
and what if more are added
do they assign an existing maintainer or
For example, let's say there's a directory in the Linux kernel tree called drivers, which contains the drivers of the Linux kernel, this is called a part/module which a maintainer is assigned to
i always learned on a need-to-know basis, so i only learned what i actually needed. sometimes i needed it for something i wanted to do, other times i needed it in order to help someone who needed it.
so i only know what i needed to use as some point, but that also means that most things i know i have actual experience with
If an existing maintainer is interested in maintaining a new part/module, they're assigned to it, if not, the person who added it is given responsibility (however they don't necessarily become a Linux kernel maintainer, just a code owner)
interesting
good idea tho
its better to specialise in an area than in everything
because youll get confused quickly
and half ass stuff
But how did you get so good at optimizing stuff and learn to write high quality code? Because I think I know enough to make any project but if the project is too big my code will always get messy and I will probably choose the less optimal way of implementing somthing
Do you have tips on fixing that?
Yep
large projects are not easy, i have trouble with them too (been rewriting my api countless times instead of actually getting it done lol)
but just keep thinking about it and eventually you'll think of something
im basically thinking about my projects 24/7
always checking all possibilities and joining the pieces togther in my head
Yeah I do too, but I still feel like every time I implement something that there’s a better way of doing something
thats just experience i guess
And usually I’m like oh now I wanna add that and then I realise oh I should’ve implemented that part in that way and then I don’t wanna rewrite that complete thing
maybe you didnt see the better way of doing it because you havent tried doing it like that before or havent seen it done like that before
i rewrite my things a ton of times
and its never perfect
Yeah I’m kind of a perfectionist in that way
i rewrote my project 5 times already
And have yet to release it
Yes, you know the things I maintain right?
And have been working on it for 3 years now
i am too, but that becomes a problem eventually, if you cant get a project finished
Yeah nodejs right?
Yeah like my current project haha
he maintains half of the internet
Haha what
lmao
in djs, how can i send a voice channel join embed?
I basically maintain almost all the technologies almost all systems and programs rely on
Like it would display the user and in what vc he is in, with a green button to join the vc
Wow ok damn
Forgot what the peroperty is called
Like what?
node, v8, chromium, llvm
Haha what how do you manage to maintain all of that
Node.js, V8, LLVM, the JavaScript programming language, Chromium, many web standards, the internet standards
hes nuts
How do you get good enough at coding to maintain all of that
Like don’t you have to be a computer to do that
well hes not the ONLY person who works on all of them things
Yeah but still
its not that much about being good at coding, sure you need a solid undrstanding of how everything works, but being a maintainer is more about having a vision of where to go and how to continue from where we are
I don't even have a PC, I do all of them on a phone 
and of course being interested in being part of that
Yeah
so its kind of like, becoming a politician
Ah I see
in the coding world
i'm very skeptical on the impact of your contributions besides Node.js tbh
So voltrex for president?
Haha
The president of the programming world 
poresidento sama
i dont really agree
I know voltrex is sleeping on a matress made of gold fr
yes lets inflate ego more
my guy wipes his ass with money
?
after looking at your contributions on your LLVM profile page
No but I’m starting uni in september is comp sci and I probably have better understanding of pcs and coding than like 90% of the people attending but do you guys have any tips of getting better at coding and computers in general?
^
(And yeah I'm a maintainer but not the only one of course, we have a lot of people that we work together with, though doesn't change much here)
I will have to say, comp sci is probably not what you tihnk it's gonna be like. You think that you will mainly get to coding and creating programs, learning languages etc
that's not it chief
in my 1st year of uni there was about 4 of us who knew what we were doing
and by what we were doing, i just mean the coursework
You are getting A LOT of theory, and A LOT of math
not programming in general
Yeah I love that
I want the math and the theory
Maybe like 2-3 languages max per year, atleast that was the case for me.
"I mantain the JavaScript programming language" sounds and means differently than
"I help maintain the JavaScript programming language"
😭
you use your language to big yourself up
i see it a lot
not that i give a crap tho its a random chat on the internet
Alr but thanks for the advice
Damn Jake 🔛 🔝
well thats true, being a maintainer is almost always gonna be just one of 10-20 others
^
but it still shows your dedication towards a project
"I help maintain the JavaScript programming language" is not what a maintainer would say, contributors help the maintainers which is what they're supposed to say
But this does not apply to maintainers because they're literally the ones who maintain the thing
to be accepted as a maintainer in a big project means that you need to have been invested into it for quite some time
nop
him saying hes a maintainer doesnt prove he was accepted by the project tho lmao
I really don't get your point whatsoever, we've been over this many times now and you keep bringing it up, sure I don't have much contributions to the LLVM project itself but I am a part of the infrastructure and technical steering committee where I make important decisions, I was declared a maintainer by being invited as an expert by the LLVM project's owners
Hmm yes, having full access to the projects (direct commit access, access to private repositories, literally part of the teams, and whatnot) does not prove that I was accepted by the projects
okay, and how am i meant to know that from you saying you work on it and having a link in your bio
i could do that ffs
Have you tried checking my GitHub? Any of the teams I am a part of? All the projects I have worked on?
Done any research?
i don't agree with your arguments but i agree on what you're trying to say
You must provide a reason as to why you don't agree with my arguments
Why the fuck do you guys even care 
For my part he's saying he built Windows idgaf
i was referring to jake
Ahh
Hey, I have a problem, I don't know how to put the logo on the same level as the title
the first title?
can i see your html struct
<div class="container info">
<img src="/logo.png" alt="logo" class="logo" />
<h2 class="title">COMMAND PREFIX</h2>
<p>Prefix: <code>/</code> <i>(Uses Slash Commands)</i></p>
<p>
Examples: <code>/help</code>, <code>/characters</code>,
<code>/register</code>
</p>
<h2 class="title">COMMAND USAGE SYNTAX</h2>
<p><code>()</code> - optional parameter</p>
<p><code>[]</code> - required parameter</p>
<p><code>[option1 | option2]</code> - select one of these options</p>
</div>
i normally would group h2 and img into its own group and do the tomfoolery there
or you can try this
@desert verge
how can i create a voice channel invite in djs v14?
@quartz kindle LMAO YOUR NAME
Doesn't work
remove align-self
Okay
Nope because otherwise the margin-top doesn't work on h2
Oh I know I forgot to put flex-direction to row
Bruh
This gives this, but now I can't put the image at the very right
put flex-glow: 1 on the title to make it fill the space
you'll want min-width: 0 with that too so it doesn't overflow the container
no the image should be separate to the title, thats why its next to it
flex applies to the parent and first sub-children on it
so the img being inside the h2 makes it not apply to it
https://flexboxfroggy.com/ have a play with this
Like that
it will defo help
I'm using this
But I don't find what I'm seeking for
flex should be on .info
not on .title
<div class="info"> <-- parent
<h2>title</h2> < -- child
<img.... <-- child
</div>
oof
You broke it gg
ahh
it aplies to the entire section
Yes
so it should be like
<div class="info"> <-- parent
<h2>title</h2> < -- child
<img.... <-- child
</div>
<div class="info"> <-- parent
<h2>title</h2> < -- child
<img.... <-- child
</div>
<div class="info"> <-- parent
<h2>title</h2> < -- child
<img.... <-- child
</div>
where info is the container for each block of h2/img
use a diff class if not info
i didnt see that info was the whole page container
so add a .container and put flex on it, and wrap your h2 and img in it
* {
color: #ebd4cb;
font-family: sans-serif;
-webkit-user-drag: none;
user-select: none;
}
.info .title:first-of-type {
flex-grow: 1;
min-width: 0;
}
.info .logo {
width: 6%;
height: 6%;
}
body {
background: rgb(218, 159, 147);
background: linear-gradient(
100deg,
rgba(218, 159, 147, 1) 51%,
rgba(182, 70, 95, 1) 100%
);
margin: 0;
padding: 0;
min-width: 100%;
}
.list {
display: flex;
flex-direction: column;
}
.list .command .usage {
padding-bottom: 10px;
}
.list .command {
background-color: #890620;
margin: 5px;
border: 1px solid #ebd4cb;
border-radius: 5px;
padding-left: 5px;
padding-right: 5px;
}
.list .command .subtitle {
color: #b9bbbe;
line-height: 16px;
font-size: 12px;
letter-spacing: 0.5px;
}
.list .command .description {
padding-left: 5px;
opacity: 0.9;
}
.data {
display: flex;
flex-direction: row;
}
.data input {
border: 5px;
color: gray;
opacity: 0.9;
text-indent: 6px;
height: 30px;
width: 500px;
margin-left: auto;
}
.container {
margin-inline: 20%;
border-radius: 5px;
background-color: #890620;
text-align: left;
padding: 5px;
margin-bottom: 25px;
text-indent: 5px;
}
@media only screen and (max-width: 768px) {
.container {
margin-inline: 2%;
}
.data input {
width: 300px;
}
.data .results {
font-size: 0.8rem;
}
}
.title ~ .title,
.list .command .name ~ .list .command .name {
padding-top: 40px;
}
.title,
.list .command .name {
padding-bottom: 10px;
border-bottom: 1px solid #ebd4cb;
}
code {
user-select: text;
padding: 0.2rem 0.4rem;
font-size: 80%;
border-radius: 0.25rem;
background: #3b3d43;
opacity: 1;
word-break: break-all;
font-family: "Courier New", Courier, monospace;
}```
No, because this won't work:
.title ~ .title,
.list .command .name ~ .list .command .name {
padding-top: 40px;
}```
<div class="info">
<div class="container">
<h2>title 1</h2>
<img/>
</div>
.. continue your page as normal here
</div>
the divs you want to be on one line together should be the ONLY thing inside the display: flex parent
nothing else matters
apply border to the wrap-1
Okay
apply padding top to the wrap-1
lmao u just gotta add shit to where it needs to be
thats all
you might want to just add padding to the img in that case tho
yeah so thats happening because you're reusing a class that should really be separate
you should have a info and info-with-image or something
remove the border and padding from the h2 on info-with-image
and apply it to wrap-1
undo what you do inside of wrap-1 then
every .title
on wrap-1
this would have been another way to do it
which instead of placing it next to your h2, it places it on-top of it basically
but fixed positions like that are ehh
awesome
And added:
.info .title {
padding-top: 40px;
}
For the second h2 in the .info
Thank you!
np
@earnest phoenix ok i take that back, you're amazing 
voltrex is okay
that sounded rude

oh hey, amoled mode works again
@scenic kelp so I heard there was a svelte api type thing, does this just allow you to make an api that your frontend can interact with easily or am I mishearing?
hm?
there is a way to make api endpoints in sveltekit but i wouldn't use it to create any really complicated backend
I see
so just use an external api then
Im still trying to figure out how to apply a dark background to all pages 😔
I figured I would need to make a root +layout
wait can't I just use the @apply thing that tailwind has and just override the body/html background color in the global css
yea I don't get this dark mode shit whatever ima just make it dark mode permanently
why not just do a root layout yeah
how I tried to work with Svelte is by having a Base Component that has the head, scripts etc within it
then you could toggle a dark mode through that, including with stores
a root layout didn't seem to allow me to change the background color tho
why not
or have all your components inherit another component called "Themable", which would then have access to a global store including the current theme collection
subscribing to it, then having it change the theme accordingly
which would also allow you to specify how a certain component should behave when the theme changes
so for example, you dont want that specific component from white to dark, so you can just tell it to ignore a theme change
ez
time to ask chat gpt
I have access to copilot chat
It does help very often
but it hates navbars and bootstrap for whatever reason
so it just filters it

I've like, tried making a website that requires authentication, but the vibe of "exposing restricted sections within the source code while the user is not authenticated" makes me cring internally ngl

me when exposing restricted sections to an unauthorized user
You should do so
Honestly best website i've made yet
this feels like a cookie preferences modal is about to appear
everything I make
I hope my site ends up on that useless site generator thing that we used back in 2014
the useless web
is it just blurry?
blurring a solid colour background would be pretty useless wouldn't it?
One message removed from a suspended account.
I never said I Was good
I want to not match the number (ack. id) before the payload (json array)
I tried using negative lookahead and a nice star but it's acting lazy
(?<=^\d+\/[a-z]+,).*
42/general,2["sendChatMessage",{"message":"x"}]
I have regex to match the ack. id
the ack. id isn't in all strings
Wait I'm confused, what exactly are you trying to match here?
So anything after the 42/general,?
after the comma there can be a number of any length
CAN
and then the first character of a json object/array
the \[" is temp. btw
You basically just get the value of the first capture group
Remember that + and * are not the same in regex, + means 1 or more, * means 0 or more (meaning it's optional)
I know the difference
How can I do that in js?
const match = 'fo5m'.match(/fo\d+(\w)/);
console.log(match[1]); // 'm'
I'll take a look once I'm done with dinner 🫡
The values of the capture groups come after the first index in the match result of %String.prototype.match()%
regex in programming languages is always so fucking strange, they always add strange syntaxes
while the automata theorem is pretty doable
regex is regex in any lang
regex 🗣️ 💯 💩
What's the best way to not include a key-value in an object if it's falsy?
One message removed from a suspended account.
like
{
"value": null
}
would become
{
}```
js ofc
I always use undefined
Never knew null would also do that?
null means there can be a value, but it's absent
where's my toilet paper example
Haha thats well explained actually
yep, that's why I use it
But does it have the same behaviour as undefined for objects?
best way to remember the differences
you'll still need to remove the keys, in js that is
but I believe stringify skips undefined values
Yes but if you set a key as null it doesnt remove the key like undefined right?
nope, null is a valid value
Alr ty
yeah did i say that it isn't?
I wasn't talking about a language specific, read my message again.
I was talking about the way programming languages tend to incorporate the automata theorem.
Also i am unsure who taught me to use dvh and dvw, that person is a life saver. My website finally scales well on most of the devices
anyone uses knex?




