#development
1 messages Ā· Page 47 of 1
the error regarding the clipboard can basically be ignored
you can copy the address yourself
if you have any code ready, send it to me and i'll test it out and send the results
Couldn't you just use a spiral like solution?
the website is working just unable to interact with buttons
and there is no errors.
wdym?
any help is appreciated tho so i am willing to try anything at this point, It should be handed in in exactly 2 hours
š
go straight until wall, placing a ball everytime, when you hit a wall turn and repeat, but also check if you are hitting a ball or a wall if so turn, then it'll create a spiral leading you to the middle
Unless I'm forgetting something wouldn't that work?
this might work. If it is, i will kiss you on your cheeks pancake
nah but fr i ma paypal you then
@eternal ospreytry that to fill up X please
the last result should be the ball turning down, walking downwards
keep in mind idk cpp
void turn_ball()
{
turn_right();
if(north())
{
turn_left();
turn_left();
turn_left();
}
else
{
turn_right();
}
}
void check_wall()
{
while(!on_ball())
{
if(!in_front_of_wall())
{
step();
}
else
{
put_ball();
}
}
}
void check_ball()
{
while(on_ball())
{
turn_ball();
step();
if(!on_ball())
{
put_ball();
step();
if(on_ball())
{
turn_ball();
step();
turn_right();
step();
}
}
}
}
void find_center_agent()
{
while(true)
{
check_wall();
check_ball();
}
}
make a video
im trying to reproduce the steps on my paper but it's pain
unexpected behavior can be expected
expecto the unexpectum
you should host this web for me
this doesn't stop the ball YET when being in the middle
just to say
it will continue to run endlessly
Okay so i basically tried it myself
I am so fucking close
i just need to know a method to stop
you're circling all around?
Yeah exactly
try mines please
there shouldnt be a need to circle all around
Oki let me try!
I have a way to stop the ball
that's why the function turn ball exists
soon when being on a ball a facing north the cursor will go back and end the code
but I need to make sure if the rest works
it should fill the x axis, end in the middle, go down, fill y axis, end in the middle, to should go to the right doing the same
which I need to get rid of
(the last part)
Owh damn wtf it almost worked yeah!
ik I JUST NEED A VIDEO
Just check if you're surrounded by dots
in all directions
ok i will finish it real quick
alrighty thank you
can you actually return a function?
without value?
@eternal osprey
nvm i found the issue
and probably the solution
owh i see
no i am not allowed to use return at all
i hope that next fucking lessons we will be diving into real c++ instead of this fucking dumb goofy ass project
I think the takeaway is that some projects have special restrictions even in the real world and you have to work around those restrictions to problem solve in a possibly more efficient way than previously thought
having no return kinda sucks but like

void turn_ball()
{
turn_right();
if(north())
{
turn_left();
turn_left();
turn_left();
}
else
{
turn_right();
}
}
void check_wall()
{
while(!on_ball())
{
if(!in_front_of_wall())
{
step();
}
else
{
put_ball();
check_ball();
}
}
}
void check_ball()
{
while(on_ball())
{
turn_ball();
step();
if(!on_ball())
{
put_ball();
step();
if(!on_ball())
{
check_wall();
}
else
{
if(north())
{
turn_ball();
step();
turn_ball();
get_ball();
}
else
{
turn_ball();
step();
turn_right();
step();
}
}
}
}
}
void find_center_agent()
{
check_wall();
if(!on_ball())
{
check_wall();
}
}
now check this please
video
it should end up in the middle facing the north, removing the center ball
to break the loop
@eternal osprey
expecto the unexpectum
it works?
oh may i forgot somethhing
updated the code block @eternal osprey
test it now!

it works mate
danggg
thank you very fucking much
let me paypal you for your effort lmao
wait it can't work
it does
which version did you test?
the updated one or pre-updated one?
the pre updated one
ok, please test this one a last time for me with video
i dont think we need the turn ball function as I did before
void turn_ball()
{
turn_right();
turn_right();
}
void check_ball()
{
while(on_ball())
{
turn_ball();
step();
if(!on_ball())
{
put_ball();
step();
if(!on_ball())
{
check_wall();
}
else
{
if(north())
{
turn_ball();
step();
turn_ball();
get_ball();
}
else
{
turn_ball();
step();
turn_right();
step();
check_wall();
}
}
}
}
}
void check_wall()
{
while(!on_ball())
{
if(!in_front_of_wall())
{
step();
check_ball();
}
else
{
put_ball();
check_ball();
}
}
}
void find_center_agent()
{
check_wall();
}
test that, please... be so kind
š„ š„£ 
well that triggered me
dude got the solution and never replies anymore

