#development
1 messages · Page 1948 of 1
?
VPN != VPS
Vpn!=vps
LOL
man it'll be a giant mogus face if u really bought a vpn
oh
Woo makes FakE nervous
vps???
vps = virtual private server
as in, a remote pc that stays on 24/7
vpn = virtual private network
as in, "hide dem porns"

Oh no not this dude again
you need to wait in queue like everyone else
Ohhh Okk
wooo review verify my bot pls
NaThinG
wha
Even if the bot isn't in a server with it?
@spark flint hey can remove my nickname 🙂
Yeah^
even if i could i wouldn't
what is Hoisting
symbols at start of the name
Thx Dud
dud
yes
Sweet, ty
How would I do that?
client.users.cache.get('ID')?
but that would get a user who is in a server with it right?^
.fetch
noice
You need to fetch the user like Tim said
await client.users.fetch('id') iirc

Lol
someones gonna buy that and make a website that posts random quotes from top.gg
“Tim said:
someones gonna buy that and make a website that posts random quotes from top.gg
“
hmm which one should I get
yo if no one is taking this awesome idea, may I take this opportunity to create this website lmao.
i have no context topgg
very in context topgg stuff
Anyways; what should I change on the design of my bots frontpage? Any tips on designs, maybe any commands to add? I am running out of ideas sadly
How many times i can edit the message? (bot message) like 4-6 times in one min?
There's no concrete limit as Discord dynamically defines it.
Today it may be 5 per 5 seconds, tomorrow it may be 5 per 5 years.
You should pick a reasonable limit.
I'd suggest once every 2-3 seconds.
If you're only editing it a few times
else raising it.
add selectmenu to navigate between categories
or buttons as arrows for paginating
To avoid this, this time after how much time imma edit and how many times? I wanna do 12 times (60 sec it means it'll update at every 5 sec)
You should ask why you need to edit the same message 12 times in 60 seconds.
Of course, that means 1 edit per 5 seconds.
Which won't hit today's rate limit, but is still spammy to some.
Try to be reasonable with the limit you pick.
If you want more details, see #development message
in js i can't do more than 9 sec (sleep)
timsaidto.us
awesome is spelled awesome not awsome unless that’s by design 😛
pov you tell someone they spelled awesome wrong in their company name
lol
alrighty thank you.
Hahahaha no it is done on purpose
Meaning that I probably was high.
It looks dumb tho but I couldn’t find a better name lmao
https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=ban you should be able to pass a object with days being the period of time to remove messages within
0-7 days
Yeah but how do I detect if the message has a user ID
await client.users.fetch(message.content)?
You either filter the content using regex and/or check the message mentions
Timeout is a new feature
Disabling the member to interact with channels and the guild for the selected time
Without actually banning him
That’s basically what a mute and you can’t join channels role does
No
Read the description
One takes a timestamp UNTIL a timeout is valid, timeout just takes milliseconds
No they don’t
You can check if it’s a snowflake, return if it isn’t, then try to fetch it if it is
If fetching returns undefined then you know it’s not a user
A "snowflake"?
Yes
._.
This is generally what I do to check if it’s a snowflake ```ts
export function isSnowflake(value: string): boolean {
if (16 <= value.length && value.length <= 21) {
return !!parseInt(value);
}
return false;
}
(This is typescript btw, just take the types out if you’re using js)
Like I said today there’s a helper function checking if snowflake is valid
Probably discord.gg/djs
discord.gg/djs i think
Yup
Oh didn’t know that
But yeah if there’s a built in helper function use that
Or regex if you care enough
Yee I already saw it but can’t fucking remember it
What are the types I need to take out?
wow
But if there’s a djs helper function for checking snowflakes then use that instead
No reason to write your own method if djs provides one for you
lmao
It didn't do anything when I did this:
Wdym
function isSnowflake(value) {
if (16 <= value.length && value.length <= 21) {
return !!parseInt(value);
}
return false;
}```
Was it supposed to do something?
Are you calling the function? You have to call the function
Whaaat how
Wdym how
How do you call a fucntion o-o
isSnowflake(input)
That’s basic js
The function doesn’t magically do something without being called lol
I'm very confused on what's going on here
This is a whole another language.
Are you new to programming/JS in general?
Calling functions is a core fundamental concept to working with any js program, especially the discord api
That's confusing, its doing something outside of the function
What
return p1 * p2; // The function returns the product of p1 and p2
I replaced that with
return console.log
That doesn't help at all 🤣
I think deconstructing an invalid snowflake may return trash
^^
o-o
I was looking at that class and was going to recommend it but it seems like you need to learn some of the concepts of js first :p
Understanding how to make and use functions is essential to creating a working and organized program
I recommend you check out some stuff on functions online if you don’t understand them but you can continue without them
It’ll just help you a lot to understand them imo
lmao
thats really strange actually
the first line in the deconstruct method is BigInt(input) which should throw an error on non-numerical inputs
Is there a property for the client to check the version?
Discord.version
o-o
o-o
v13.3.1
Could be older than Nov, probably
ye
Ayo
I only get "Interaction Failed!" when executing slash commands
Temporarily hosting on repl.it
And when starting the bot from VSCode it works fine
Does anyone know how to fix that?
-.-
@Tim
Indeed a version issue
Pings don’t work when sharing images via iOS without being in the app
Not really needed tho
You get that error for global commands?
both global and guild
That indicates you don’t actually respond correctly if guild commands are affected as well
Mostly an issue if you register commands over and over again for example on any startup
But responding to them is another story
and that is fixed how?
cuz that might be correctos
Do you deal with them correctly in your interactionCreate wvent listener?
Yes there we go
Mostly an issue if you register commands over and over again for example on any startup
You register commands more than one time which can cause unexpected behavior
Which is also not correct
i do?
Yeah the part with dealing with it, even if it’s very simplified is okay
But that’s not the code which registers the commands
Yeah a straight copy of the useless guide which registers the commands any time you call that code, assuming on any startup
Commands need to be registered once only
nah, i only do it when adding new commands or options
That code doesn’t register global commands, just guild commands
ik, but ive tried global commands as well
Then delete all existing commands and register them once again
and that is done how?
<guild>.commands.set([]);
For your guild
client.application.commands.set([]);
For the global ones
in index.js or deploy.js?
ait
Start with your guild commands before deleting the global ones
Make sure to actually use the correct guild object
huh?
but its only in one guild
tru
client.guilds.cache.get(…).commands.set([]);
Sure creating a var does also work
Give me an E!
Give me an R!
Give me an R!
Give me an O!
Erro!
TypeError: Cannot read properties of undefined (reading 'set')
Wut
you forgot the r
do client.application.commands.set([], guildID);
though are you using discord.js v13
no buts

i did install it like 2 minutes ago
and that's no fun
there we go
It's not exactly development but I hope I can ask this question tho.
I'm searching for 3 main questions to describe a company. I'm looking for the last one, I've got these yet:
- Why did I start xy?
- What are the future plans for xy?
- ???
just a placeholder for the name xD xy = whatever you can imagine
ik that
What do we offer? (that our competitors don't)
good one, I'll keep that in mind
Why did I start RandomCorp? 'Cause the others suck at handling notifications.
- What is xy?
- What do we offer?
- ??
That's a bit like What do we offer? Like Klay said "(that our competitors don't)"
- Why did we/I start xy?
hello i want a host for glitch
I guess... I would recommand and use myself https://repl.it
and with uptimerobot you can make an https request every 5min an it keeps running
it's not perfect but it does the job
yup
i use glitch repl railway render in the same time🥲
and i need a host for glitch if someone have
i dont want to pay for get hacker plan account
yes, why pay?
but the code well be public
but tbh if you want to do something professional you should buy something like a VPS or so
if you have important data like password you can put them in env variables
^^
but my project is website
i want to make my code privet
what about GitHub pages?
js ,css,ejs
I guess you can make your privat then
Express.js or/and react?
if i could self promo i would
for github you need to makr it public like repl
@harsh nova do i have permission to tell them about my ||removed so no promo||
as its relevant to the convo
and not just sudden promo in general 
I would personally not allow it, sorry
you can check with another mod though but I'd assume they would say the same thing
please do 
its fine
dw
yes
Use Vercel
vercel is nice
vercle have own host free?
yeah
yup
netfily is good but i need a good host becouse i have dashboard in my bot code
vercel, netlify, heroku, hostinger, repl.it etc. they are all "okay" but not everyone keeps your code private
but vercel is very nice tbh
they suck ass
🥲
000webhosting is meh
i now
just buy a raspberry pi 4 xD (they are actually quite good)
how if i create a cloud service for my own bot😂
free
ah
i was gonna suggest a cheap vps
like £1.50 a month ($2)
you could host bot and site at once
i want it
I would also suggest that... it's horrible to have like 3 services for all the stuff.
ok
send the link please\
I guess it's yours isn't it? 
nah
or don't you use your own hosting?
i found them on serverhunter.com
aight
bots = advinservers
sites = brixly hosting (NOT MINE)
thats the VPS one
the only reason i've stuck with brixly for almost a year is because of their amazing support
I have a VPS at Contabo and the price is actually awesome compared to others... :)
thank you
worlds oldest dashboard and slow support
slow support?
they've responded to every one of our messages within 30 minutes lol
the dashboard etc. at contabo isn't great but it's fast and very good price for the performance
odd
brixly (webhosting) is a bit pricey compared to other companies but you can't really beat 5 minute support times
how about buying 3 raspberry pi's and building my own cluster to host all my stuff 
lol
or arduinos lol
i was originally gonna buy a server and host it all in my room but never did
i mean for the price of advin servers I can get:```
1 vCore
2 GB RAM
20 GB SSD (RAID10)
40 TB Traffic
Remote-console etc.
i prefer a VPS
lets try😂
for just .50 extra
what do you pay at contabo
actually a pretty nice idea
we use a diffrent provider for our streaming nodes because bandwidth requirement is too high
i well do it but soon
but contabo give me about a %30 discount to their normal prices on VPS'
which is nice
why? 👀
xD
Used them alot
oh nice
what does that mean? xD
Hetzner is also a very reliable option nowadays
got partner because you bought for 100k or what? xD
With top performance
i mean well over 6 figures a year
oh christ
damn xD
for networking though https://www.netcup.eu/vserver/vps.php is probably top
I pay like 120€ in a year for my VPS and host everything on it. love it
because big daddy company that powers their network is just insane
2.5gbps avg speed
thats who i have my personal machine with
cuz great specs for price with good network
👀
one time ill pay 26$ for a vps and i forget the password😂
Bullshit
i pay £96 a year atm for my bot vps (8gb one), £18 a year for my image host vps (wouldn't work with regular hosting), £18 a year for my spare vps i use for @gaunt kelp atm
aight. How did you become hackathon champion?
then £120 a year in webhosting (personal and project hosting), £96 for extra reseller hosting
honestly, no as bad as my ultimate derp moment. which was brought a new dedi, set it all up, last thing i did was enable firewall and block all incoming connections
without enabling port 22
how
won the winter hackathon scroll in #announcements
which just meant all the days work of setup just went out the window 
how i can buy it?
xDD
and you're also probably opening yourself up to a bit of liability
😅
lmao
on the plus side i got to upgrade the OS while re-insalling
Order a KVM console for free at Hetzner and fix the issue within minutes
what i need to create a server?
hardware
But don’t worry that shit happened to me too
If you rush things that shit can happen
just hardware?
and a bit of software ig
well, hardware, the knowledge, connection, and proper software
And a bit of experience
good
xDD
yes
As long as cables don’t stop the airflow which is important in a server, nobody cares about that
Hmm I should send you a few picture then
To see what happens
revives the dead
Don’t forget the cable mods also to make each cable have the same color then 
nah just give them random colors and make a rainbow
Omg

IoT Thread mesh is the future
A future that nobody needs or wants
Just close your eyes 
my bot has permission to delete this channel, but it doesn't have permission to update the permission_overwrites with a patch. is that because one of the permissions it's adding is for the server owner?
Yes
Can anybody help me? How would I make it to whenever the bot fails to kill a message it returns without it crashing?
deleting messages
try...catch
Well you have catch your code errors properly
In order to prevent node from exiting the process - not crashing
So catch your process errors in the first place and additionally catch each promise
When fetching a member, is it possible to check if the member the bot's fetching exists or not? I have this:
let memberGet = await message.guild.members.fetch(someUserID) .then(async (user) => {
// do something with user
});
However I get this error:
/home/container/node_modules/discord.js/src/rest/RequestHandler.js:298
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Unknown Member
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
at async GuildMemberManager._fetchSingle (/home/container/node_modules/discord.js/src/managers/GuildMemberManager.js:388:18)
at async Client.<anonymous> (/home/container/index.js:3498:32) {
method: 'get',
path: '/guilds/guildid/members/memberid',
code: 10007,
httpStatus: 404,
requestData: { json: undefined, files: [] }
}
Line 3498 is the let memberGet line.
you need to catch it
let member = await ...members.fetch(id).catch(() => null);
if(!member) { /* do something */ }
If createdAt actually is a property not a method than yes
Not that I know any property or method without checking the docs, too
I understand how things work and where to look at
Tim is walking lexicon/documentation knowing anything
Yeah createdAt is an user property
What does the last one mean?
cute?

Whatever
Don't even ask
hey i have an active mongodb server running, can i add a new data class to it without any issues or do i have to create a new db an migrate the old data?
ew js
i never really used js, neither did i ever use the new discord features / buttons etc
sorry cant help
but maybe you know this :x
Do you mean a schema? You can add as many schema's and alter them how you want. Just remember any data added to it will be in the shape of the schema that you define.
You haven't given us enough to know how you run your execute function, etc so for all I know with what you've given us is that you're not calling the execute function.
Is there a way to save cooldown even shut down in discord.py?
As in persist cooldowns after restarts?
If so, no. You'll need to persist it yourself (e.g. a database).
Try again, that just means that you've just updated the command
.
const output = mm.array().reverse().map(m => `${new Date(m.createdAt).toLocaleString('en-US')} - ${mm.user.tag}: ${m.attachments.size > 0 ? m.attachments.first().proxyURL : m.content}`).join('\n');```
what's mm
mm.array() doesn't exist
that's not a thing
if you have an array of messages, just use the array directly
but you can't just make up methods and expect it to work lol
Well yeah
How would I get all the messages then?
I reverted it back to the normal
interaction.channel.messages.fetch().then(async (messages) => {
const output = messages.array().reverse().map(m => `${new Date(m.createdAt).toLocaleString('en-US')} - ${m.user.tag}: ${m.attachments.size > 0 ? m.attachments.first().proxyURL : m.content}`).join('\n');```
messages
Still confused on how to get all the messages o-o
channel.messages.fetch({ limit: 10 })
.then(messages => console.log(`Received ${messages.size} messages`))
.catch(console.error);
``` something similar to that
.then(async (messages) => {
const output = messages.map(msg => `${msg.author.tag}: ${msg.content}`).join('\n');```
So this get's the plain messages, how can I get it to fetch the content from the embeds?
That's what it comes out as, there isn't embed text or anything. o-o
I tried something like
const output = messages.map(msg => `${msg.author.tag} : ${msg.content}`).messages.embeds.forEach((embed) => {embed.embeds[0].description}).join('\n');
``` but it didn't work.
TypeError: Cannot read properties of undefined (reading 'embeds')```
you're mapping messages to an array of strings, which doesn't have a property called messages
why are you even mapping them?
just skip the mapping process unless you actually have a use for it
me when I actually remember what my code does:
message.embeds is an array
Containing the raw embed object
Looping through it and calling embed.embeds[0] doesn’t exist
There’s no array in the array
for(const embed of message.embeds) console.log(embed.description);
See the magic 
You may wanna check if description isn’t null as well
dw, none of them are null lol
Well yeah, can’t know that one
Do you think this package is useless or reliable for npm?
Package:
- you can create node worker and is event based(for sending data,emitting custom events)
- heartbeat system for auto respawning dead worker or unresponsive worker
Usage:
Parent index.js
const { Manager } = require('./workerjs/index');
const manager = new Manager();
//dynamically add workers
for (let i = 0; i < 2; i++) {
manager.addWorker(i.toString(), './worker.js');
}
//event from parent to child
setTimeout(() => {
manager.emitChild('testSpeed', {date: Date.now()});
}, 5000);
//listen to all events from child
manager.events.on('heartBeat', (data,id) => {
console.log(data,id);
})
manager.events.on('ready',(data,id)=>{
console.log(data,id);
})
Child(worker) - worker.js
const {Child} = require('./workerjs');
const child = new Child();
//event from parent
//test time took from parent to child
child.on('testSpeed', (data) => {
console.log(`Took ${Date.now() - data.date} ms`, child.id);
})
//emit when everything on child is ready
child.emitParent('ready', {ready: Date.now()});
//send heartbeat
setInterval(() => {
child.emitParent('heartBeat', {beat: Date.now()});
}, 2000);
Out:
{ ready: 1640718191399 } 0
{ ready: 1640718191400 } 1
{ beat: 1640718193400 } 1
{ beat: 1640718195402 } 0
Took 1 ms 0
Took 1 ms 1
Useless packages get more downloads than useful ones
but dblapi.js is deprecated
whitenames be like
just use node-fetch 

why does this person keep deleting his messages
cus i use the wrong channel bled
i tried to add my bot to a server to check the new channel creation module
what is this lmao
the bot is verified tho
huh wtf do i have to verify it again?
Well contact discord then as nobody in here can help you
switch(choice) {
case "gay" : {
let avatar = interaction.user.displayAvatarURL({ dynamic: false, format: 'png' });
// Make the image
let img = await new DIG.Gay().getImage(avatar)
// Add the image as an attachement
let attach = new MessageAttachment(img, "gay.png")
interaction.followUp({attachment: [attach]}).then(() => {
console.log();
}).catch((err) => {
errorEmbed.setDescription(`An error has occurred\n\`${err}\`\nIf you think that this was a mistake, please join our Support Server!`)
return interaction.followUp({embeds: [errorEmbed], ephemeral: false});
});
}
break;
what
- attachment
+ attachments
oki.
Wait, you guys put comments in your code?????
i dont
Just makes sense if you work as team on the same code
If you don’t know what you code and have to explain it to yourself something might be wrong 
or if you are a solo developer who writes docs
Stop change your name every fucking day, my gosh
brainfuck
fine ill change it to FakE
loading the shotgun
I am using pkg to 'y know, and I'm stringifying fs.readFileSync. on that line where i stringify, the app crashes. Can someone help or do I have to reach out to pkg?
I'm seeing -c as command line parameter, would that help?
I'll try { the line and log the error
Ping me if you replied
i have no idea what you're talking about, you'll need to show the relevant code
So this is why we have comments
lol
yeh my message was broken
pkg makes its own container with the files you require() in the javascript file
completely fucked
oh no.. my message... its broken
oh
it basically makes your js file a virus.exe


