#development
1 messages · Page 1645 of 1
Yes
so mine are all null
Anyone has used to uses aws for bot hosting?
amazon web services i mean
how do I prevent this from happening
it tries save too fast but then it ends up not saving for one of them because of it
like, it tries to save a version that has already been changed elsewhere
it's mongoose, and the issue is that it's trying to save multiple times quickly, causing it to save one version, then the other one that came before the first one saved, tries to save but fails because there is a newer version saved than the one it originally optained
why are you trying to save multiple times really fast anyways
just save it all in one go
level stuff
use caching to reduce db write
that I don't know how to do
with a redis mongoose cache layer
OK not rly coding related but I wanted to know the term for when the source code isn't free like open source but instead is provided if a user pays, let's say, £10. Is it then closed source still?
i mean its technically their code then
yea this is a weird situation
expalin further
theres a difference between providing a service, a job and code
the former would be you providing a service>
in this case, you provide a bots functionality for example, you host it, you write the code, and the user only gets the functionality out of it
the second, a job.
they hire you to work per hour, by the end, the code is the company with your name in it
the latter, you simply write them the code and sell the intellectual rights to it, they do whatever they want with it afterwards. be host it, modify it, whatever. but the code is theirs, you got no rights on it whatsoever
agree
even if you created it
they may or may not choose to even cite you as the one who made it
its theirs, period
as an example
the first would be something like dyno
they use the bot
thats it
hosting, coding, fixing, all up to you
you only offer the fuctionality of it
the second would fit into an actual job where you're paid per hour and in the end, the source is company's rights
the latter would be making a bot per request
I offer the source code of my bots to people who pay a small amount however it is always free to use for others using the hosting I already offer. Yeh idc about credit and they are responsible for fixing ect if they use the code themselves. Its all enthusiast so I do it all myself
you code it, give them the code, and then wash your hands
no problomo


how can i find who is the server admin through the console?
the discord console
this one
lol
you shouldnt be using it like that tho lmao
fairly certain you'd need client mods to access internal libs
server admin?
i assume they mean owner
yes, owner
but why?
like we can get the account made id
why?
curoiousity
That sounds like it'd be against tos
do not do it when you do not know anything about it
im fairly certain you can use your own token on the API endpoint and fetch guilds/ endpoint
but i would highly disencourage that
oh, ok ok
leak your token account and you'll have a lot of trouble
why do you tell them lol 
ik that
i added discord extention to VSc and it asked me for the token, so i went and read about it
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
and they said no
again
i recommend NOT doing that
this is usually used for bots, but can be used for users too
general rule you shouldnt be doing anything using your user token
do It, then we do not have to see you here ever again and nothing more to non-star 
Repl. It is not a good idea lol for hosting
Ur gunna get rate limited to hell
Cause everyone is using the same ip
they already have the up to date version
repl works fine for small bots
i doubt they do mesiter
i cant log into my dashboard anymore
Great way to get your token stolen by a 3rd party that will then spam on your behalf and ban everyone on your guilds.
ok ok, thank you guys to help me, i shall never forget you sll
I keep getting this error, does someone knoz what i can do?
if they are using node 15 likely 90% of bots out there would crash
cuz node 15 now crashes on code 1 on ANY unhandled rejection
or uncaughtException
ANY
you get one error = bot crashes
but when you catch them?
so i absolutely doubt they are using lastest version
as it should have been from the start with promises 😛
bold of you to assume people who use repl would be catching errors
indeed i agree with hind
can anybody help me with quart-discord?
it keeps looping in auth
like when i auth, it doesnt auth
and sends me to auth page again
why didnt they check my bot yet
because you're impatient
The wait time is 2-3 weeks
im waiting now like 4 weeks
i have other bot
which one
au
Only bots I See, you added less than 3 weeks ago.
23rd => today = 16 days, certainly not "more than 4 weeks"
Really wish people knew who to count calendar days.
when u got the badge
over 6 months ago, since it's no longer given
Because kids were spamming the queue with shit bots just to get the badge.
how dare you rain on their pity parade? 
ikr! how dare I correct a raging karen 😛

#memes-and-media @junior fjord
hi Erwin
its not a meme
its media
yeah I don't know what that image is supposed to be telling me.
hi million
its arthur
im not doing that
well, up to you, dont come whinning when a mod tells you
Then stop posting images when reacting to people. Use your words.
regardless, complaints about queue should be asked in #support not here, even though they'll likely yell at you to be patient
humans again
troll spotted, stopping feeding
Yes, we're meat popsicles but at least we know how to count.