the classic hire then ghost strategy
make my website for me, i promise i wont ghost you :^)
ghosted
I mean I'm not the worse as well but still
would u "buy" such a simple design
how about light mode


including the legendary feature discord added recently, others including me already have for like 10y now
I am here having trouble hosting a open source website and your here coding it
wut
I am here
i didn't fucking host anyone
I was packing up my things for tomorrow morning
try the last code block I mentioned, please
not the place to ask to hire devs/hosts
k
we can't help u with that, u may wanna ask the author
is there a way to get the message id of the original message by pressing the "leave giveaway" button?
the message property of the button interaction should contain the original id property
Yes i will
interaction.message.id should be the original the message (not the follow up ones)
no I'm wrong
you actually need to fetch the message
that doesnt work if its ephemeral tho does it?
the first one isn't an ephermal one, right?
you set a custom ID of the button
yes
so fetching the original should be: let original_message = await interaction.webhook.fetchMessage("@original");
when pressing your red button
and receiving the button interaction
@boreal iron it returned me too many errors
so the function check_wall used function check ball
while check ball used check_wall
so i must place one function on top of the other, but as they both require each other i cannot
else it gives an undefined error
the function cannot be called before it's defined
error DiscordAPIError[10015]: Unknown Webhook
that's the result when pressing the red button?
you're sure the interaction is the button interaction and nothing else?
can't u just swap the two functions?
yes
I updated the code once again @eternal osprey #development message
it should now be defined before getting called
if not moving all functions into find_center_agent() and call check_wall() after should work then
thats not bad at all, its pretty good
idk cpp

