#development
1 messages · Page 1962 of 1
this is just copy pasta code I had going from v12 -> v13 so Ik for a fact it worked b4
so it's something with v13 and fields
Oh the options of your send() method are fine
mhm
But I don’t know about the helper methods like addField etc
I may understand why thinking about it
try {
if(args.length === 0) {
let errorReply = await message.reply("You need to specify an anime!")
setTimeout(() => errorReply.delete(), 10000)
} else {
let loadingMessage = await message.reply("Loading...")
let animeSearch = args.join(" ")
await mal.search('anime', animeSearch)
.then(info => anime.animeResult = info.results)
.catch(err => console.log(err));
loadingMessage.delete()
}
Why do you even use them?
I do this b4 the embed right
You’re close to creating the embed object yourself anyways?
But the embed is after the else{} so I think it tries to create it before the api can fully do the push to my array
embed.fields =
[
{ name: …, value: …. },
…
]
Is your field structure already
It’s just an array storing the field objects in it

Not necessarily, just to say
I could do it your not wrong. Main focus is just some of my main stuff working for now from the transition

Yeah unfortunately can’t figure that huge chunk of code out on mobile
well I suppose
JSON is very picky.
Still lame but it worked regardless.
Kinda dumb that Title, Description, and image works no issues without String()
This floor
Oh yeah I forgot about that
I had that issue too, the type is strict, means it must be a string
I remember… 
v13 does enforce that
good
As it doesn’t convert your value anymore to something it should be
implicit conversion can be bad at times.
Especially for those who don't understand it or when it happens.
Yeah all the work for the lib dev to cover each type an user can pass if you don’t enforce a strict type
I mean a key lock which is supposed to be opened by a key also doesn’t expect to be opened by a candle

fuck that quote is awesome, gonna write that down somewhere
What is the performance impact of using custom prefixes where prefix data is stored on a mongodb database.
Well it literally has no no effect as you need to get your prefixes from the database and cache them when initiating your client.
One database request each time somebody executes a command to check if that prefix actually exists would be nonsense and quickly result in total chaos.
You gotta create a map/object with your guild IDs and their prefixes which you check if a command is executed or simply attach the prefix to the already cached guild object
But before thinking about custom prefix, think about to switch to slash commands (interactions).
Without mentioning the bot you won’t have access to the message content anymore, soon
(if you don’t have the privileged intent)
What would happen to my bot if I didn't apply for the message content privilege intent but I switched everything to slash commands?
Nothing?
Why would you still need the message content anymore after switching to interactions?
If you don’t switch and get the intent your common commands will not work anymore
As the message content received in event will always be null
Except somebody is mentioning your bot
What are some good example uses of message content?
My m8 used the stupidest reason and got accepted, so..
What are some good uses to it, I know anti-link system is good (something I'm developing)
That depends on what your bot does
Discord isn’t dump, they know anything about what your bot sends to the API
Getting the message content by lying will most likely end up in a report and you or your app being banned from the dev portal
So… if you don’t need it because the transition to slash commands is possible, then move to slash commands
or use your bots mention as prefix
(actually it doesn’t matter when you mention it in the content, could also be at the end)
Does this need the message content?
I think it's too early, right now. I have 2 more months to develop the commands I need.
No, mentioning your bot will send the message content with the event
As well as attachments, reactions and whatever it was
You can still listen to the message_create event but the content, attachments, reactions etc. will be null without the intent or somebody mentioning your bot in the message
Ok, so i am new to all this, but i just wanna know how my bot will be effected.. Currently my bot is based on commands and there is only one feature that actually requires to read the content from message object. So what will not work, if i choose to not apply for message intents, the later feature or what exactly?
Oh, this will be pain, then. I'll need the event, then.
I mean just read what I wrote above.
That fits for you, too.
You probably mean the intent, not event
If so you gotta provide a solid reason why
Yeah, putting a reason, I can write a newspaper, no problem with that.
That’s up to you
I heard people being denied will not get another chance if discord thinks your reason isn’t valid
I mean, not much of my commands need it, but my future features, does.
When does the message content apply, exactly.
April 30th I think
Broo.. I have a lot of time. 😂
Discord isn’t really fast when it comes to checking for privileged intents
Anyways it’s up to…
If you really need the message content, then apply for it if not, you will see what Discord will respond
hm
Yes for example by configuring the channel permissions to remove the users ability to execute application commands.
Or by handling this inside your slash command handler, sending an user an ephemeral message for example, telling him he can’t use that command in that channel.
Just React + Chakra.UI give me a 300kb bundle size 😭
What’s a good image generation tool for node.js? So I can like change text and stuff like that depending on data
canvas?
You tried Preact? Been working pretty well for me where I need to care about loadtime
Thanks
as a note, replit has some issues with it
Not sure how well Chakra.uI gets tree-shaken and be server side rendered tho 🤷♂️
Isn’t preact like 12kB iirc?
but canvas is pretty much the go-to
3kB last time I used it
Oh they decreased it even more
Kinda surprised how easy the switch was. API is pretty much 1:1 (https://preactjs.com/guide/v10/differences-to-react)
Ooh yeah I could switch to preact
I just pretty much care about packaging ngl. I never like setting up a bundle. So as long as I don’t need to do that for long times. Will I always try to optimize loading times
Using ChakraUI on the server side adds around 140KB
Humm... not great
And all I'm using is ChakraProvider
But to be fair, Chakra is pretty slick. So benefit VS cost
If I remember correctly ChakraProvider gives a massive spike in size, but components you add in code won't make it much larger after the original import cost
Tbh I am not really sure If I even need ChakraProvider on the client-side, since I'm using SSR 🤔
Hi!
or well, at least the ChakraProvider
they still force ship the large version of framer motion which really adds a lot
Unless i want to port forward my ip i have to get a vps right?
nevermind, it works fine..
it crashed because voice channel doesn't have .send
because channel is undefined
Read the documentation.
i just posted similar issue
example
its pretty bad but it works ;d just a quick fix
thats what this does
oh also, add let done = false; above the loop
Is there a way to bump server
From channel?
I have the bot I swear I read everywhere lol
Okay thank you
Have you read the docs?
Websockets are for ping. If i want to recive a post command i need a webhook
yes
not sure if its allowed tho, should be
What way?
post request?
You mean you making a post request to the vote buttons url?
are we talking about server bump?
Yeah
thi
oh vote
Webhooks are allowed
doesnt mean you cant do it tho
Well you shouldn’t
Yeah
@woeful pike are there checks to ensure votes come from the site and not just from someone sending a post request?
im pretty sure you can vote with some work put in
yeah you can always get around restrictions with work put in
it's impossible to prevent "a post request"
but you can make it as painful as possible to figure out how which is where we're headed

if you can figure out how to send a valid vote with a post request I'll pay you $5 

what do you mean by signatures?
I see some high profile websites using it as well as some payment gateways
so basically the website holds a secret private key
and creates a signature from the request content and timestamp
the client can then verify the request content was actually sent by the website and not someone else via their public key by comparing the signature and body content
actually discord has that too for http interactions
I believe most APIs do that so you can verify it from your end
If i make it, i expect 2 million worth of NFTs
Non Fungible screenshoT
You think it’s funny to take screenshots of people’s NFTs, huh? You must be a very immature person to steal someone’s property that they PAID for. Yeah, I said it. You’re the kind of person who thinks that property theft (a seriously illegal offence) is a joke. I don’t even know why you took that screenshot, because you didn’t pay 1000 dollars for it. I did. The blockchain doesn’t lie. Even if you try to save it, it’s my property. You’re just angry that you couldn’t afford this priceless masterpiece. Even if you could, your fingers couldn’t even click fast enough to get one of the 10000 NFTs sold. You’re just mad you don’t own what I own.
I'm pretty sure this is the vote endpoint, the payload the site sends to it is in binary so you can't make much of it and also it could be encoded in some way. CBA to investigate further. Even if you managed to send a vote programmatically, you'd still most likely need some authorization token that is stored in (most likely) a cookie, which prevents you from voting on behalf of other people, unless you make them give it to you, which would be a security concern.
Everything I said above is a speculation and may be untrue.
👎 nfts suck
👍 the stuff that people usually buy as nfts sucks
emulates an entire browser
literally
unless they use hcaptcha
puppeteer enters the chat
or recaptcha cuz p r i v a c y
that's the idea
as always, h captcha broken
"bruh just run puppeteer" is a huge bump for how much resources you need to abuse over requests
or send specially crafted http requests with the csrf token
that's not enough anymore
but it still does the job
paid 5$ for 5 votes and one melted cpu :)
if you run a business selling fake votes to users, going from 100k requests to 100k browser windows is a gigantic hurdle
yet we all know how cringe videos on every facebook owned website get 100k likes
goal was to just bypass manual vote right?
ayo dr. fone just installed
time to hack my own phone
Best you could do with puppeteer is set up an auto voter which votes for your bot every 12 hours so you don't have to do it yourself
bare puppeteer doesn't work anymore either
well, kind of. If you have something add me as friend and show me 
why dm when you can send here :)
hah
yes, give everyone the exploit
well there are ways where you can still do it but it's intentional 
what do i get if i successfully find a vulnerability in top.geegee and report it like a responsible human being
paid
paid what
why send here when you can keep it to yourself and make a ton of cash
free nfts?
depending on the severity, an actual bug bounty
as long as you're disclosing responsibly
there are people who do this for a living
who would do such a thing
if you're good at web security it's a good way to make extra cash actually
so like:
#support
wendy we have a problem wendy we have a problem wendy we have a problem
@woeful pike @woeful pike @woeful pike @woeful pike @woeful pike @woeful pike
i haxed topgg
epic
people who hack stuff and don't use it for bad shit are called white-hat hackers
their whatsapp group chat nickname is free fire skin tool user ping for hacks
it was a joke but ok
the only person in this universe who didn't call me a hacker was my 8 year old cousin who knows the difference between a programmer and a hacker
doesn't jwt exist for it? to only sign/register request from a valid client
some guy got paid 10k for fixing a bug in gta online
some guy didn't get paid for fixing a bug in apple's webkit
every 60 seconds in africa, i hate apple
chrome ended up paying the dude even tho webkit has nothing to do with chrome except ios
im a dev too nice
i'm disappointed in you
@rustic nova unmentionable username
ty
gm pls
how u doin
Lol
accept google as your saviour and win a FREE PS4
how much did the guy who discovered log4shell get paid?
idk
ask alibaba cloud team
probably nothing
because communist china?
idk
he got paid in "you should be happy you get to contribute towards our nation"
Damn… my expectations got blown up
6 months ago I decided to buy 96GB of RAM as 12 8GB modules
Now 96GB are used to >90% and I retard can fucking invest into 16GB modules and need to sell the 8GB ones
Why didn’t I just buy 6 16GB ones lmao
I mean, at this point why report issues to Apple/Android when these 3rd party "security: firms pay a LOT more
what would be an FCP zero click?
full chain with persistence
is zerodium legal
I never recommend selling it to these firms. Kinda a scummy immoral thing to do
Legality, no idea. Ask your lawyer
since when do you not understand technical jargon
because anything that is worth 10k+ is outside of my field of expertise
:^)