i'm a meat popsicle?

idk about a meat popsicle, but im a ghost driving a meat covered skeleton made from stardust riding a rock floating through space
coool
no you're literally a drunken developer
i told you, stop throwing truths at me, i dont appreciate it
oh im sorry
Accept the truth and live with it
drunken developers are the best ones tho

@opal plank how did you do that join discord
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
help, docs are terrifyingly bad
lmao
or im just stupid
definitely the latter
i get it but dont at the same time
bold of you to assume even if i were to spoonfeed you code it would work
lmao
can i see the complex spaghetti
nvm imma read docs
its too spaghetti innit
try to use 200% braincell
nah its too spaghetti
just find some of my code
I got you covered
if I wrote php that would be my code
lmao
God damn that picture is old
php moment
haifelsen!
Thanks for reminding me about how bad PHP gets
here , some pearls from me @pale vessel @crimson vapor @quartz kindle
https://cdn.discordapp.com/attachments/688416503120396299/768137828986912798/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/801827848725200946/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/792789174042099732/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/791090756441866310/unknown.png
https://cdn.discordapp.com/attachments/655288842433200129/747330215344209991/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/787760323640688660/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/777496593138057217/unknown.png
https://cdn.discordapp.com/attachments/655288690192416781/708356643297165312/unknown.png
There's actually a new method in PHP 8 called match
You could theoretically shorten that code to maybe 4 lines now
I'm in love with match
It's the one thing I don't think other languages support built-in currently
we can say you've got "a match"
we can say that
rust has it
I remember that perms one
Oh?
too bad discord doesnt load all the pics
gotta open in browser
but i assure you they're all bad
Discord embed moment

Dude account systems in PHP are messy
I hid my old code
jesus christ what
lemme see if I can find it
or post them in chat to embed them
My code doesnt work, this is what it said
-bash: node: command not found
Any idea?
aactually yeah, fuck it
here
https://cdn.discordapp.com/attachments/688416503120396299/768137828986912798/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/801827848725200946/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/792789174042099732/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/791090756441866310/unknown.png
https://cdn.discordapp.com/attachments/655288842433200129/747330215344209991/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/787760323640688660/unknown.png
https://cdn.discordapp.com/attachments/272764566411149314/777496593138057217/unknown.png
https://cdn.discordapp.com/attachments/655288690192416781/708356643297165312/unknown.png
that was pog tho
Most php devs be like
"Yeah I preg match all of my input variables, so what?"
the raid shadow legends
Bump
Weekend is?? 
True
yeah i had to typecast all that shit
Ouch
thats what you get for using ts
shush cake boi
:^)
Sooo any fix for the output?
https://million.is-a.computer/files/Y1PIDmfONmhP2mwa.png not gonna show the code
but this happened
dunno, looks like node isnt installed
is ts
But the thing is node is installed
Non enum moment 
enum for the weak 
i should've used enums for that for sure
Drunk you must've felt proud for that one LMAO
How can I do this?
By coding
come on erwin
absolutely
say the thing
@vestal stirrup SDK
pog
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
wbat the fuck
And this is why my embeds are JSON imports 
Embeds take up too much space in my command code
embed builder trash
I guess i will try to reinstall node
send the object directly
No need to hunt through your commands
its much better
Eh
both in performance and readability
I didn't know how to use a command handler
so all of the cooldowns were pasted in the commands
Mine uses slash commands so you can't copy and paste commands 
No need for cool downs at that point
imagine not having cooldowns handled by the lib cough cough detritus cough cough
Huh just add a timestamp of the last sent command to the guild cache
or use detritus which handles it for you 
pls use detritus!!!
its sad
does anyone how to make a second instance of my bot like carl did?
Whats detritus
imagine having to write your own cooldown handler when you simply add a single line for detritus
best .js library
@opal plank stop
make me ho
ok bitch
@crimson vapor so whats it
@earnest phoenix read past this #development message
ok when
those are just tip of the iceberg
thanks
no problomo
now, pull up
God damn adding a timestamp to the guild cache and check it within the message event is less work then including a lib and reading its docs...
So its better than Eris and discordjs and.commando?
ew commando
please, anyone?
For reference
imagine only handling ratelimits on guilds
a LOT
feel free to write your own ratelimit handler for channels, guilds, dms, im happy with my 3 lines 
shhhh that's enough
FakE lost on this one
@frosty forge i dont accept random friend requests
i call that being stubborn
its not even my lib tbh
dunno why people just dont appreictae and accept its better in every aspect
I am switching to it
shhh, too
i only advertise it cuz its good