please provide the code for me
its interaction.fetchReply()
const Giveaway = require('../../schemas/giveaway');
module.exports = {
data: {
name: 'leave',
},
async execute(interaction, client, colors) {
let original_message = await interaction.webhook.fetchMessage("@original");
console.log(original_message)
const giveawayProfile = await client.createGiveaway({
giveawayID: interaction.message.interaction.id,
});
try {
await Giveaway.updateOne(
{ giveawayID: interaction.message.interaction.id },
{ $pull: { entrances: interaction.user.id } }
);
interaction.edit({
embeds: {
description: 'You successfully left the giveaway',
},
ephemeral: true,
});
} catch (error) {
console.log(error);
}
},
};
does that work with ephemeral messages?
it should, since its the button interaction that counts
and the ephemeral is a follow up, isnt it?
yes
lmao
then the ephemeral is not a followup
looking at it again, it doesnt look like it is
the user presses the enter button
the ephemeral is a direct response to the enter button
its a reply
so then you have to use a customID in the leave button
it's a follow up message as response to his slash command interaction
that links with the correct giveaway in your database
wait I see what u mean
it's not a follow up message
the giveaway embed is normal message and no interaction response
im no confused it says "click to see command"
do you send the ephermal message when pressing the enter button or after executing a command?
the main giveaway file https://srcb.in/N1Gi3Xj1G0
enter giveaway file https://srcb.in/v8089NMC3G
when i click the enter button
Youāre screenshot is confusing
It should say you entered the giveaway or youāre already in in an embed and show the button after
But according to the discord ui it looks like a slash command interaction response
i realized i had writen embed instead of embeds so here is what it should look like
whats confusing about it?
Because you didnāt execute any command
You clicked the enter button
And replied with an ephemeral message
the first embed is executed by a command and the second is sent by a button
regarding that, how will the user leave the giveaway after they close the client?
?
Man Iām close to freak out
ephemerals are deleted when the user closes the client
Does your giveaway command response show that itās an interaction response?
i have a database
idk
Hi, could someone help me solve a problem with my bot?
It is giving error 50001 missing access
Well you donāt have the permission to do what u wanna do obviously
So when awaiting your promises and catching errors you will know where the error is coming from exactly
https://srcb.in/twx63zFpe6 the message id is 1021173615670067291
I made a scripit, and it is right, I tested it with 2 test bots, and it worked perfectly. However, with the token of an old bot I had, it's giving an error, I believe it's because of the slashcommands permission.
your leave custom id needs to have the giveaway id
I already redid the bot permissions link with the applications.commands permission activated, but it didn't work
for example custom_id: 'leave-${giveaway_ID_from_your_database}'
No
It has the reference of the original giveaway message
Itās the ID he stores on the database
yeah but you dont really need that message
you would only fetch it to identify the giveaway anyway
then i cant access it since i dont know what the id is across the files
you dont need to
interaction.message.reference.messageId should be your giveaway message id
the original message that has the enter and rewards buttons does not need to be edited
so if you have the giveaway id in the leave button, you can use it to access your database directly, bypassing the need to fetch the original message
He doesnāt need to fetch any message
He has the message id and reference message id (original giveaway message id) when pressing the button
That seems to be the ID he stored in his database
As reference to the giveaway
tysm
Tbh never seen the reference property before
Clicking enter will send the leave button again
Incl a message he has already entered the giveaway
I mean he could add leave to the giveaway as button
Which would make his life easier
yeah this would be more intuitive
Since enter also checks if heās already in, leave could be added to performing the same check
The issue probably is the command handler
Im filtering them by their command name or custom id, too to execute the appropriate (cached) code
I mean I could also extend the handler by filtering the custom id splitting it by a - or _ for example
But yeah static names make more sense
Discord actually gives you the reference of the message when presssing the butting anyways
I just googled gta 6 leak and got gore š
well what did u expect lmao
gore?
it's either that or Sernando
I read something about a leak in another discord server and was confused
nah better not
Thought itās already out for years
a video of someone getting killed or sumn like that
Isnāt 5 already 10y or older
No a video looked like a dev build with unfinished chars and graphics robbing a Burger King
source code and gameplay videos
Or something like that
yeah, a dev video got leaked
and a couple missions
gta 6 will probably not be released within the next 5 years
as wells as 2 protags
Which can also be one of the 5 dev videos tbh
gonna be released 2024-25
*5th
youtube is fucked up
nah they stopping development
yo guys im trying to make a request to this url https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token id_token&scope=account openid&nonce=1 but it wont work on my vps only on my local machine cuz of ip
so
is there any way around it?
get a 403
from cloudflare
use a proxy
tried cors-anywhere
same thing
even just a normal vpn on my local machine blocks it
yeah ik thats why im confused why its a 403
but
i only get it on my vps?
not on my pc
doesnt make sense
thats the only thing that makes sense
riot prolly fucked up the codes
probably wrong scope or token
then there's that:
checked it 40 times
is the redirect uri acessible anywhere?
and is it the same as the one defined in ur developer panel?
riot is shit at balancing and making clients, but I don't think the api is broken
that code
is supposed to have a cookie along with it
that cookie
is needed
to save
user profile
linebreak issues
but yheah i need to make that request so people can log on the bot
they provide their cookie and its supposed to get some info off of it
works completely fine on local machine
ctrl c ctrl v on vps
and boom
403
is the url right? copypaste is notable to cause issues with that
does python support JSON?