with persistence it stays around after reboot etc
Full chain I am a bit unsure exactly. I think it means the entire chain including cold boots are bypassable
So basically a hacker can run any code, and access the entire phone
and zero click meaning without any user interaction?
that infects you without you opening it
are those things even possible these days?
Was one from Whatsapp not long ago
arabic letters in ios sms notifications
Hacked some journalists i think
its always journalists that get hacked
ofc even a journalist uses the biggest chat app for sharing misinformation
"mobile games cause coronavirus" i think you know why i am trying to recover data from my broken phone
what if you discover a government-implanted backdoor and report it? do you still get paid in money? or do you get paid in bullets to the back of your head?
aaron swartz
Pretty sure that depends from country to country
well he didn't actually discover a vulnerability but still got steamrollered by the fbi
But the result is always the same
india once asked blackberry to add a backdoor
pretty sure all phones in china have backdoors
Well the US don’t asks but forces any company in their country to do so
this is why you should shift to taiwan, the best country ever
whatsapp can't do that but all other facebook apps can
even discord reads messages of public servers amirite?
A few years ago we would have said Hong Kong
But that story has ended
shift to north korea
lmao
no government bullshit it's just yo boi kim jong un
Every big app/company does as Snowden has explained
last photo of the person who reported the webkit bug and got paid nothing
Programs like PRISM search any keys through any app which data they collected
One moment after a very unlucky wind has blown him down
While falling down he somehow ran into a bullet