let met get you the docs
Dont need to
I already bookmark it

http://detritusjs.com/ docs(i already spoke to cake, he'll improve them soon)
https://discord.gg/9beBCMAm (support server, they are always helping there, dont be afraid to ask)
https://github.com/cakedan/notsobot.ts/tree/master/src bot example with all good practices, notsobot code
@earnest phoenix
i need some help
@slim heart real docs for discord-rose when?
then ask here, dont go dm'ing users about support
github docs 
Do not @mention people randomly. its in the channel topic, this also refers to dm'ing users
yeah
pog no wonder its so good
how can I get a user by his id if I'm using commands.Bot and not discord.Client??
poor cake though, he got banned for submitting notsobot in queue in this server
why
u eventually got a few bucks for advertising? 
because notsosuper is banned?
oh
all users are male now
/s
actually good point gorl using discord is a myth
unfortunately no 
i just ad it cuz the lib is good
unironically
its too early to even begin to put up a fight
I swear I'm gonna call the IRS... tell the truth!
@slim heart add good features so erwin will switch
might be able to compete with d.js, but i doubt it'll be able to compete with detritus
even in a finished state
the way it is built is meant to be really modular
like the basic command handler is shit
but once you add the middlewares
so much more to it
i usually prefer to tone down the dependencies on my project, its better to have the lib handle all that
the reason is: if theres a breaking change, you'll be relying on other devs to port it for you
it creates too much dependency and removes a lot of indepedence from your own project
can confirm
yeah but thats not an issue if you do everything custom
or if you are using something built by the same person who make the lib
it is when you rely on other peoples work
say
for example
theres a middleware that adds slash commands support
then berry pushes a change
thats not how it would work but yeah ik what you mean
now im relying on not only berry, but the dev for that
it chains too much dependency on other developers
hmm
i much rather have a single lib with everything in it, then i just cherry pick what im going to be using, since its all in constructors it wont be using extra mem
with detritus 
use a set and add ID-GuildID-command?

and map it to what lol
,
hmmm
fuck
this works in queue iirc
so even ratelimited, it'll continue to work and not flatout deny the command from running
you'd have to implement a queue'ing system
with simple timestamps for the user id or guild you do check on the next message event
that would work for user ratelimiting
for guilds/channel/user you'd have to use 3 different ones
check user ratelimit => pass to channel check => pass to guild check => run
you'd cascade push them in sequence
hmm
stop making Erwin rich...
bet he's getting a $100 promo if you download the lib
fat paychecks
damn capitalism
ill download it if you give me 1/2 of that 100
lol
eval return 0 / 2 // 0
ty
and Erwins wallet is growing
imma keep this in a tag tbh
@crimson vapor http://detritusjs.com/ docs(i already spoke to cake, he'll improve them soon)
https://discord.gg/9beBCMAm (support server, they are always helping there, dont be afraid to ask)
https://github.com/cakedan/notsobot.ts/tree/master/src bot example with all good practices, notsobot code
pain
false
@opal plank this is berry's example https://github.com/jpbberry/shiro
oh, now that you're part of us, you're legally required to go at sunday morning knocking doors telling people about our lord and saviour detritus
you're allowed one cuss if they call you a Jeovah Witness
LOL
well i take my leave now to go buy food, i sent you the docs and support server invite if you have questions
im not gonna use it lol
does it have voice support?
i think so? havent used it tho
moment
ouf I'm struggling implementing function arguments in my interpreter 😩
rose isn't supposed to be a detritus competitor it's supposed to be a highly scalable production ready library it's not meant to be simple
so?
i plan on adding built in machine scaling eventually lmao
meaning?
you can scale a bot across multiple machines
@slim heart #810959583496634395 message
?
suggestions
hello everyone ^^, i was wondering if anyone knows if there a way to find the id of an emoji that is not custom? for example ➡️ ?
@rustic nova some guy spamming .'s in this channel check logs pls
the link
they're unicode they don't have an id
@earnest phoenix can you kindly stop spamming dots in here
thanks!
also what's the point if it's all just straight discord stuff
my docs are the discord docs 😎
hi
@opal plank pobnk