I forgot and i have to anwser something
it supports PSON
"What's Causing the 'Error 1020: Access Denied' Error 1020 Access Denied is caused when a firewall rule has been violated on a site protected by Cloudflare. It can be triggered if a site visitor tries to directly access an endpoint that is protected."
thats the error in the body
BUT IT DOESNT MAKJE SENSE THAT MY LOCAL MACHINE
WORKS
BUT
VPS ODESNT
BRUHHH
JSON is just a file format for storing key value pairs. Pretty much every language known to man supports it
Do curl -v "https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token%20id_token&scope=account%20openid&nonce=1" on your server please
i think it redirected?
no?
which it shoyuld
BRUHH HWTFFF
var response = await request('https://auth.riotgames.com/login#client_id=play-valorant-web-prod&nonce=1&redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&response_type=token%20id_token&scope=account%20openid', {
headers: {
cookie: cookie
}
});
Try another user agent
what should it be
Mozilla/2.0 or smth
Try the user agent you see in curl
Or use some generic
Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Mobile/15E148 Safari/604.1
same thing
lemme try that'
same thing
Show the code please
var response = await request('https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token%20id_token&scope=account%20openid&nonce=1', {
headers: {
cookie: cookie,
"user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Mobile/15E148 Safari/604.1"
},
});
check the docs, see if they require an additional header
i think why it worked on curl is because i didnt provide a header
should i try providng a cookie
?
with curl
You didnāt provide a cookie
on curl ye
Curl automatically adds an user agent like request does as well
Could be possible the cookie is associated with others
docs, please
Or if the geo location is different and the user provided a cookie the access gets blocked for security reasons
Just copying cookies nowadays to steal access wonāt work anymore if certain information changes
For example cookie IDs are stored in a database with a reference to your geo location and browser
are you trying to automate something that is not supposed to be automated?
im just trying to login with a cookie basically
to allow users
to check their valorant item shop
When using that cookie in another browser, localization etc it could return the 403
it works on local machine not on vps
Since it could be stolen
undocumented endpoints are usually not supposed to be used at all
At least thatās how I enforce security
nvm i found it
the scope is different than the one ur trying
like, scopes matter A LOT when making oauth2 transactions
you might not be able to use that specific scope legally
yeah maybe
well
i asked in the
riot dev discord
so
time to wait for an answer
With your own cookie? It stores your own user account?
yeah
everyone logs in with their cookie
because each person has a different item shop
I doubt that works
but if you have to use cookies, you're doing something wrong or unsupported
oauth2 doesnt use cookies, it makes the user "login with riot", then redirects them to your website with an access key, which you use to access their data
I wonder how he wants to get the cookie anyways
u provide the cookie
in the command
that end point letās u login with the cookie
to get some other info needed to get your store
Canāt you get access to the account details using the OAUTH flow
If it even is an OAUTH flow
so then how does it work on my local machine?
no
in california
so am i
and i tried on my local machine
with my friends cookie
he lives in new york
still worked
But still the same country
Hmm
Not sure then
But tbh using peopleās cookies aināt a good idea
yeah
just sucks cuz
i spent
3 1/2 hours
making this whole thing
so
kinda bummed out
spent leukemia lmao
apple autocorrect at its finest
I tell you how I would do it
User enters the command in discord, you respond with ephemeral message incl the oauth link which includes a redirect url to your endpoint which has a token as get parameter to identify the request, once the redirection happens you have access to the user data, push it to your bot and a non-ephemeral follow up message
Use the token you got as get parameter as reference
To send the follow up to the right webhook (message)
The token could be the webhook id for example
Actually top level shit idea to add that flow to my bot
Utilizing the Steam login to get the user data
Why havenāt I thought of that earlier lol
sir...this is Wendy's
yeah but one issue
getting a riot dev api key
is not as easy as u think
at all.
Tf does that mean
Speak a human understandable language ffs
sir... this is a Wendy's