2+ weeks
Yeah it's pinned #support message
Thanks 🙂
hey does anyone know how to install pyaudio
i did brew install portaudio
and brew link portaudio
but i get the same error
im on mac btw
12.0.1
Well displaying the error would be more helpful
That way people who can help can help better
you need to download the direct wheels
whats that
PyAudio's standard installs are basically permanently broken since it's basically a dead lib
errr let me find the link to the wheels
ok thx
select the wheel which matches your python version
then install it via pip install ./path/to/wheel
i have python 3 tho
yes
?
3.x wheels are provided if you look
you're probably looking at the pyaudio version
cp stands for cpython which is the standard python interpreter that basically everyone has
ok next question lol
39 is just the major and minor version 39 -> 3.9
how do i find the path
just download the file and drag it into your project is probably the easiest
ok
python moment

im a competitor coder
but like im completely lost in the world of libraries
PyAudio has always been a bit of a nightmare to install since it's not really maintained anymore
ya sorta dont lol
ultimately people still use it because it's just a lightweight wrapper around a lib that is maintained (c++) so it's just requiring someone to build the wheels
https://www.lfd.uci.edu/~gohlke/pythonlibs btw this site is your friend for other C libs like that
ok what do i do after the download
pip install ./path/to/wheel
just copy paste that?
idk where it is tho
well, obviously change the path to point to the wheel you just downloaded
probably in your downloads file
your browser should give you the option to view in folder
how would i write that
litterally easier just to view the downloaded file via the browser
then copy paste the wheel into your project
i am confuzzled
its in my downloads
how do i write that
yes
rigfht
just drag the file
from your downloads
to where ever you have your code
then in a terminal opened in what ever folder you have your code
run the pip instal ./some-wheel.whl
idk
im on mac
well that would explain why you can install that wheel
yeah he downloaded a windows wheel
unfortunately PyAudio on mac seems to be very rare
rip
there is probably a very good chance that you're not gonna be able to install PyAudio without compiling it youself
and you'll also probably need to use Python 3.7 or 3.8 for a less painful experience of compiling
mines 3.9
Okay well, for an added bonus you downloaded the 3.9 wheel
not that it matters because it was a win wheel not a max wheel but
const { main_obj } = await somefunction();
const { prop1, prop2 } = main_obj;
any way i can do that in a single line? 0o
I mean, if you for some reason assume the function will ALWAYS return prop1 and prop2 you could do...
const { prop1, prop2 } = (await someFunction()).main_obj;```
yea, i was thinking of wrapping it with the parenthesis, but idk, i was trying to be clever and somehow get some destructure-ception going on 😄
const { main_obj: { prop1, prop2 } } = await somefunction();
oh now thats it! ❤️
moment
i knew it could be done, but i couldnt remember the syntax for doing so 😄
I have some crazy nested destructoring for an axios call because of data layers lol
( { { { { } } } } )
ewww, axios
Ew? Stay mad.
ewww, http
This dude uses carrier pigeons.
use phin instead of axios kthxbai
and if you're doing discord stuff use detritus-client-rest
I don't think I use axios for anything currently.
Move on Erwin
Just usually my go to lib for most http things.
legends use XMLHttpRequest
lol
caveman
use XMLHttpRequest in your code while editing with Notepad++ on your Windows 7 machine
👍
I'm not a caveman cuz I do none of that shit
except the last-
why do i have this as your note
because, who else will you ping for canvas help
perhaps tim
canvas stuff is fairly easy imo, but im used to canvas and bitmap manipulations
whats hard is deciding what components to use in your canvas' to make em pretty 😢
Yeah, canvas also has SO many online examples
just a bit of googling if you are unsure on how to do pretty much anything you'll find an answer.
yea for sure
I was making program to separate a gifs frames into a grid of images.
found an example online in two seconds 
ctrl c ctrl v
i was wanting to make a 'raytraced like' lighting system for my web game, took me a few mintues to find pure js lighting system 😄
imagine making a website that crashes your browser if you run those commands
i made a cheat system for rpg maker, that had a cheat that would launch 999 notepads on the persons pc telling them 'cheating is bad, m'kay?'
and you had to close each notepad before the next would open

I wonder just how many bots are going to break in May
We will notice the amount of requests in here saying "my bot isn’t working anymore, yesterday it was still working"
just look at how many people come when an old version of discord.js stops working
It’s already sad to see the amount of people copy & pasting the djs guide of slash commands and wonder why they don’t work as supposed when they register their shit every 5 mins
Just because nobody carefully reads the guide
I think it's fine
they're beginners so they're starting somewhere
what they pick however is complex
so they end up doing that
but it's fun to write discord bots—it's why they got interested in programming anyway
the guide is sooo good at explaining stuff, actually insane people dont actually read it
Just copying something and putting somewhere because you don’t bother reading is the same as your bot breaks because you don’t update shit or deal with new shit
You could easily inform yourself and read guides or docs but that’s what actually like nobody does
I mean the code some dudes copy & paste the last days which was obviously to register guild commands and they were wondering why there’s no global commands being registered
Not even reading and jumping to the right category is a thing
Before copying stuff
People always making their own life way more complicated than needed
it's because they don't know
when you pick something as complex as a discord bot as your first project
especially as your only experience
well, a lot of the devs I see having this issue are updating from old djs versions.
making mistakes like not reading guides and copying & pasting is expected at this point
of course, we encourage they go back and learn the basics so they have a better grasp
but I can say with high certainty that most people in this server learned this way and made similar mistakes
and this is not unique to beginners to programmers
it's unique to beginners to any subject in CS imo—UI design, servers, embedded devices, memory management, etc.
missing these little details because you don't know them yet
complaining about lisp having too many parentheses
When I copy paste code, I often spend more time later on debugging that code since I don’t know how it works until I’ve looked at it thoroughly
Which is why I don’t copy paste code anymore!
Even just typing it out will help you understand it a lot more
Chakra-ui issue:
Text: {
variants: {
"link": commonLinkStyles
}
},
Link: {
baseStyles: commonLinkStyles
}
For some reason the baseStyles for the Link component don't get applied.
<ChakraLink href={props.href} isExternal>{props.children}</ChakraLink>
Any guesses on why this wouldn't work? The styles work for the "link" variant of the Text component
It's beseStyle and not baseStyles 😭
Skill issue
Did they misspell base
nah I did
looks good
stairway to hell
I prefer hadouken code
I thought literally coding while you are on the stairs
i remember the name but dont remember the code, refresh my ram pls
I like waterfalls
}
}
}
}
}
xD
ah yes
love it
btw the stairway code above improved my code's performance by almost 50%
compared to using Math.ceil() and Math.log2() to calculate a number's byte size
lmao
lmao
dead channel
I love oop so much
test
damn discord has some hot takes on oop I guess
lmao
discord seems to be sending messages rather slowly
their servers are getting shit on rn for some reason ig
Next.js + MDX is a combination from HELL
Using these two together is a massive headache
both today and yesterday
spike in api response time
their api is always spiking
what's next.js good for
Nextjs is just a react framework
I think it is well known for being easier to do SSR
Hi
discord sure is dying
time to stop doing reviews? 👀

start*
this fucking chakra ui sux man
is chakra like bootstrap or headless ui
anyone help me :<
<Flex flexDir={"row"} justifyContent={"right"}
alignItems={"center"}>
<Link marginRight="auto">
<Image src="https://cutiecat6778.github.io/cdn/blog-logo.png" />
</Link>
<Menu>
<MenuButton as={Text}>
Topic
</MenuButton>
<MenuList maxW={"200px"} borderRadius={0} padding="0">
<MenuItem>
Life in europe
</MenuItem>
<MenuItem>
Daily
</MenuItem>
<MenuItem>
Programming
</MenuItem>
</MenuList>
</Menu>
<Link ml="40px">
Random
</Link>
<Link ml="40px">
Về tôi
</Link>
</Flex>
it is a react framework
yes but which one
wdym which one
you use bootstrap with react
it is like extended react
and same with headless ui
so it's like bootstrap
Getting "Cannot find module 'node:events'" on Node Version 17.3.0
Any solutions?
it has many presetup components
npm i node:events i guess
haha, no.
yeah... you should google it
I've not used the two, but I hear in general that component-based UI frameworks tend to not be flexible
maybe you'll be interested in something like tailwind
where you can apply css classes the utility provides without writing css
well I don't really need a external .css file
cause you see in those component it support css values
btw top.gg use chakra too
oh that's why it looks awful
lol
btw anyone help me :<
I've only ever used Tailwind, but I suggest you try it out some time in the future.
I will try one day
:))
more u know, more money
All I see is this
Ah
it is bad for responsive ui, but :/
how i can run this project? its php api client
check if the readme or wiki contains instructions
do u guys know any js obfuscator that keeps the text minimal aka not too many characters
why bother obfuscating
You sure you want an obfuscator? How about a minimizer?
i kinda want both
short js code + obfuscated
jsfuck
BRU
:^)
yes thank you that will do the job 
no but fr i am trying to work on a bookmarklet on edge
but they seem to have a limit
not sure if it is the character count or the file size
depends on the browser, but its usually about 2k chars
anyone here understand anything about Error Handling?
yeah that's the thing
hm?
yes but i need obfuscation in this case
how about an obscurer then applying that to a minimizer
tried
yeah it sucks
especially throwing logic
i made one but i have a little error that i cant solve, soo....
The bot starts and everything ok, it shows the errors on the console without the bot crashing but no command works. Can you explain to me?
.
why not
i mean share you code and the full error
anyway I'd consider something like google closure
i think it does both along with some magic tricks
what even is that
why does google have so many frontend frameworks
you can think of it like webpack
angular, closure, flutter
I use esbuild tho
How long does it take to verify intents?
you should check it out https://github.com/google/closure-compiler
ok
Btw cutie please fix your npm package. I found some issues that I will dm ya soon.
Idgaf you just gotta fix that shit lmao
Or send me the source code if you don’t have time whahahahs
is it not on github
not sure.
is there a way i could possibly call another javascript file hosted somewhere else from a js file
Just know that code913 is a cutie that made it

dynamic import();
only if you create an app server where you can transmit info to
vanilla js
huh
no apps
Nvm
but it’s hosted somewhere else right? A different folder and storage I would say? Then it’s not possible unless you use a universal database to save the information from the js file that you can pull in the other js
But yo I ain’t an expert 🤓🤓🤓
yeah he does. It’s one of those randomizer packages between strange functions. It’s still pretty cool tho.
I used to use it for my bot but idk it seems to be having lots of errors
let command = client.commands.get(cmd) || client.commands.get(client.aliases.get(cmd))
if(!command) return
@earnest phoenix completely unnecessary
also
#rules-and-info #8
what? i'm just trying to help him, anyway nevermind
saying your code 'completely sucks' is not helpful its harmful
telling someone their code completely sucks doesnt help yeah
I've been copying people a lot the past few days 
kekw
Is there way of getting the user who has authorized your bot to join a guild?
Is there way of getting the user who has authorized your bot to join a guild?
Is there way of getting the user who has authorized your bot to join a guild?
afaik no
You can check the audit logs if you have permission.
Hmm sad
If a guild matches my filters the bot tries to contact the owner .
But as the DM got send successfully but the bot being reinvited a few more times, it probably means the owner isn’t always the one authorizing the bot
Might be worth to think about sending a message in the server
But I’m somehow not a fan of sending a message in a random channel by looping them and try to send it somewhere
What about the first member with bot invite perm to use a command.
I would bet over 90% of the time the first staff to use the bot is the one to invite it.
Nah if the guild matches the filter the bot leaves the guild immediately
I think the only way to get them to join the guild would be to prompt them on invite to do so
You can redirect to a guild invite link
Though in the end its up to them whether they join or not
Hmm also an idea
But regarding user friendliness I will probably just send a note in a random channel why the bot left the guild additionally to contacting the owner
Is there actually a default channel or something similar I can check before checking other channels?
Not to mention annoying for others as well if it sends in a channel it might have perms in but shouldn't send in
such as a rules channel or smth
Hmm that’s why I said before I don’t like that idea, too
Best bet is to just contact the owner of that guild plain and simple
Well yeah probably
how i can check if string includes in json or not
Like what do you mean
I think they are asking how to check if a value exists in a json thing too tired to use proper terms
specifically a stringed value ig?
Doesn't js treat json sort of like objects
I'm getting a error that too many files are open when running a instance for a while. But the error does not matter.
How do I close files after reading them with FS.





