#development
1 messages · Page 1629 of 1
so if your "beta" bot is constantly going down or pausing, it wont affect the main bot where users are using it
as the name suggests, this is for "debugging"
vsc is only good and only good for hosting a bot that ur using to test
i dont have any users aside from in my test server if that matters
debugging is very important
then its fine
vps
the best way would be to buy a vps, something along the lines of $5 a month
No.
there is, but its shit
heroku and glitch
Not meant for bot hosting
and f1 micro or aws, but those need credit card
Glitch blocked pinging services so repl is the only good free one
those 2 i mentioned are good, the former is free forever
the latter is1 year free triaal
If repl fixed security, it would be 100x better
i would recommend NOT doing that
why
I had my token comprised when using repl
I would DM you if you want
i am so confused
go with famous and big companies for hosting, remember you are putting your token and shit on an unknown host
i personally never heard of Dynox Hosting
so im not gonna recommend that
New Hosting Service
the only ones i do recommend are the ones i listed
would making my repl private fix the security
once again, what i said virak
Anybody know how to fix this
@clever vector
Its my friend open
Embed field is emoty
Look the code first
your friend is fine, the issue is other people
When doing .addField(); the content of the 2nd statement is empty
i would not ever recommend going with a unknown or small vps
So you did something like
Look first
Is this a league?
?
message.author.displayAvatarURL())
.addField("Cooldown", cooldown)
.addField("Aliases", aliases, true)
.addField("Usage", usage, true)
.addField("Example", example, true)
I think there, If there is no cooldown, wouldnt it return " "?
?
you NEED both parameters
Did you check full?
the error is pretty self explanatory my dude
one of the filds you're adding is undefined
its clearly not related to that
Maybe here:
embed.addField(`${mod.name}`, mod.cmds.map(x => `\`${x}\``).join("** . **"));
}```
Maybe a module is returning undefined
same thing i sent to the other guy
Making the field seamlessly empty
check how to debug your own code
And. Repl replaces empty fields with "undefined" automatically
hence why its not as good as vsc
If I bought the repl thing that lets me make my repls private, would that fix the token security?
if you're gonna buy something, buy a vps
vsc returns undefined not as a string making the bot read it as " "
dont go with repl
No.
My token was still comprised
do you have a recommendation for a free vps? not looking to spend money rn
Thats when I stopped using repl
like i said, you got a credit card?
not looking to spend money rn
Heroku is the only "FREE" option but worthless
i never said you were going to SPEND IT
Ok dude
they require it for registration
why
He asked for if u had a cc
i got one yes
ask them not me
so u can get a FREE vps
ooh
or AWS, which is amazing, but only lasts for a year
just make a new acc every year-
good luck swapping credit cards once a year
@simple zodiac if you dont have a credit card you can use an empty like Visa gift card iirc
ahh true
just reading the embed thing it says 3 month free trial, is that related or no
f1 micro is free forever
you can read more here https://www.opsdash.com/blog/google-cloud-f1-micro.html
oh its telling me to enter a cc
https://cloud.google.com/free/ right here
Yep ^ I was about to post that-
remember, its FREE
it WILL run fine, but you must'nt write shit code
its free because its limited
so try to avoid doing expensive or REALLY poorly optimized stuff on ur bot
so im not going to get charged
im not going to answer something i already told you 4 times my dude
Is your bot going brr
yeah wtf
Hm?
or top.gg borked
cuz referrers are off
i mean, its unrelated to top.gg in a sense
the numbers im getting are directly from guildCreate from discord
so im seeing a surge in servers
Like maybe your bots invite cmd is generating the traffic?
broke the previous all time high record by quite a margin
could be
hmmmm
*visible confusion*
What is a "quite a margin"
Gaming
moment, indeed
yup
Not bad at all
it takes last lowest count in macro and subtracts from current count
We just kinda graph the total daily so we can see the growth.
We don't have a "Daily" log
Probably could do that tho
oh ya I see it
current macro is set to 24h
200 votes a day is super nice aswell
ironically thats within margin
not the guilds tho
its a bit above what was expected for this week tho
i was aiming at 170-180
based on previous growth]
2333 servers?
tho multi-purpose grows slower. Since you are based around a topic. It's easy to attract a fan base
4 months on the clock, but it wasnt public for a good month
so, yeah, 3 months and a half i'd say

indeed, multi purpose is super slow
Our growth came from our scrims FN command we yeeted a few months ago
since we connected to a fortnite client
but fuck that since api changes every updte
indeed
its annoying to have to maintain all of it
not fun
it at one point gave us $700 a month in patreon rev but like
no
not worth it
im on the edge about monetizing my bot tbh
That was at fortnites like peak tho
I mean, nothing wrong with that.
but idk, im kinda on the fence with adding anything freemium
Patreon could come with benefits if you want or just simply make it like a "Buy me coffee"
thing
indeed, but that falls under donations
it would be mainly roles or something else to support
nothing that would add currency or the likes
Pls porn
you tried
not the server nor the channel for that m8
☝️
I was kidding gtfo...
I was developing a joke????
🖕 🤮
unfortunately not
frontend is not my area, but i will need one in the future
I used wordpress for ours ngl
bec not good at frontend
I'm not bad at top.gg bot page design but
ya not full on website
i did work with websites before, but im not confident in making something that'll work on this scale for the bot
its more me refraining from starting something that is not going to be at an acceptable quality for a bot this size
Gotchaa
I work in the video production scene so maybe we could work on something for your bot if your ever interested. 😉
always looking for help
code wise im fine, but theres a lot of contribution when it comes to sourcing
noice
i got API devs, forums devs, wiki devs, artists and a bunch of other people helping on this bot
they dont touch code, but they provide the data
I'm decent at trailers n things. Coding, I'm like a little better than that one duder who gets flammed here 
if you interested in that i can dm you todya/tomorrow
Sure.
i always take every help i can ❤️
How to make a link like the text is click here to join server and when we click on the text it redirects us to the server.
like link inside text.
ok
does it work here.
some fields dont work, keep that in mind
title doesnt work(only author), footer, and some other
Yeah
np
the most u get charged is $1 which is refunded after a day, it verifies a valid card
unless its apple. apple holds $0.08 for a week
Hi, how can I check if a user who ran a command doesnt have a certain permission in discord.js? I want to make a command that only an admin can use, how could i do this?
if (message.member.hasPermission("ADMINISTRATOR"){
//code
}else{
//code
}
Does that mean I csnt use it because all my commands have footers?
@river panther you forgot )
you can its just not gonna resolve
Oh I see
oh sorry
@river panther can you come to my dm pls
@river panther dont spoonfeed him btw
how do you know what he asked me?
@earnest phoenix
answer me ;-;
is someone good with css?
.main {
font-family: Poppins;
text-align: left;
border-radius: 10px;
font-size: 20px;
font-weight: 300;
background-color: #353535;
padding: 15px 48px;
text-decoration: none;
}
.about {
text-align: left;
font-size: 30px;
color: white;
}
.yt-video {
box-align: right;
border-radius: 10px;
background-color: #353535;
padding: 15px 48px;
}
cause this is my code and it looks like this:
but i want that the boxes are side by side
display: inline; might be what you're looking for
Try applying it to .about and .yt-video
okay wait
didnt work
.about is only the word "about"
its another div class in the div class "main"
Ah
but both didnt work
Could you DM me your HTML?
yep
hm
You want the youtube video to fit the about box?
(node:36) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:36) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:36) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```Uh
Umm why isn’t this working on embed.
close with )
There’s also a line below and it closes with )
value: "[Join](http://dsc.gg/FG)"
``` this is my code
That’s same but except the link,
ah I use another style of embeds
I use this.
is there a limit to this thing
because I did twice already in my code and it’s working
But it doesn’t work in this embed
client.user.setActivity(`in ${client.guilds.size} servers! :tada:`, { url: 'https://www.twitch.tv/ItsIsmailZ', type: 'STREAMING' });
``` "undefined servers" 
it doesn’t work in field titles
.cache.size
And the method is called addField() not addfield()
ok
thanks!
${client.users.cache.size} doesn't work (only say 20)
not all users are cached
And how to cache them?
memory go brr