Man⦠kids can be annoying
arent you younger than 21
lol he's definitely older than 21 (no offense fake)
berry be like
Would be nice if so⦠š
When people say I would do things differently who knows if you actually really would 
I think things happen for a reason, so I'd just do everything over again the same way. I'm not disappointed with how my life is unfolding at the moment
Yeah differently doesnāt automatically mean better anyways
What looks nice in the beginning could end like shit later on
how many lives would you theoretically have to live to make yours a "perfect" run?
"damn I got dumped, I wish I could go back in time"
becomes serial killer
"damn could I get a refund?"
I like my current life too but who knows what the future brings but I still feel like I should have done some things differently which would may open a few more doors for a different future
Huh Perfect is a strong word
Aināt possible
But yeah your decisions are part of a big chain and who knows what would be missing, differently or worse when youāve made other decisions
End of the philosophy lesson
That's just a question of free will
Yes and no
You canāt be open or ready for anything you gotta choose sometimes and even if you might switch at some point, thing is you donāt get younger and life is really short
I mean Iām not an old fart yet but trust me being 10-15y older changes your point of view
It feels like the time is running faster every year
youtube has the weirdest ads ever
I just watched an add of a girl farting on a dude the dude turned into a zombie she killed the zombie then turned his house into fortress and somehow got 300 guns
š
mobile game ads are getting out of control
When has it never been out of control
clash of clans clan wars ad
whats the difference bw ytdl-core and node-ytdl-core?
??
they're the same
the repo is called node-ytdl-core and the package is called ytdl-core
oohh, yeah. got confused there
Also which is better discord-ytdl-core or ytdl-core-discord?
lmao
How can I make a <t:x:d> of a specific time? without date
If you wanna use the time format then you will have to use a timestamp
If you wanna drink some water, you need water in the first place
Just to say in cases you donāt know, X is a timestamp not a date
i think seeding this backup on my new server may take a while...
hello
When an error occurs in the discord api and the user cannot log in, it says this message in the dashboard, which leads to the project name being shown as you see. Is there another way when I have an error in the discord api it shows a custom error page ? Does this typing error appear?
make an error handler
or simply catch your promises (if passport use promises)
I will try this, thank you
hello, Who use ShewenyClient?
no idea what that is
Why it's not working?
congratulations, you managed to make the least descriptive question in the history of topgg
your code is infected by ghosts
What the heck do you expect us to do then if donāt see any code or some more details whatās not working
is it dm advertising/outright scam/privacy breach/botlisting?
also yes, we cant help if we dont get any code
suspicious 
how do i catch a require failing?
want to make it so that if i reload my commands and one is broken for whatever reason it doent brick the whole bot
Why should the file be "broken"?
idk
El pepe
Check if the file exists before loading it
i edited it and fucked somthing up
that sort of thing
Require does only import the file, not more or less
true
If the code inside is broken, an error will occur when using the defined constant
?
json?
so i can reqire a bricked js file and it will be fine untill i set it as a command in the command handler
ah, I thought we had a case of krangled json db
no
edited a command file and broke it in the prosses
fix the error
As long as thereās no self executing code inside, then yes
well duh
also dont u use git?
but i dont want the thing to crash
u can just restore an old version of the file
when its loaded
it's 100% better to have it crash than not
that way you know something is wrong
instead of chasing your own tail trying to fix a broken command
i want it to try to load the file and then not load it if its got an error in it
and then get a console log going "yo the help commands bricked again"
thats all i want
cant u .catch() a require?
i tryed that and it says .catch is not a function
then use try-catch
uuh i tryed that but it didnt work cuz the thing wasnt global but i think i knwo how to get around that
one sec
...?
like, you'll have the try-catch only around your require
there's no "global" at all
try {
const cheese require("bruh")
} catch {
console.log("error happend")
}
client.commands.set("cheese")
error cheese isnt there
thats paraphrased
but what i ment
but thats not the error
cheese was there and working
but cuz it was in the try block it stayed in the try block
but i can just put the whole lot in the try block and it should just work
well yes, that's called scope
Scope is important c:
simply declare the variable outside of it
Command set is outside the scope in that case
i did that but then there was some other error
thats what im doing now
let cheese;
try {
cheese = require("stuff");
} catch (e) {
console.log(`Error happened: ${e}`);
return;
}
client.commands.set("cheese");
If command.name wouldnāt exist because the file or structure is broken that would error
you shouldn't even attempt to continue if it errored
Of course you should continue
why is this so blurry
or yes, use ```js
try {
let cheese = require("stuff");
client.commands.set("cheese");
} catch (e) {
console.log(Error happened: ${e});
}
Halting the application when loading a broken command file is stupid as fuck
exactly
I'm not considering a loop
I'm considering you're specifically reloading that file
Dunno mobile screenshot issue I guess
if you're loading a specific file, you shouldn't attempt to continue if it errored
since everything else will be just invalid
im reloading all commands at the same time
then use this
Nothing will be invalid thatās why you got a command handler and error handler for this
btw, u should track which files were changed, so u dont reload unchanged files
if ur loading a specific file and it errors, everything after the require will be invalid
emphasis on "specific"
Can I ask not discord bot code here?
I'm talking abt single-file reload, ur the one talking in plurals
even for multi-file reload, u shouldn't continue that iteration if it errors
since anything else will be invalid because of the error
Still depends on the situation
yes
give me a situation where an errored file doesn't invalidate the entire current iteration
all of those invalidate the entire current iteration when erroring
Anything has a proper handler
One wrongly loaded file will cause an error not more or less
yes
No code inside the loaded file can be existed since itās broken
that's why u skip that step and go to the next file
So why should I shutdown the entire app?
I didn't say that
Thatās exactly what U said
I said you shouldn't attempt to continue if it errored
i want to read this datafile.txt and display the content.
datafile.txt (Want get this in console)
MUTHUSAMY GOPAL PENANG 0114352022
PETER BROWN KEDAH 01111414502
RAMLI AHMAD PENANG 0131344121
SIM GAH THENG KEDAH 0153038321
SIM BENG HUAT SELANGOR 0175300292
SIM BOON TEE PENANG 0165309293
Code
#include <string>
#include <fstream>
using namespace std;
struct personalDetails
{
string name[16];
string country[10];
int contact[14];
};
const int SIZE = 6;
int main()
{
struct personalDetails pd;
ifstream in("datafile.txt");
if (!in)
{
cerr << "File can't be opened! " << endl;
system("Error");
exit(1);
}
for (int i = 0; i < SIZE; i++)
{
cout << pd.name << " ";
cout << pd.country << " ";
cout << pd.contact << endl;
}
return 0;
}```
**Get this console**
```0x61fc64 0x61fde4 0x61fed4
0x61fc64 0x61fde4 0x61fed4
0x61fc64 0x61fde4 0x61fed4
0x61fc64 0x61fde4 0x61fed4
0x61fc64 0x61fde4 0x61fed4
0x61fc64 0x61fde4 0x61fed4
errr...cpp
how can I check if a userid is in a serverid?
fetch
discord.js
If I add
for (int i = 0; i < SIZE; i++)
{
in >> pd.name >> pd.country >> pd.contact;
}
It get huge error
I have absolutely no idea how to answer that
Try to Fetch a member with that user id
other than "main doen't need a return"
Either he exists or not
can you tell me the full function name? Cant really do alot with fetch to every answer, ik how to fetch a user to get its username and tag but idk guilds
I think waffle will be ur only help
guild.members.fetch
In passing period rn Iāll help in a sec
It's okay if can't help
is guild in my case interaction.guild?
ig so
Erm this semester learn thisš
Yes
ah ok
Ok so whatās the problem exactly?
btw I once read that using endl is pretty bad on loops
since it flushes the buffer everytime
Yeah use \n
Ok itās because youāre doing struct personalDetails pd;
Just do personalDetails pd; otherwise youāre declaring an empty struct basically
Quite honestly Iām surprised that even compiled
The compilers for C++ are pretty lenient though
Also using arrays for this is probably not recommended, Iād be using vectors. Though Iām not sure of what your assignment requires
I think what it wants you to do is make an array of structs
š®āšØ š
what exactly would I get from that to know if hes in the server, actually... lemme try if it errors if the user isnt in the guild
yu
Youāll need something more like this @earnest phoenix
In c++ itās technically not required but still perfectly fine to do
if it is not undefined/null, the user exists in the guild
it wont error
Erm can I know that the part A is only need to count the number of line only? (Sry my eng bad)
I can help in about 20 minutes
New channel topic: free homework helper
I really confuse because I learn c++ and xamarin in same day
In the meantime @earnest phoenix read through this code and try to understand what Iām getting at
OK noted
evil
why 17
the amount of gateway events š«
yes
bruh and i thought my 4 bots was alot
anyway
is there a way to stream the same audio source to multiple chats?
you can open a stream for the audio and send the bytes to each output stream in a loop yes
17 = bolsonaro
if we get lucky our electronics price might go down by like 40% by the next year
O pog
well, that's what happens when your president self-shames himself in pretty much all public events
my notebook costed around R$2,800 when I bought, now it's more than R$4,300
Usually 24 hours, or until your next cycle kicks in for login limits
If you have somehow managed to hit the 1000 login per day limit then you have a big problem
well our bot goes offline while i code is online for some reason
I get the feeling that they're using a free host that resets their bot application every time the code is edited
And that the host also resets the application on an interval
uptime robot bc my stupid hosting doesnāt work properly
I have $0
You can quite literally get VPSs for $0
Theyāre not very good, but they exist
I personally use Oracle, never been charged a penny for hosting my bot 24/7 for nearly the past year
last time i used a free vps i got in trouble with the police
wtf
I very much doubt that, if you don't want to be limited by the free hosting service you use and don't want to encounter ratelimiting issues like that, just throw in a few bucks
yeah apparently they hacked my fricken information and used $114 on my moms credit card
Sounds like you chose a shady VPS provider
yeah besides the fact that i had my information stolen
If this is from someone that hacked your account that sounds like you had a problem
iām also ip banned by them
also an important note, disable anything that might keep retrying during the ratelimit
Especially with accounts linked to your payment information
you definitely don't want to aggravate your case
is IBM good?
For what?
vps
Building computers in the 70s š
no, ibm doesn't have a free vps plan
^
they have a thing that's kinda like azure, but definitely not a vps
and yes, as much as I'd piss on oracle's grave, their free vps is pretty decent
I give them that
Oracle is a greedy piece of shit company but fight the greed by forcing them to spend resources on you at no cost to you
Thatās how I see it
I made a proxy server out of their vps
Lmao
Don't you also love the programming language they maintain called Java?
to prevent my testing bot from locking my main bot

i like java the lang, not java the oracle
plus java's opensource, java's jvm is what's patented by oracle
Yeah, but then again they're the main maintainers of the language as well, I would say they've worked pretty hard on it
But Oracle being Oracle... Not much you can expect
quality graph
them fuckers literally deleted my vps
rip my minecraft server
Why did they delete it?
they're the main maintainers of the language as well
I'm not sure about that anymore
they maintain the name java, but openjdk is being maintained mostly by ibm, amazon, apache, etc
lmao
i tried talking to their support, and all they said was "the account was terminated, we dont have any more information"
Weird, they must've had some obscure reason or just some Oracle-specific bullshit
"yes, we delete rows instead of using status columns, why do you ask?"
What I mean is that they also weigh in a lot of work, changes, reviews and similar, those also have contributed impactful changes to the language
Generally a lot of companies have contributed to almost every major programming language 
they did, but nowadays their contribution is shadowed by those
those 3 I listed are among the top contributors
notably ibm and its Eclipse foundation
so im trying to buy a pair of tires online
at first the shipping was 28 bucks
when i tried paying, it errored out
went to pay again and the shipping was now 74 bucks
went to complain on chat support
they offered me a 3% discount
went to apply the discount, the shipping changed to "unfortunately we cannot deliver to your address"
goan fuck yourself
welp, somehow the pair of tires i wanted got bugged out, ended up buying a different brand and it worked lol
yup
FakE rude ik
Looks like nobody getting anything anymore for free
Still got around 80GB ram left, unused (yet)
You just have to do things for me in return
Deal? 
The first parameter is the old member, the second one is the new member
And you can check if the member had a role by the <GuildMember>.roles.cache.has() method
Yes
I really wish worker threads in js shared the same memory space
theres always sharedArrayBuffer :^)
I do know and was kinda of curious if I should make it so that the main thread shares buffers with threads which represents the stream buffer of audio sources so that handlers dont need to be initialized each thread which possibly incurs api calls
kinda defeats the purpose of worker threads though since the main thread would then handle all of the tcp messaging
I swear I'm gonna somehow make a system to share module require cache at the very least
xD
š
i have a shelved project which attempts to make a Map-like object based on sharedArrayBuffer
but its really hard to accomplish, so i kinda paused it
I can imagine
need a better serializer
but then i also paused my serializer
because i need to work on my actual financially viable projects
but then i also dont work on them because im a lazy bum
how much money do you make and how much do you need to stay afloat btw?
if you're willing to disclose that is
making about 150 bucks from donations and sponsors
which is barely what i need to stay afloat lmao
damn
im not paying rent right now, but in exchange im helping my mom build her house
basically construction work lmao
#SponsorTim
actually a good idea, instead of typical OF content though just have people submit questions for a price.
hahaha
I would pay for that ^_^
OnlyTims
damn, could've been a gold mine
tim you should freelance things for people
there's a lot of people out there that'll pay ridiculous amounts of money for codebases that you would be able to make in your sleep
What about programming bounties?
I feel like you could do some pretty high paying bounties within a few weeks.
how can i optimize my bot, to work with less ping
"how to solve world hunger"
Ping generally is a network issue not a code issue.
unless the code is so so slow
oh
not really within your realm of control, unless you are willing to move your VPS location closer to the discord servers
ping rarely matters for normal bots anyway
command processing time is 99% of the time between command and response
any option on the client, that can help?
Id suggest learning about Big O notation, then best practices(books, college, getting more experience).
Also, just writing the code in a few ways then benchmarking them.
I still need to learn how to properly benchmark things
thats very complex
Like microbenchmarks
Unit testing is a big thing that helps when writing programs
(Just development in general)
I've not done proper unit testing in so long. yikes š
I hate unit testing in any language that doesn't have it built in
Rust is a blessing in that manner
just smash things together and hope it works approach works for me
where is your bot hosted?
As simple as doing ```rs
#[cfg(test)]
mod tests {
#[test]
#[should_panic]
fn test() {
panic!()
}
}
it's amazing
its located in NA
but it has aprox. 150~200 rate of ping
which part of NA?
150-200ms is pretty good
i guees
you're not playing cod, its a bot
for rest latency is ok, but its not ok for websocket ping
so true
My rest ping is 200ms, gateway is around 70ms
can i send ss here?
Sure
afaik discord's gateway is in new york
its not so bad
ping is mostly noticed on music bots
Thought it was in cali, granted I believe my VPS is hosted in virginia, so that would make sense if it were in ny
Even then 200 ping on music isnt that bad
optimizing ur code flow is almost guaranteed to have a huge impact on "perceived latency"
really depends tbh
i mean sure
but
fluctuations of 10-20ms in your code are nothing compared to fluctiations of 100+ms that regularly happen on the internet
granted most discord bots should be way faster than that, most commands should take < 1ms to execute, excluding database access
Join the Fireship Discord Server https://discord.gg/SpDdJ3qaKK
Learn how to build your own discord bot from scratch with JavaScript and deploy it to the cloud in this beginner friendly tutorial.
#javascript #discord #tutorial
where neck
is there a way to get channel where webhook is made?
it's in the url no?
the webhook get request includes a parameter for it too iirc
also, iirc that's a webhook id instead of a channel
ye it's an id, the GET request to a webhook obtains the channel id
does .catch or try{}catch{} stop the function from running?
You guys are so smart and iām amazed
This channel is for bot development (i.e. programming bots), so if you need help with that, yes. If you just need help with a certain bot, you may want to check #support or if it has a support server.
Neither stop anything, they just protect the outer scope from being crashed by the inner scope
how can I stop the function without stopping the enitire process?
Think of it as a sandbox, regardless of what happens inside, the outside will run (unless u explicitly return/break/continue)
Return
return stops the current scope and return a result (void is a result)
break exits the current scope, must be either a loop or a labeled scope
continue stops the current iteration and go to the next one, if any
There's also goto, but we don't talk about goto
No
Bro I can't tell you
Why did u even bring the topic again then?
I know nothing about this I just want a PokƩmon server can anyone help?
@ivory siren
-b 733313286891896883 posting inapt links, compressed account
wenomacha 4#1567 was successfully banned.
-ub 733313286891896883 compressed account (soft ban)
lovely pfp though 
wenomacha 4#1567 was successfully unbanned
compressed account ah yes , a little bit of compression š§
i compress you compress we compress
omg I can't believe Fireship is using Detritus
true
i literally have $0
š
For someone who got his bot verified recently. How much time does it took u to get verified?
discord or topgg?
topgg varies between 1-2 weeks
discord is hard to say, but somewhere around 1 week too if u dont request privileged intents
can someone help? getting this error for this code
stupid question but how can i access the value of "checker"
It has to be in scope to be accessed.
So you could move it out of the function so it can be accessed in the outer scope
You could also restructure your general code
Like returning checker from a function and using it like so
how can I use the integrated mute function in discord? (discord.js v14)
fixed it! thanks sir
hi
im talkin bout this
You can timeout a guild member
Make sure to fetch the guild member before since not all members are cached at any time
am i fetching correctly?
oh, forgor that
also why are u doing user.toString()?
bad experience not doing it, now doing it just to make sure
cant u simply do user.id?
this is also really bad for a command where the user expects a response
yes, thats temporary
inb4, don't await the fetch
Maybe you should show us how you got the user
use .then() chain
I feel like it could be wrongly as well
const user = interaction.options.getUser("user")
And user is a required option?
Ok then
I reinforce, dont do
const member = await ...fetch(...);
const result = await ...timeout(...);
do instead
const result = await ...fetch().then(m => m.timeout(...));
Not needed I think
The user option guarantees to return a valid user if Iām not wrong
not needed yes, but better than having many awaits for stuff that could be chained
plus u dont need to repeat .catch() for every step
no :c
Async await is good
Callback hell is bad
Use try catch blocks and await your promises
Then youāll never have problems
that's not callback tho
.then is a callback for when the promise resolves
Well thatās what you do in your command handler, since the member/user is guaranteed to exist here, you would simply need to catch the timeout promise