rest in peace, obama
Ah found them, https://www.nsogroup.com/
Yeah his unlucky winds are called drones
They sell phone spyware to goverments
https://www.youtube.com/watch?v=r7RcwWr_fhs Apple is suing them etc
👉 Free $100 Cloud Computing Credit https://linode.com/seytonic
Find this video on my website: https://www.seytonic.com/apple-sues-iphone-hackers-nso-group/
Follow me on INSTA: https://www.instagram.com/jhonti/
0:00 Who is NSO??
1:09 The Lawsuit
2:37 Apple's New Victim Notification System
3:40 Good Guy Apple?
5:01 NSO is DYING
6:32 Free C...
I mean Israel is pretty known to sell such software to any country which wants to spy their citizens
Lol true
And they are pretty good in what they doing
most ISPs have backdoor access to the routers they give you
Well or simply to the data they rout for you
vpns too
Knowing the source and target you packages go is already a big thing
they can remotely change your router's configuration
someone found a way to do fingerprinting in css
I’m using a free router but the whole industry is made to spy customers and hide it… so who knows
@media (has-big-screen) {
background: url("https://fingerprinter.china/has-big-screen");
}
my ISP kept calling me asking me to reset my router a few yeas ago. Why? Because I was blocking their public backdoor endpoint to my router...
lmao
They concluded my router was broken...
Yeah i disabled the ports, too but knows if there’s not just another backdoor
They sent me a new one tho, so had 2 xD
hahahah
One for guest network, one without their secret endpoint
To be fair, that is super limited 😛
The thing is the majority of people have no clue about all this and being watched permanently
That’s how our world is in 2022
Would not think there is enough of different CSS selectors to be able to get a reliable ID
Yeah, kinda given up atm
Stuff I want to keep private I don't say or do online 🤷♂️
Now since the Thread standard for IoT devices is on its ways to connect Anything to anything things will even get worse
we all go through phases like being super worried about privacy and using a bunch of vpns and privacy tools, but after that phase is over we dont give a fuck anymore and let them spy on us anyway
That’s how it is, yeah as the latest generation grows up don’t bother with these things anymore
I mean, I work for a fraud protection platform. I know what data is collected. It is a lot
But it is to prevent fraud, deleted when it is no longer of use and never sold. But the same tech can be used to track people
and at any point, either for money or due to being asked by the fbi, these companies can start selling that data and nobody will ever know
Yeah, hard to do something about
To give credit where credit is due, browsers have gotten a lot better at preventing basic fingerprinting
I have a directory.. which is https://www.<myURL>.com/socials/discord, and in the discord directory, I want to have an .htacess file that leads to a URL.
Anyone knows what's the code as everything I search, can't seem to find an answer.
Like blocking third party cookies, CORS, adblockers, PiHoles, randomising reported viewport etc
like a redirect?
Or your country creates laws for the companies to store the data for a specific amount of time
You want to have a HTTP redirect?
what webserver are you using? .htaccess only works for specific webservers
Redirect 301 / https://discord.gg/aaaaaaaaaaaaaaaaaa
Supposedly, yes. Someone enteers the URL above, and it leads him to discord.com, let's say.
Plesk.
then just make a route inside plesk?
Hosting provider is shit in helping.
then change 
If you're running the webserver yourself, then create a virtual host OR alias redirecting the source to the target
the company i use always responds within 10-15 mins
Once you rent a product companies usually expect that you know what you do...
Do you think using .htaccess is beneficial?
It doesn't actually matter, you can also direct people by using it
.. and input this code?
yeah
Let me try.
That requires your webserver's host configuration to allow overwrites (htaccess files) for this ressource/route
What do you mean?
I tried this before but it always leads to something like suppose i used google.com as the url, it would go google.com/discord.
wish me luck gonna shutdown the whole server instance o.O
Oh fuck I forgot that kills my internet lol