sa
Go to #general-int for turkish
What's the fastest way to concatenate two arrays in JS, without mutating any of them
[...array1, ...array2] ig
I go into my vscode and see this
You see... what exactly? What's the question?
Idk what happened? I get pinged here and then I check my vs code to see stuff I ddin't do
discord.js vs Eris?
Erwin: Detritus!!
What do you mean "you get pinged here"? Nobody pinged you here since yesterday.
And your VSCode is currently pointed to a file you don't need to fuck around with, honestly, so I'm not sure what you're trying to tell us or ask us.
kk
Million: Rose
million simps for rose more than me lmfao
😆
Interesting
weird that spreading is way slower
it would make sense .concat and the spread operator would have the same implementation
use discord-rose
weary
you won't because you're just bad
pog
Question relating to Environmental Variables (.env): Can .env hold tables with values? Example: ```
example={
example2="yes I love examples"
}
I don't think so
no
@opal plank
well technically... you could hold a json string
you can stringify a json but just use a json file at that point
You should use another file format, like JSON or TOML
but what's the point
time for a fun conversation
Whoa
Well, I wanted to organize my .env file better since it looks like I threw up all over it.
you should only use .env for sensitive info
rarely would you ever have to use an object type of format for said info
what kind of env are you talking about?
u can have all your normal non-sensitive info in a json or some other file format then combine the two at runtime
there's nothing wrong with storing sensitive info in any format as long as you're not sharing the file to the public
Indeed.
noice
so like what i do is have tokens in my .env and then i have a config.js that reads that env and throw them in the config as well
why
and then config.js can be public and it has all of the non-sensitive info
The basic .env file. I've been just thinking if it was possible to sort it by tables. For example: ```
ApiKeys={
YouTube="xxxxxx"
}
You cant use objects in env dude
ah makes sense
You can still use json in string
Well, I plan on open sourcing my bot soon.
?
do like berry
I am going to use .gitignore
you can make it public that way
Thanks for the info.
.addField("Members", ` ${message.guild.memberCount}`, true) .addField("Roles", `${member.roles.cache.map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"} .addField("Channels", message.guild.channels.size, true) .addField("You Joined", message.member.joinedAt) .setFooter(`Created ${message.guild.createdAt}`);
wot did I do wrong
How do I get an array of snowflakes from a Discord.js collection
you didn't close your template literal
collection.keyArray()
Member.roles?
[...collection.keys()]
uh thanks didn't see that
keyArray() caches it, but I don't think it matters
message.member.roles?
uh

Isn't the first value also a part?
[...collection.keys()] is also a valid way of doing it, it's just that .keyArray() caches the result
keyArray() is better
that's the only difference.
I just checked, it reconstructs it if the collection is modified
keyArray() caches because it's used constantly throughout the collection internals
It's only used in 2 methods, (randomKey() and lastKey())
keyArray() is fine but I don't think you should use collection.array()
what
but values instead
since it'll only refresh if an element is removed or added
so if an element is modified then it won't refresh the cache ([...collection.values()] is better in this case)
but I digress
thats just how maps work
.addField(`Roles [${guild.roles.cache.size(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length}]`,`${guild.roles.cache.size(r => r.id !== message.guild.id).map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}`, true)
Heh
you should be saving back a collection if you've updated it
but map keys don't get modified
yeah
it would matter for the values, but not for the keys
and ^^
you're looking at the wrong thing
what's guild?
uh the server?
which server?
god damn it
Omg
i'm trying to make them understand
I was expecting "the server the message is from" but I guess I'm not getting any of that


well I guess that's solved, anyway


Lol
Which is the better way to get actual ping?
let ping = Date.now() - message.createdTimestamp;
message.channel.send(Ponng ${ping});
2) ```js
await let m = message.channel.send("Pong");
let ping = m.createdTimestamp - message.createdTimestamp;
m.edit(`Pong ${ping}`);
2 works?
depends on what your measuring
message ping
then 2
whats bad about 1 then?
1 measures just how long a signal from you to discord and back to you takes
2 measures how long you till a message is processed takes
2 can be a little janky though
1 checks 1 way ping... ok
for me 2 is 1000 but 1 is 60
hi anyone know how I can modify my message.js to let it navigate into folders... because its getting excruciatingly painful to find each command now that i have like 20000000000 (exaggeration). My message.js: https://sourceb.in/afwInPErZC
so, on the jankyness of 2 is that it compares timestamps, which are not always accurate with discord.
so 2 can sometimes give negative numbers even.
I think 4 is better message.channel.send("Pong 0ms");
let time = Date.now()
await let m = message.channel.send('Pong');
let ping = Date.now() - time;
m.edit(`Pong ${ping}`);
it checks it according to system time
if your servers timestamp is diffrent than discords it will also be janky 👀
oh i see
they all mean different things
but something is strange about your pings prolly just bad internet
thats on heroku
makes sense
I am trying to get the ping which the user experiences for the bot
that's websocket ping, not REST
which is the most sccurate?
the 1st is ws half trip ping, the 2nd is rest half trip ping, and the 3rd is rest round trip ping
internet
why i said your pings dont make sense
oh you know what
no
2nd is half trip ws and rest
wdym?
because you're comparing the received message timestamp to the sent message timestamp
yes
so your ws ping is prolly just really bad which is why your ping is weird
not true
run the 2nd again
ws.ping is also the roundtrip for a heartbeat
you're either doing a lot of processing before a message is recognized or again internet just bad
100 is also a lot for a heartbeat roundtrip so it wouldnt surprise me
thats why I set message.ping = Date.now() - message.createdTimestamp before processing
which is usually 60-80
wtf
why would you do that?
that makes no sense
Date.now() should be much greater than 60 lol
yeah
that makes more sense
edited
server side what
idk man
server side
thats still 1/2 of the ping tho
createdTimestamp is based off the snowflake iirc
yes
ping is back and forth
yes
really its up to you what stat you want to present
thats why I am trying to figure out the best way
3rd might be the smallest but it might not be fully accurate
it doesnt really matter if ur roundtrip rest ping is 100 if it legitimately takes a full second to respond to a message
ctx.embed
.author('Pong!', url)
.color(ctx.worker.colors.PURPLE)
.send(true)
.then(msg => {
msg.embeds[0].author!.name += ` (${(Date.now() - time).toFixed(2)}ms)`;
ctx.worker.api.messages.edit(msg.channel_id, msg.id, { embed: msg.embeds[0] });
});```
thats what I do
server side
ok pog
inline reply pog
yea
use discord rose to get it /s
oh nvrm yeah created_timestamp is sent from discord not the snowflake
moment

update to 0.2.0 smh
so it doesnt ping
soon™️
Array.concat()
bruh
no
const newArray = array1.concat(array2)
lol thx

@slim heart still pings LOL
two same conversation in one day, interesting #development message
preference
*cough
idc tbh
u have ur 3 methods choose one
idc why its such a big deal
I actually have 4
its not like it actually pings anyone
LOL
you would have to alt tab just after sending the message for it to matter
flaze smells thatds why it apparently matters
LOL
smfh
or have hella shit ping
i'm telling you 4th method is the best and fastest #development message
I will stick with my pre process ping method
honestly
It gives very less ping xD
pog
i made a better version of my guide video showing users how to update the bots role and change the bots pfp. anone want to see and offer feedback?
yea send it
real?
should fit here
i added rolling summary at the bottom, re-captured it with my hardware capture card at much higher res and re-cut it
- I don't like the scrolling text, in fullscreen it was kinda distracting and confusing
otherwise its good
do you think non-technical users might need the scrolling text bit?
to explain what theyre doing and why?
I would say maybe only capture a part of the screen as well
is this the correct way to get memory usage?
(process.memoryUsage().heapUsed) / 1024 / 1024```
yeah 100% explain it but imo you shouldn't have it scrolling
the scrolling text is very hard to read for me
it just sends the post request to main domain, what should i do?
its distracting and especially confusing for people who are new probably
what if it didnt scroll?
probably would be better, its a big also imo
especailly in full screen
which I assume people will use to see everything
let me make a second one without the scrolling text
here we go... better?
hmm its ten megs smaller for some reason
LOL
yeah so thats great, will this be linked in a command or on like a setup page
if its a setup page, you could have screenshots with highlightingh
https://million.is-a.computer/files/Foumh1vIpIDNICPn.png something like this
its something i want existing users to see, it'll probably be a one off in an embed in !help for existing users or something, and also on a blog post
for new users as of a couple of days ago, the bot is invited with the correct manage webhook perm already
its a new feature i didnt consder i'd add when i made the bot last year so now i got like 76000 servers without this perm, encouraging them all to add it is a headache
less warning, more encouragement
yeah
messages via webhook are a lot less laggy
you are using it to "abuse" ratelimits?
and they can control the pfp and name easily on a per channel basis
nah they just seem faster
ah
probably because im in full control of it and can avoid the library
yeah
and i can send through several ips on my system that have different NICs
i have 2 nics and no teaming
but I expect that if you send the video with a link to a more in-depth guide, it should be super simple for a user to setup
especially since its like 4 things to do
yeah
and it can be split into two
first bit: "i'm an existing user and want to change the bots pfp"
and second bit after it: "i'm a new user"
new user is only the one step, go in change webhook 😄
yeah
if you will be using the same format as your faq, just link to different places
one being adding webhooks
one being configuring webhooks
yeah
if the bot has the right existing permissions it'll just make one on each channel a game starts on
just as my opinion, a video is always nice to have but its probably easier for a user if you use screenshots with highlights and explinations
but yeah this idea of using webhooks is pog
especially since it seems you can just use the other ips to make the requests
is it possible to do a request on ipv6?
i rotate my calls across all 5, respecting rate limits, with a multi-threaded system of ten queues
yeah so no need to worry about getting ratelimited
i threw 41 concurrent games at it earlier on test, hoping to get near the rate limit to test the new rate limiting code.... i couldnt
in fact the only place that got rate limited was my client, trying to make 41 channels 😦
I bet ravy has like 1000 ips
i do occaisionally get a rate limit 429
yikes
this is because the rate limit for webhooks is affected by other bots and automations on the same channel
in total, a channel can receive 30 webhooks per minute
@old cliff music bots use ipv6 rotation which iirc is built into ll
but thats spread across ALL webhooks, even ones that arent yours
so you cant know if youve hit a webhook till you try to send
at which point you just have to respect the headers and back off
I know
basically youre at the mercy of other systems
its even possible to do ipv6 rotation with ytdl
this isnt the case with standard channel messages
its actually super simple
@green kestrel took a break?
its a hidden feature
this is my stats for 24 hours
204 172228
404 173
400 42
429 10
500 3
502 2```
here ill send the pr roki made
the 500 and 502 may be from my system api, they go through the same scheduler
all you need to do in ytdl is specify the ipv6 in the miniget options
https://github.com/brainboxdotcc/triviabot/blob/master/modules/trivia/webrequest.cpp#L247
this is how im handling it, ive had to make some adjustments based on some feedback from the people on discord-developers server
well it kinda looks like javascript.... in the same way to an alien, a human being might look a bit like an ape
yeah ig you could say that
im sure if I sat down one day and actually took the time to learn the basics it wouldn't be too hard to understand
theres some low level stuff in c and c++ that are unlike anything you'd find in JavaScript, python, or even java
c# has some very slightly similar pointer manipulation stuff
a pointer is just a well pointer to the memory right?
if you work in unsafe
yes
but c++ has pointer maths
which iirc isnt a thing for high level languages
wdym by pointer maths?
so incrementing and decrementing pointers to walk memory, adding and subtracting pointers, dereferencing pointers and turning standard variables into their addresses and therefore a pointer to the variable
stuff like that
and the fact you can have references and pointers and references are basically just window dressing and a pretty bow on a pointer
ah
but the syntax is the same as making a pointer to a var and it's contextual
like if I put int &a as a parameter in a function it means an integer called a passed by ref
but if I do this outside a function parameter list: int* b = &a; it means a pointer to variable called a
not a reference to a
that seems so confusing
although internally they're one and the same
yeah I think some things are intentionally confusing
like with PHP it has decades of developer warts all over it
and about 4 different ways of doing anything
between functional, OOP, templating etc
lmao
I mean js has similar warts from its origins as a purely web front-end language but being newer it's less warty
well js doesn't know how to compare different types
js is great right now
ive heard TS is better
from my experience ts js quite literally just typed js
type safety is very important
yeah I agree
yeah lmao
how i detect missing permissions and request them to server owners.
examine channel permissions
imagine not having ambiguity safety
its complex though
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
oh its quite literally english
scroll down to the bit where theres pseudocode
you have to take into account the permission overwrites of the channel
plus your base permissions from your bot's managed role or at-everyone role
ads?
@rustic nova ads