caching all users would fucking murder your memory
so you reduce guilds.cache
guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
Hmmm
None of my commands work
But bot is running and online
(But there's some text that comes over n over again in panel)
what is it
My script can I dm it to you?
no
what site should I use than?
just tell me the output
(message.txt)
I’m on mobile
oh
(node:36) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:36) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
``` (a part of the spamming bug in panel)
this too?
well you’re sending something too long
@misty sigil and this
make it small
guilds.cache.size
after discord.js v11, they relocated it to the bot cache and tempfiles hence property cache
why you are on pc
solved already
now this :/
becayse yes
help meee you can see it u on pc
bruh wait
epic game presence @river panther
k
whats your code?
full code?
would be better yes
Ima dm
ok
Can't I get server owner data without (exp guild.ownerID) presence intent? i have server members intent
Anyone else?
if (message.content.toLowerCase().startsWith(prefix + "avatar")) {
const embed = new Discord.MessageEmbed()
.setTitle("Your Avatar")
.setAuthor(message.author.tag, "https://cdn.discordapp.com/avatars/643091174243958814/9ec6fc0169e8c4658d87765b1d663efe.png?size=128")
.setColor(0x00AE86)
.setDescription("What a wonderful picture.")
.setImage(message.author.avatarURL())
.setTimestamp()
.setFooter(':copyright: Its_IsmailZ#8826')
message.channel.send({embed})};
``` How to edit this to make it available for tags (eg. !avatar @onyx cloak)
the error is telling that the embed has a invalid form, did you put in a text over 2000 characters in the desc?
which description?
show me your full code
Why doesn't the error say where (line n°) it is?!?! UGH
its a api error, you sended a request to the discord api/gateaway and the error is the response
ah and how to fix?
your code is ♾️ , make it smaller with files
I know but I can't
I am new (noob)
you could learn how to use command handler
its easy, you will not come around
some friend is doing it for me rn
(I hope he doesn't get mad of the big 1234 lines script lol)
thats not the solution
the docs
no
if someone does it for me
and I see how he has done it
Than I understand
If you tell me, I will listen. If you show me, I will see. But if you let me experience, I will learn.

you're in the wrong channel
aah where should i send it?
have i got something really badly wrong here or?
i cannot deposit any currency and i think i have some math wrong, second pair of eyes would be great...
Note: stash.balance is the database reference for the stash, amount is the deposit amount and limit is a variable which changes based on level
var amount = args[0];
if (stash.balance + amount > limit) {
return message.reply(`You can only store ${limit} in your stash right now, go level up your HQ to store more.`)
}```
Does anyone know how i only show the Lvl in a channel?
You're welcome
A second option would be to install java and gradle in ur vps then execute the code directly
It'd speed up deployment since shadow takes some time to generate
Anyone know how to read heapsnapshot on Chrome? Like I don't understand it at all, so confusing
Yeah i was doing some testing running it directly on gradle but so far using only shadow is doing the job
I'm currently trying to solve this other situation now xD
I don't understand why you would open a stackoverflow thread for something like this ngl
everyone does their own command handling so there is no standard multi prefix
if you don't know how to do logical ORs you should probably learn how to work with your language before making a bot
I thought there was that is why I opened it, at least based on the altprefix i found on JDA
ah
I wanted to do something more clean based on the API instead of just making a work around 😛
From what i understand, youre looking for a simple dual prefix setup right?
Then simply put both prefixes in your env
And then check if message starts with one OR if message starts with another
if(message.startsWith(prefix1) || message.startsWith(prefix2))
there's no integrated way of command handling in JDA
which is good don't get me wrong
i cant make any sense out of the heapsnapshots TT help
:c
idk why djs permissions array never get GC
Damn permissions are taking up a lot of space
i mean, when the function finishes, the garbage collector should collect them
for every message there is a +5 new things in memory
which is not being GC(garbage collected)
which will eventually lead to crash
for some messages, it create 33 new things
and none of them got deleted after the func finished
why is it still stored in memory
bruh
it literally has every content someone would type
and why is it global tf
its literally dumb
2 heap shots. like bruh, the message keeps growing
wtf man
i have a 300mb heapsnapshot because of this wtf
thank god for this
hope this solves my problem
;_;
How do I set the emoji code from famry's discord bot GDPS?
Use discord.js-light if you want less memory footrpint
What the hell is that
you are coding your bot in php and on mobile? savage
Yea I need to set the emoji code
This is the developer
https://github.com/FamryAmri
your bot is not in the guild where those emojis are at
thats how discord.js is designed to work. it caches all data it receives. got a message from a member? check if member data is cached, if not cache it. did someone create a new channel? check if channel data is cached, if not cache it. thats how discord.js works lol
thats what enables discord.js to have everything available to you when you need it
discord.js is a general purpose library with a shit ton of features
but no, its not a scalable library, precisely because of this, many of its features have high scaling costs
djs is fine for something like a private bot and you want it up and running quickly
if you're making something for the public, i firmly believe you should just step away from node in general
i believe node is fine, if done correctly
it really depends on knowledge imo
there are a few scalable libs in js such as eris
you're not wrong but they have tradeoffs
everything has a tradeoff
API wrappers shouldn't have tradeoffs
they're created solely for the lone purpose of making the API interpretative through whatever programming language you're writing it in
the moment API devs offer leniency on their stuff is when things can go downhill very quickly
well djs, for example, trades off memory size and scalability for ease and less requests. Other libs such as d-rose allow cache to be configured but api requests need to be done manually and the data isn't turned into a class
d.py is not scalable lol
neither is eris
being scalable needs at least cache configuration
unless they are on custom lib atm
if you dont have cache configuration, you are by definition hyper-bloated
which is not scalable
since when
so you would say discord-rose is scalable? @quartz kindle
can you make discord.py use 100mb ram with thousands of guilds?
I cannot say because I have not achieved that yet
it could be, but its still under construction no?
its basically done
well ive never seen it, but i dont use d.py myself
Hello dare, i have a question who can help me whit a discord game bot?
okay but cache doesn't always mean full memory optimization though
berry needs to add some quality of life features but so far its basically done
i don't think that's a fair analogy
well, my definition of "scalable" is something that can grow exponentially while keeping resource increase logarithmic
aw man
No body 😄
i dislike arguing semantics of how something gets defined
if your bot doubles in size and your resource usage doubles as well, its not scalable
not everyone will agree with the same concept even with a mutual sentiment established
if you don't ask the question noone will say "I can help with that"
thus why i always follow just the mutual sentiment and not special definitions
idk if I agree with that but 100% resources should not double when size doubles
^
Hahah sorry,
logarithmic doesn't make sense tim
a bot with 10k guilds should not use 10x more resources than a bot with 1k guilds
which it can't
frankly impossible
i used the wrong term then
yea
but you get what i mean
mhm
I have maded a game like * retro habbo * i will instal a bot when a player plays in my retro hotel then the discord accoutn says * user 1 plays retro hotel *
i don't think things double up with d.py or d.js as the wrapper alone
half of the scalability comes down to the developer
they may not exactly double up, but they do increase in a proportion that is way too large to be acceptable
if someone is doing some stupid shit in their code then ofc it's bound to go up in mem usage
but what do we define as an "unacceptable margin" of increased memory usage that says it isn't scalable?
there isn't actually any clear consensus on that
if you launch a discord.js bot with no code except the lib itself, and it jumps to 500mb ram with a few thousand guilds, that is a scaling problem
https://million.is-a.computer/files/P3EvpurBXgs6HInM.png something like this makes more sense
no thats just discord.js
I have maded a game like * retro habbo * i will instal a bot when a player plays in my retro hotel then the discord accoutn says * user 1 plays retro hotel *
definitely no
the wrapper alone should be able to sustain low memory usage
exactly
that's what i'm also getting at
use webhooks
i can try running my bot in a barebones dpy and test
libraries aside, node.js is generally faster than python because of it's event-based architecture
python is quite a low bar tho
how?
can i connect you at pm for more information?
no, but if you made the game just make it send a http request to desired endpoints
like, just search "how to make http request in X lang"
and make a webserver so the bot listens to it
basically the same process as top.gg voting webhook
thank you
hey how to make a command that gives you the bot invite link discord.py
i logged in with a barebones discord.py and it takes 400mb ram
what the fuck?
those are some meaty bones...
oh wait on your bot token?
yes
let me test eris
@quartz kindle you should also test discord-rose tbh
I'm having trouble installing the npm packagae color-thief.
no clue what i need to do here
sounds like color-thief should bother pointing to the cnavas installation guide
but they don't
eris: 458mb
Wait, i have canvas installed already
Installed it without any issues.. lemme look into it
are you testing d-rose and ditrus?
how long did you test it for?
but i guess its expected since it has less features and structures
my bot starts at 70mb but goes down to 20 later
later being like 3 minutes or something
ye
do you think you could try with the options I use?
no messages
intents: ['GUILDS', 'GUILD_MESSAGES'],
cacheControl: {
guilds: ['name', 'description', 'preferred_locale', 'unavailable', 'icon', 'owner_id'],
members: ['nick', 'user'],
channels: ['nsfw', 'permission_overwrites'],
roles: ['permissions']
}``` these are the options I use
could you try with that?
ight installing node-gyp... I just hope it works after the installation
224mb
Has anyone made a simple html interface that could be used for creating slash commands easier than manually doing all the api requests 😄
Seems like something that surely someone has done 😮
yeah
you should just js setInterval(() => { console.log(Object.entries(process.memoryUsage()).reduce((T, [K, V]) => (T[K] = (V / (1024 ** 2)).toFixed(1) + 'MB', T), {}) }, 1000 * 15)
its gonna be the same thing anyway
plus the heaps will be wrong because it will only show process heap
true
ive always just used process stats since any overhead for js would be for every lib
currently sitting at 232mb
8k
oh so 1k per shard
ye
right discord prefers 1k per
I really wish discord could have a token with tons of fake guilds to test stuff like this
well its not hard to bulk generate random objects
true
you could technically call the guild create event with a set of fake guild objects
How do you start creating a discord bot on Python?
but the real memory stuff is when you get events constantly right?
thats why presense is so bad?
install discord.py with pip
presence is bad for cpu, not necessarily memory
even if you ignore presences, you still need to decode/decompress them
before you can know what type of packet they are
What was the code for installing discord.py?
pip install discord.py
oh right
or py -m pip ... or python3 -m pip depending on what os 
not in REPL
Wats wrong with repl
do exit()
I did
What do I do about 429 too many requests
Im on windows 10, python version 3.9
nothing? It's just not how you would install a lib
stop sending too many requests
I didn't but now my bot won't start
I've tried many different commands
My dum friends spammed commands
they are not talking about repl.it if thats what you think
what does it say?
close the cmd window and open it again
Many times
I told you, do exit()
I did
You're not supposed to do it in REPL
Then went back in
dont do python
Where am I meant to do it?
if you type "python" you will enter REPL mode
you have to type the install command in cmd
not in REPL mode
Literally the same command
you have a circular dependency
show the full error
How do you get to cmd?
¯_(ツ)_/¯
cmd = command prompt
429 too many requests (error code: 0): you are being blocked from accessing our API temporarily due to exceeding or rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Hmmm yeah... too many requests.. I wonder what that means 
Maybe it means that they send too many requests
is that all it says? is there no more information?
There should be a stack trace usually for this type of error
Their "punishment" for this is increasingly long for each time this happens
So it could very well be you failed to heed it many times and it got really long?
¯_(ツ)_/¯
Idk
You don't know if this has happened in the past?
there should be either a timer in the stacktrace or a retry-after in the headers
File "main.py", line 508, in <module>
bot.run(os.getenv('TOKEN'))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 718, in run
return future.result()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 697, in runner
await self.start(*args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 660, in start
await self.login(*args, bot=bot)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 509, in login
await self.http.static_login(token.strip(), bot=bot)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 293, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 209, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
did you try to login on a crash?
Normal ratelimits yes but not "you've been temp banned from the API"
dpy should probably provide header information lol
let dUser = message.guild.member(message.mentions.users.first()) || message.guild.members.cache.get(args[0]);```
How would I allow this to take ids as well?
At this point it's not just a normal ratelimit it's literally that the bot or IP is temporarily banned
wait why does dpy request /users/me at login?
ive got locked out once bcs ive attempted to reconnect when the connection where lost, or the process crashed, some bug caused the bot to attemp to login 600 times in 1 hour, after ive added a cooldown to attempts and added a max number of attempts it goes all fine now
to build ClientUser ig
clientUser is given by the gateway tho?
That should 100% take IDs as well, because of the second part.
it doesnt tho..
Well it should. What's the issue you're getting?
Well sure, ok, for what command is this?
a simple modmail command
if you want a user, sure
Right so you could just get from client.users.cache then
you dont need the member object for that
but if they arent in server then iut doesn work
ok
client.users.cache.get(args[1]);
?
also, you should probably fetch it
why did that turn into args[1] instead of args[0]? lol
i changed it rn xD
I am making one
Well sure then if it's your second argument.
Yes
should be good
actually no clue, it ignores the data returned
so apparently just to check whether or not the token is valid, but shrug
ok so what error do you get?
lol weird
Can you show us the current code?
like the whole thing
yes
the actual dm
and the receiving
https://gist.github.com/EliteHaxy/d1ef060209d3b07e79d00dbc8a1e3b80
the receiving works fine
its the dm that doesnt
you're still trying to use a member
huh
let dUser = message.guild.member(message.mentions.users.first()) || client.users.cache.get(args[1]);```
message.guild.member()
lol no the problem is this
if (message.author.id === '756289468285190294'|| '557016470048210964') {
That's not a valid condition
that would cause a different error message tho
would it? that's "I can't find that user"
oh
yes, which is from if !dUser
its suposed to be so only me and my other dev can use the command
yes
ok
how could I say the comand will only run if the message.author.id is mine and my dev's
https://js.evie.dev/conditions for more information on conditions and combined conditions
and second your user should be message.mentions.users.first() || await client.users.fetch(id)
The second thing is, I'm pretty sure, like, pretty damn sure, it's args[0]
read what evie sent
you didn't fix it
no I changed the === to = but thats wrong
no 
so i changed nothing
read the link I sent
Not closely enough it seems
https://js.evie.dev/conditions please pay attention and read carefully
const myName = input.name || 'No Name';
const text = hasDetail(input) && User Message: ${input.message};
like that
Did you just skip to the end and pretend you read the page
this isn't a test. the answer isn't at the end
this is a page that tells you how conditions work. read it. The whole thing. Actually read.
Still not getting it. read the page.
Stop mashing at the keyboard randomly and actually read the thing
lmao
smh
bruh I literally did read it
you didnt
No you skipped to the end, copied the last bit of code, and tried to randomly change things
hey hindsight, in the md, it said this
Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using the "Desktop development with C++" workload)
i've installed it and i'm not sure how i need to follow the next step... And i did npm install -g windows-build-tools 🤔
that's not understanding conditions, ytou clearly did not read the entire thing. Read it.
if you had, you would see this
yes I did see that. i made it a variable and not a array tho
can someone tell whats wrong, i did /ping but the bot is also reading /echo
you need break; statements in a switch/case.
oh god i am so st00pid
you made it a = 1 || 2
ffs
thats not the same
What you did was make devs equal to '557016470048210964'
ok
also, is there any way i can integrate slash commands in my command handler?
const devs = '756289468285190294'|| '557016470048210964' // devs is now '756289468285190294'
if(something === devs) {
// will only work if something is '756289468285190294'
}
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
wairt
still wrong
if(message.author.id === ["756289468285190294", "557016470048210964"].includes(devs)) {
means
if(message.author.id === true) {
it's getting wronger and wronger
lol
I do
One message removed from a suspended account.
tem help ;-;
const array = "values"
if message.author id = (array)
You've got your #general channel confused again 😛
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
idk, no reason to xdd
One message removed from a suspended account.
would this work?
One message removed from a suspended account.
One message removed from a suspended account.
its getting worse and worse lmao
stop skim reading and actually think about what you're reading
you can use arrays for a large amount of comparisons, but you only have 2, so you dont need it
you literally just need to compare 2 times
thats all
look
One message removed from a suspended account.
simply going over the whole article as fast as possible is basically just not reading it in the first place 🙄
You just needed the "Combining conditions" section
don't spoonfeed, they will never learn
One message removed from a suspended account.
One message removed from a suspended account.
if(a === b || c)
is the same as
if( true or false || true)
the second one is ALWAYS true
because there is no comparison
ohhh
One message removed from a suspended account.
One message removed from a suspended account.
you didn't which makes it a bad spoonfeed which is worse 😛
One message removed from a suspended account.
One message removed from a suspended account.
can someone help me now?
One message removed from a suspended account.
const devs = '756289468285190294' && '557016470048210964'
probably wrong
One message removed from a suspended account.
One message removed from a suspended account.
^
One message removed from a suspended account.
elemphahoh
that question is too broad. there is a way yes, buts its complicated and depends on your library
discord.js
discord.js doesnt officially support slash commands yet
so you have to use the raw api
yes i am using that only
and it works!!!!!
but i want to integrate it into the command handler
One message removed from a suspended account.
see
One message removed from a suspended account.
idk how integrate it into the command handler =|
or do i wait for v13
You already done it.
again...
a === b && C
means
true or false && true,
the second one will ALWAYS be true, because there is no comparison, its just there
All you need to do is implement roughly the same code just not hard coded values into your "command handler"
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you can use arrays but its not needed lol
well, i took someone's help while making the command handler and i want to make a new one now, the one i am using rn is
its overcomplicating it
how would I do it without arrays
All the data you need is available in that handler.
Is this supposed to take time? been there for 20m i think
if anyone is good at designing using css plz dm me
Is anyone actually good at CSS though?
#horniinstagramgirls
jk jk
you just do like
body{
style: style
color: color
}```
¯_(ツ)_/¯
Yeah, just CSS becomes rather tedious.
expression1 || expression2 - If either one of the provided expressions returns a "truthy' value, the if statement will be executed - all non-empty strings are truthy values, so if expression2 is a non-empty string, the if statement will always execute. You need to compare the ID string with the id of the author in all of the expressions
small voice of calm and reason - your let pull variable should have the data needed.
okay...
ty I got that part



i swear there's cache in