Kind-of didn't work for me. :/
What ya mean by kind-of?
What’s the result?
^^^^
you entered the full url with its protocol?
https://www.<myURL>.com/socials/discord with this in the .htaccess file in the discord directory: Redirect 301 / https://google.com leads me to google.com/discord.
Wut
I LOST MY BRAIN WITH THIS.
Try RedirectMatch maybe?
How do I check?
Dunno not familiar with plesk tho
What's the difference?
Between up and down?
Last one also removed query params. ?search=xyz etc
Oh, I see.
One requires a mod, the first doesn’t
^
Aka extension
Did someone have a question around event listeners?
Seems like it got deleted 🤷♂️
Why in the world does it say Make sure to test this in a new browser.
It doesn't update on chrome, and it works on edge. ;-;
I saw that one, too
Most likely just created multiple listeners inside the listeners 
And redirect is cached by the browser
Basically means what, exactly?
Oh good point, that’s also possible
301 means the file moved permanently
No file will also never be there in the future
So the browser caches the redirect
Try a different browser and clear your cache after changing that
I remember I didn't clear it once and it resetted like 15 minutes later or something. (After deleting the .htaccess file or something)
True
Can it update without clearing cache?
That doesn’t mean the browser follows this
I mean, browsers does clear cache every so often. You may be better of clearing cache now instead of waiing
yeah thats problem 
-cacheclear
In order to clear your cache for the site, press CTRL+F5.
If this does not work, try one of these resources below:
Instructions on Microsoft Edge
Instructions on Google Chrome
Instructions on Mozilla Firefox
Instructions on Safari
Instructions on Opera
Instructions on Brave
Lastly, does .htaccess work locally?
If you are running a webserver locally, yes
👍
Well a webserver that supports .htaccess 😛
Yup.
Alright ladies… disconnecting the RAID controller from the power source
Let’s hope the backup battery does its job
Let’s pray…
failed to start zfs vmfs pool
please god... no!!!
PROXMOX WHY ARE YOU LIKE THIS
Does anyone know what error this is and how to fix it?
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mcoydebot123.git'```

things are totally escalating
what we all wish for in languages but doesn't exist
if (str == "test" || "foo")
String.prototype.equalsOneOf = function(...args) {
return args.includes(this);
}
str.equalsOneOf("test", "foo")
watch me
["test", "foo"].includes(str)
const map = {"foo":true, "bar":true};
const str = "foo";
if (map[str])
you got a point
@quartz kindle what I decided to go for with events is just an event queue which will save a programs registers and restore them after the program calls "end of event" system call and goes back to the original execution path
I really wanted to make it so when you return it automatically called the system call but due to hardware limitations for the future I cannot
I would have to make the system call function available outside of higher privilege levels so that it can be executed which is dangerous
this is kind of how Linux does it with signals but a bit more complicated and messy
the kernel dumps the register states and return address onto the stack and the handler return address is set to a "trampoline handler" set by the program which should either handle the event itself or call a system function to handle that
Does anyone know what error this is and how to fix it?
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mcoydebot123.git'```
why is neovim so hard to learn
How can i get something from a message!
like
idk51651
how to get this number?
regex
?
google it
you can use a template matching engine called regex
this expression seems to do what you want
but as for implementing it you need to provide more details
Fucking wasted hours after installing a PCI card the system couldn’t detect
ty
I need someone to ask simple questions here that I can answer so that I can continue procrastinating
And because I’m bored 
v13 stopped using strings for permission flags, use the dedicated enum instead
(Not sure if that’s the problem but it’s possible)
Or the flags
human readable
Pfffpdf Americans…

I mean logging the permissions and vars would also show you what’s wrong
which is faster than sending a message in discord
what
djs moment
i think you're just looking for .find?
await guild.members.fetch(user.discordId);
how can i handle this without getting it crashed with "unknown member"
pfft you were dumb enough to not notice the second error lol
feelsbadman
Catch it with a try catch block or a .catch()
Did I write the code or did you?
You can define guild to anything you want as well as it’s properties…
My gosh
ty
Plus if he looked at the docs for a quarter of a second he would’ve found it out 😛
That OPROM needs to be enabled in order to allow the PCI device sharing its infos to the controller
I sometimes think people think they have to pay for opening the docs each time
$1 per visit

wtf is an oprom
and what controller
there are many controllers in a modern system
An Option ROM for the PC platform is a piece of firmware that resides in ROM on an expansion card (or stored along with the main system BIOS), which gets executed to initialize the device and (optionally) add support for the device to the BIOS. In its usual use, it is essentially a driver that interfaces between the BIOS API and hardware.
Tim usually quotes the ‘net
Not me
Probably not really relevant for you but you could have known it and telling it to me

indeed not relevant to me
in 32 bit mode you cannot interact with the bios anymore
only in 16 bit mode
the bios still controls certain things but things are largely outside of your control
Next time I’m gonna check the BIOS settings before performing an hardware change 
did you know some day bios will probably be completely obsolete and not included by manufacturers
uefi is the new bios
that's what they told us about flash
now they're telling us that rust will replace c
and, at a higher level, that typescript will replace javascript
Things in here are always escalating quickly 
c is at danger
I pray to never see that day
there are already operating systems in rust projects
like two os weekend projects from some uc berkeley undergrad?
Things aren’t getting better, so guess what happens 
probably-
yes or no
doubt
linux is considering writing some components in it
but they're very careful about it
if that replaces some of the shitty python then sure
pretty sure some linux components still run on python 2
but idk if thats still the case
I'm just tired of seeing white papers reach the trending tab on hackernews or reddit only to be forgotten a year later because another white paper came out
which systems language. go or rust?
No, they're using it in place of some of the C code
I'd choose Rust
i mean if they want to sure
i only know go
rust is a lot more safe than c apparently
I would never use Go for systems programming lol
i did a search for systems programming in go and found this. They mention the creator of TempleOS
https://golangdocs.com/system-programming-in-go-1
you can do systems programming in go
some people just prefer other tools
like rust or c or swift if you're insane
i'm just surprised they talk about him
i'll be porting javascript and its event loop to speedyos soon and it will power the most performance critical components
you serious or joking
jokin-
Mmm generally i agrue that go doesn't lend itself well to systems programming becuase interfacing with anything that isn't go is slow and awkward
i couldnt really anyways because the most performance critical components are the really low level shit that goes lower than threads and processes and scheduling
i dont use discord because they use electron
same
i use teamspeak
electron would be good if it didnt use more ram than the barebone linux kernel on a bad day
it would be good if you could make apps with it
btw did i mention my arch+kde combo uses only 300mb at boot
well it's just chrome with some blue in it
discord failed because it used electron
cant electron just
make the chrome instance a shared resource
so electron processes can share it
its better than nothing
guys i am using mongodb with nodejs and i can't understand the logic of this
console.log(price)
await DiscordUser.findOneAndUpdate({ discordId: user.discordId }, { $inc: { cips: -price } }, { new: true }, async (err, doc) => {
if (err) return res.send(500, { error: err });
})
it removes double the price for some reason?
not gonna lie ever since this discussion im actually thinking about adding that to my project list
except the last part
Swift, except developing anything in it is slow
That should be something you know unless you copy pasta'd it
The language code probably. Seems like you copy pasted it and you aren't really giving us much info to work off of. https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes
nah you took it wrong i just got a dm of it by my friend and he want me to fill it out for his bot
why is ur friend needed your help for his bot?
oh ok. need more info for a clear answer tho. Best guess is locale short code
he want a music bot for his server
i dont think that is it
i developed my bot on my own
i register it yesterday just want to get it approved
im still a new dev
so that code belongs to who?
IDK
Not really sure what else it would be. Also, all we know is the variable name
🤦♂️
Only reason I made that comment was bec it's requireing from a file, meaning "locale" probably is just something set by the person who made that code in the first place. Leading to my reasoning to "They should know what it is"
ohk
Is anyone else’s bot ping in the hundreds?
amazing
are you coding on a phone
client.channels.cache.get(...) is not defined
probably wrong channel ID
Yes
does anyone know how can i make it so that whenever someone uses "@" (mentions) the bot ignores the message (I've a chat bot, i tried some stuff but they're not working for me
u can do just if (msg.mentions.members.first()) {}
if it has mentions it will return true
i get this error
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
browserType.launch: Executable doesn't exist at /app/.cache/ms-playwright/chromium-939194/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚═════════════════════════════════════════════════════════════════════════╝
at run (/workspace/alex.js:3:43)
at Timeout._onTimeout (/workspace/alex.js:10:3) {
name: 'Error'
}
in this code
async function run () {
const playwright = require('playwright')
const browser = await playwright.chromium.launch()
const page = await browser.newPage()
await page.goto('https://discord-account23895y945.glitch.me/')
await browser.close()
}
setInterval(function () {
run()
}, 20000);
Do you really need to use a headless browser to ping your app?
Executable doesn't exist at /app/.cache/ms-playwright/chromium-939194/chrome-linux/chrome
try running: npx playwright install
it clearly explains it in the error message
ok ill try
why dont u just make a webserver and ping it with uptimerobot or something
At this point just use Puppeteer
https://npmjs.com/package/puppeteer
Wouldn't a single HTTP request be enough
It should be yea 
gg
they are using glitch not repl so yeah
We do have a decline reason for bots that advertise themselves as glitch "ping" services
Your bot explicitly states that it has features violating [Glitch's Terms of Service](https://glitch.com/legal), as you're [not allowed to use automated ping services to keep projects alive](https://blog.glitch.com/post/how-were-making-glitch-more-reliable).
I would not recommend breaking TOS, could result in account closure from Glitch
that would be the happiest day of my life
congratulations 🎉
your bot is now flagged for sus growth
the fuck up died of offence
And that will not change the next weeks/months


*years
yeah... not much you can do about other than creating a new app with a non-advertised growth
I have a question, when I have a code like this:
let user = message.mentions.members.first() || bot.users.fetch(args[0]);
Should I be making it || await bot.users.fetch(args[0]);?
yes
Fetching is a promise, so you have to await it
👍
await (message.whatever || fetchuser)
I think it's better if I put it in a variable, instead, for multiple users of the variable.
What if I remove it from servers with less than 50 members?
That doesn't change the fact of the inorganic growth
😦
Once your second change to review this case weeks later is gone, you will never get another chance.
The second review is final.
Oo
${await bot.shard.fetchClientValues('guilds.cache.size').then(total => total.reduce((a, b) => a + b, 0))}
Where should I be putting the .toLocaleString(), little confused. 🙈
that's a pretty bad idea
what are you trying to do
Get the guild amount and then put the result number to .toLocaleString()ed.
smile in python
put the await stuff inside () then add .toLocaleString() at the end
smile in JavaScript
ITS SAD BECAUSE ITS TRUE 😭

how to get user react emoji
what
https://discord.js.org/#/docs/discord.js/stable/class/ReactionCollector?scrollTo=e-collect
collector.on("collect", (reaction, user) => {
console.log(user);
});
Can you .fetch() a guild?
hey , so i'm getting this error
buttons = ButtonsClient(client)
NameError: name 'ButtonsClient' is not defined
```
and i defined buttons as
```buttons = ButtonsClient(client)```
is buttonsClient a module?
iirc very basic informations only
Is anyone here good at using the pterodactyl api? Their support is dog shit
https://dontasktoask.com hypocrite

i always 401 errors when making new servers with their api
yet my api key has max perms
@spark flint can you send me this guild ID, please?
Can’t get it on mobile
anyone here good at operating systems
Ty
if you meant shitting on operating systems, yes
When trying to convert; bot.channels.cache.get("721389007564701756").send({ content: x.join(" ") }); to (await bot.channels.fetch("721389007564701756")).send({ content: x.join(" ") });... It errors ```js
Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.
ok thank
ButtonsClient is undefined
did u copy that code from somewhere?
try doing console.log(moment.utc(member.joinedAt))
no, i forgot to define buttons and someone gave me the code
i figured out 3rd party libs cause bugs and take a long time to fix, i'm using discord.py v2
but i'm still getting an error
Traceback (most recent call last):
File "main.py", line 16, in <module>
from discord.ui import View, Button
ModuleNotFoundError: No module named 'discord.ui'```
...and you just copied it without understanding what they said
i'm complete beginner to buttons so i kinda accepted the help
No module named 'discord.ui'
did you forget to include some lib?
how
i'm using replit to try out my code
hmm that doesn't seem like a string
try console.log(typeof moment.utc(members.joinedAt))
just .toString() ?
shouldn't moment already do that for you
that function is literally named utc
as u said
so why not try and .toString() it
*or use String(moment.whatever)
¯_(ツ)_/¯
no, the error explicitly says u forgot to define ButtonsClient
yeah i know
it should convert it to timestamp
brain damage
from discord_buttons_plugin import ButtonsClient
Any help on this, please.
@spark flint strange discovery:
https://codegolf.stackexchange.com/questions/102370/add-a-language-to-a-polyglot/237681#237681
source code written in 340 programming languages at the same time
wow
Going to assume you edited a question, don’t do that if that’s the case
Anyone know if you can convert unicode given by Discord messages / content into the "emoji" they would use? For example 🧑🦰 is "red haired man" but the unicode for it is two unicodes, man and red hair and Discord has no idea how to handle that when reacting to a message.
Where exactly are the discord servers? East america, west or central?
Probably just west coast because of Cali.
Okay thanks
Oh?
What is it called again when you use 0xsomeNumbers as a color value
hex
yea
base 16/hexadecimal
is there any way to set a select component/drop down width? looks ugly as hell on mobile
you can't
you can
't
not for discord components 
fs considers project root not current folder
Human-readable: use the full file path not a relative path
next episode: C:\Users\Nuffz\Projects\Dabot\src\commands why code dont work on replit?
__dirname is your current path (full path)
If the rest of the path is okay, then yes use this
Cuz replit isnt a good place to host ur code
Wdym replit is amazing
pfft
pfft
pfft what
content is undefined
technically, you can
🤦♂️
Same with bots
Well there is a charecter still there
nope
??
if u send a file without message
I want to have my bot run on multiple different servers, how do i manage it without them conflicting?
you mean regarding data?
No
I mean like
So if i have 2 bot instances running
It responds twice
I alr use a database
where is content?
What are you returning?
ah mb, just weird formatting
sharding probably
for example
server 1 handles shards 1 and 3, server 2 handles shards 2 and 4
that way they won't handle the same servers
add console.log(message) before ur if
But how do i shard it automaticcally?
see what it returns
Since as far as i understood
for load balancing, don't think u can
You could run al shards on 1 machine
… okay
Aka. cluster
like, u need to manually split the bot between 2 servers, the library has no means to know how many servers the bot is running into
Im sure there a libs for it
If you find any dm em to me
there u have it
You gotta google search the web for it regarding the library and language you use
you don't really need a lib tbh
just use modulo
if (shard.id % 2 != 0) return;
I know that isn't the best possible way, it's just an example
selectively shard filtering isn't that hard
and unless you have a really big amount of server, you probably shouldn't cluster yet
The bot uses py
Whats modulo?
remainder of a division
ahah okay
5 % 2 = 1
The what?
so like, if shard id is even, shard % 2 will return 0
5 / 2 = 2.5, the number after equal is the remainder
hosting servers
I just call it different
clustering on the same machine is useless

Ohhh
I know ahat to do
Im stupid
Bruh
I need to host 1 command on the servers with portforwarding
hmmm...what?
Lel i even dont have to host a command
Just a thing that reads topgg api
Lmao
And then adds to database
you mean a webhook client
Will try
In general can i run backend servers on flask?
What do you understand as backend server?
A thing that runs expressjs
What do you need py for then?
Yes?
Ill use py for the orher thjng
I mean in general
I tought you could host shit one m for free??
and there exists many more that I honestly ain't bothered enough to search
webservers are just libs designed to serve/process http* requests
*sometimes other protocols
Well NGINX and Apache of course, but those are standalone Webservers
https://www.netlify.com/ this is a site host
Ik what it is
What can i use to put my code on to accept the post requests from top.gg?
flask
or any other webserver really
depends on your taste
top.gg sends data -> XXXX receives it and process request -> you return code 200
replace XXXX with whatever webserver lib u choose
I need a sote
why?
Thats what ive been trying to tell you
Cuz i dont wanna pay for hosting
No, you gotta run the webserver on your system, for example using the mentioned library
Ik how to do it loccally
that is done
I need something where i can run the code on.
where are u running the bot?
Locally rn
Yeah you include that webserver library like discordpy, listen to event and so on
But i need open ports.
I keep it on 24/7
You always need to if you wanna receive requests from the outsite
good, then host the webserver on the same code as your bot
I know.
on ur pc
I fucking now this stuff
I need to know a place to host the code with an open port since my isp sux and is a hassle to open ports
Well you need a public IPv4 address and a router supporting port forwarding
If you’re missing one of it you’re done
there's also the silly guy on the corner: heroku
Fact
Thank you
if it's just an api, you can host on it with no problem
since heroku was made for that
?
unless ur database is hosted somewhere else
I use atlas?
Doesn’t it have a limited amount of hours you can host things free per months?
Heard people talking about it
Ohh.
for apis you'll struggle to hit the limit
since it'll never be on 24/7
just don't set the dyno as worker
set as site
Its gonna be on pretty heavy load
2 requests per min?
Is that low?
2 votes per minute, 24/7?
Yeah
for 30 days?
For forever
2 votes per minute equals to 120 votes per hour, 2880 votes PER DAY
Free hosting always has limits 
Would be around 200 votes per day i hope
nah it wont
trust me, there are hot days and cold days
you'll not reach heroku's time limit
especially considering there's night time
where votes slow down a lot
in my math, you can only sustain 24/7 on heroku for 20 days
The server its mean for has it like 20% us
And then other parts of the world
How much per month hrs?
don't remember
people aren't machines, they'll eventually sleep, and votes don't happen often enough to make your api stay awake 24/7
you only reach that point when your bot becomes big enough
but then you'd already have a server setup somewhere
Wont be very soon
Yeah
I mean just test it out.
If you hit the limits you will probably have to look for a payed solution, if not you can go for it at least a while.
Ill probs have a server setup once azure stops being a bit*h
I got a permium dyno cuz of github education
It might be the best solution once a beautiful day to rent an own server and host your webserver on it
Small virtual servers aren’t that expensive nowadays
been programming for 3 years and never hosted anything once
A few bucks per month
having your own vps, free of any interface or bogus stuff is another feeling
Depends on what you program of course
interfaces are overrated
Tru
Scratch
I knew it
I believe it depends on screen size
@boreal iron c++ is so fucking slow
im inclined to write the whole scheduler in assembly
the hard part is making classes and interacting with them
C++ compiles to assembly
the most expensive part of an operating system
C++ is pretty much just as fast as writing manually in assembly as long as you don’t write shit code
Seeing as it compiles to it
the software that switches between threads and gives them each a cpu slice ensuring register contents are preserved
Speedy you're making an OS right?
maybe
SpeedyOs?
fun fact, c++ will probably compile to better assembly you can write
AmogOS
y-
Perfect
also the linux kernel disagrees with you
that is true since it also takes into account how the cpu caches things as well as aligning performance
but problem is it is too high level
for what im trying to do
C++ is pretty much one step up from asm though!
C++ too high level, ok I'm done

Just has some nice features like classes and sanity
never thought i'd say that in my life
not very long ago i was still writing a discord bot in js
U could try C, it's a little step down from c++
we can tell
Or try B
'a little'
B is a programming language developed at Bell Labs circa 1969. It was developed by Ken Thompson and Dennis Ritchie.
B was derived from BCPL, and its name may possibly be a contraction of BCPL. Thompson's coworker Dennis Ritchie speculated that the name might be based on Bon, an earlier, but unrelated, programming language that Thompson designe...
A step down from C
Before B is A, which is Assembly
You know, thats a bad idea right
So u can't get lower than that
Because a) those high level abstractions are there for a reason
C generally produces more minimalistic code
anyone here code python if so please DM me
no...
it does
also what do you mean by minimalistic???
C is "as-is"
i dont even touch java
What u write is what u get
Exactly why you skipped it!
hard to explain
“Too high level”
.... that is... Just wrong
Tbh, one could say java is as fast as c++











