#development
1 messages Β· Page 323 of 1
check args length first
so just do !variable
then you use length
As you'll be sure those arguments exist
As you checked before
And as i said before check like a boolean
if(!variable) { //warn user}
Basic js friend
facepalms
.length
I told you exactly what to do, if you still don't understand
Ok I won't bother.
Man, go learn more in depth about programming in general
lmao
don't you have another "developer"
get them to do it
((no longer assuming gender and said them instead of him can i get a clap))
I'm not just going to get something I can figure out my own. Now I rather just not ask for help no more. People seem to get extremely triggered. So I might aswell just not try
I don't see anyone triggered
Just people not wanting to lose their time explaining the basics
I didn't even use the internet to learn Javascript. I just did it and figured it out as I went. So I rather not speak here no more. Thanks π
np
ok have fun
lol
how tf do you just spontaniously learn JS without looking it up?
lol
I wish I was that lucky
to just be granted knowledge of things I don't know without using the internet
js is for nubs anyways
ow
swift is where it's at
I knew most of it because I know C#. I took what 3 tutorials of how to setup a Discord Bot and a command. That's about it
Anyway. I the mailing service working
oh shit
Ez win
No worries
Lol I had it open when he deleted it and I got a screenie of it lol
Still better to reset it. Better not take the chance
@tacit kernel The file is .js not .json
Then why is it formatted like a .json then
Do you even know the difference between .json and .js?
Still
In .js you can have json
json is js object notation
you can export an object in a .js file and have it function as a .json file somewhat, I guess
kind of dumb though
It's still better to name it.json
bro u know i have been dealing with douchebags all day yesterday pls dont make a beef u aswell
beef me in dms plz
I was asking a question?
what was it?
Look above
π
i didnt seem like it
Not liking a question. Doesn't make me a Douchebag
cant find it
why do u want too find it so bad
Duck is a goose sometimes
bro i was asking why i get a error when i added : but instead u guys asking me the questions
I'm a goose. 
So post it again without the token please
I was giving you the answer. Make it .json then you replied it's .js in fact the format is better in .json
@tacit kernel show me code and error
hold on just need to remove token
lol
as u can see i get a error when i added :
Because that should be .json like I said before
Nope
.json is better for Storage
.js is better for Code
You used a semicolen instead of a comma @tacit kernel
{
"token":"",
"prefix":"!"
}```
It is much better in a json.
Look at the config command
Nearly half of it is JSON
I know. I'm just saying.
For small things it is better in JSON. Especially for using a Token
you should be using .json files yeah. But if you for some reason want to use a .js file for your config, you need to export the object
so
module.exports = {
"token":"",
"prefix":"!"
}
dont use !
But make sure to use commas in JSON
Use !!!!
don't ^
dabBot
For some odd reason dabBot wanted to allow you input as many !!! (over 3) and still run help
Anyone here good with oauth?
i do
We need help
He needs help
Can you help me quickly?
How do I use the access token once I recieve it
xD
To use in /user/@me
Wait what are you doing ACox
Things for zero0 XD
What sort of things hmm
@earnest phoenix show me the /user/@me response in dms
LUL
node doesnt work in powershell
it does
it dont i just tried
You're probably something wrong.
π€¦
lol
lemme try cmd lmao
CMD is a good start π
couldnt find module
module
yeh
More info would be nice
see
wait not it isnt lmao

HAHAHAHAHAHAHAHAHA
he's got a space
still same error couldnt fine module
shouldn't matter
You never know
well
here is my files
it shouldn't matter
omfg
tf is wrong now
node bot.js?
^^^^^^^^^^^^^^^^^^^^^^^^^^

show a screenshot
Soo many thinking emojis
what even is ur main file
sure
lmao who u talking too
Hm?
@PC_WildWolf#0595 it's very likely just a PEBCAK, and there's nothing we can do about it. We can't know where you fucked up.
eh, left
rekt
Another person who thinks it's easy and not time consuming to code. And then expects us coders to babysit him through the entire projectπ
^
my discord bot restarts alot (which sometimes make it so commands wont work, or lag, when its restarting) due to 1006 websocket closing. anyway you guys know to help fix that?
its Discord API shitting
He clearing didn't even setup the
require(`./botsettings.js`).token;
What
any way to make it shit less? its happening a lot, and i doubt most bots have to deal with that much shitting
Trust me
Every bot deals with it
Even mine does
Mine disconnects from the remote party VERY OFTEN
I bet you $10 if I look at my logs I will see a reconnect right in from of me
or maybe scroll up a bit and see you
ok. well its doing it more often than before... its gotten to the point where sometimes people think my bot is down when really its just restarting and so it missed their command
Best way to list roles π
For Errors. If it errors it dms straight to my guild. It was shorter to do it like that
how do embed fields on a command response help with error logging
wut
What's the use then.
You just started complaining and never actually helped. Who cares how I do my embed. It's not yours
i wasnt complaining? And what were you even asking for help with
why guild and author on the embed for everything
Completely unrelated to my question. I class that as complaining
if(duck.sleep){leave(peasant)} - Today at 5:08 PM
Best way to list roles :joy:
how is that a question

"unrelated to my question" how is what you said a question, it's a statement
thonk im just gonna stop
I was asking what the best way to list roles was. The way I had it in the picture was just. role, role,. It looked confusing
you just said "best way to list roles" with an emoji and no question mark so i assumed you were just posting an image
lol
k
How can I make my prefix non case sensitive?
.toLowerCase()
var prefixCaps = message.content.toLowerCase(prefix);
if (!message.content.startsWith(prefixCaps)) return;
What wrong with this?
yeah, isn't that good then?
what
yeah
just put .toLowerCase(), not .toLowerCase(prefix)
yes
Okay
and then make it
actually just start over
if (!message.content.toLowerCase().startsWith(prefix)) {
return;
}
if (message.content.startsWith(stuff) {}```
no
lol
and you didn't even close your parens
It was an example.
But it returns
It's working, thank you
np
if (!message.content.toLowerCase().startsWith(prefix)) {
return;
}
if (!message.content.toLowerCase().startsWith(prefix)) return;
Would be a shorter way.
always using curlies is a good practice
single line if clauses are nasty in my opinion
i like them
It doesn't cause much anyway. Both ways work just as effectively
it's code style
if someone wants to add something to that clause, they need to add curlies

it's a common and in my eyes good practice to always use curlies
either way
like I said
#development isn't about code style
Quick question, how does the bot list detect if a bot is online/offline
luca sees all
.>
I ask because my bot shows as offline on the botlist, but it's online
So I'm wondering if there's anything specific I need to do to fix that
oh, luca's a bit borked afaik
js 8|Yumi-Web | Error: listen EADDRINUSE :::80 8|Yumi-Web | at Object._errnoException (util.js:1041:11) 8|Yumi-Web | at _exceptionWithHostPort (util.js:1064:20) 8|Yumi-Web | at Server.setupListenHandle [as _listen2] (net.js:1322:14) 8|Yumi-Web | at listenInCluster (net.js:1370:12) 8|Yumi-Web | at Server.listen (net.js:1466:7) 8|Yumi-Web | at Function.listen (/var/www/yumibot.party/node_modules/express/lib/application.js:618:24) 8|Yumi-Web | at Object.<anonymous> (/var/www/yumibot.party/index.js:20:5) 8|Yumi-Web | at Module._compile (module.js:573:30) 8|Yumi-Web | at Object.Module._extensions..js (module.js:584:10) 8|Yumi-Web | at Module.load (module.js:507:32)
@karmic parcel halp
seems like you have something else running on port 80
:o
so it cant do nuffin
var myarr = ["arg1", "arg2"]
var content = myarr.map(args => `${args}, `)
How would I map it correctly?
how tf would i code a custom prefix system in c#, always been confused about that

cant it just use folders and json files?
π
SQLite3?
If you dont wanna to corrupt, use a Database like Re
, MariaDB, PostgreSQL, etc
SQLite is for JS and Python
I think
them var's are making my cringe glands flare up 
var array = new Array(['arg1', 'arg2']);
and
var array = ["arg1", "arg2"];
do exactly the same thing :|
arg1 == hi and arg2 == hi2 confirmed
lol behave
what are you trying to do
who the fuck knows
if (msg.author.id != 'id') return;
Yea
nitpick best to just always use !== and ===
@earnest phoenix join
mhm
He meant the array in guessing
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
Array.prototype.join() - JavaScript | MDN
making a new array instance wouldn't have fixed your problem
that was just the guy being fussy
//content is "15 x 2 + 13"
if (message.content.toLowerCase().split("x").join("*") == 43)
How would I do this correctly? Adding stuff together?
its already joined
if you had it as an array it would just be .join(" "); note the space and not *
also for that you would need to parse everything as a integer
and honestly
just do eval();
but that brings about a lot of security problems π
It's for something I'm working on. It has to = 43.
Array.join is going to just concat the strings together
hi
well what you wanna do is test whether or not the arguments are numbers
if they are numbers simple parseInt(string) to convert it to a number
you would then need to decided what the other parameters are x / + -
with that you would have an if statement determining which one is being displayed and then apply that to the parsed strings
π
if(args[0] == /([0-0])/g){
args[0] = parseInt(args[0]);
}
if(args[1] == "x"){
return args[0] * args[2];
}
something along the lines of that untested
Alright, I'll try it somewhat like that
the alternative is
eval(args.join(" "));
which will skip all that and give you the answer
(of course you would need to replace x with *)
of course you could imagine why that's a bad idea π
there is probably a math module or something that would handle that stuff
eyo
abs for what
my abs
your abstract
i am very
how is that useful
yes
YES! Thanks that mathjs module helps
thats good
π
noice
For a game I'm working on. This thing has been the most pain in the ass to me
lmfao
Including having to actually work the equation before hand
kek
Could someone tell me the best way of finding out if someone used something that isn't allowed
Example
let equation = ["15", "15", "+"]
//if author used something not in "equation"
yes
if(!message.content.includes(equation[0]) || !message.content.includes(equation[1] || etc){
message.reply("Sorry thats an invalid blah blah blah");
}
not the best way
basically if it doesn't have anything that's in the array, it returns with message.reply
never said its the best, but it works π
kek
if(!message.content.toLowerCase().includes(["15", "13", "2", "+", "x"])) return message.channel.send('test')
This works on it's own lol
no problemo my dude, ping me anytime if you needa hand
π
var buttons = ["15", "13", "2", "+", "x"].join(", ")
//stuff
if(!message.content.toLowerCase().includes(buttons.split(", "))) return message.channel.send(`${message.author}, Invalid Button Used!`)
Doesn't seem to work
y u joining and splitting
It was for listing
i think because you need to do buttons.toString().join(", ");
Ok
no?
toString() turns it into "15, 13, 2, +, x" does it not?
buttons.toString() will make "["15", "13", "2", "+", "x"]", then you are trying to run join on a string
Just put the array in includes
right
no need for the splitting and joining
i thought the thing you did before already worked @earnest phoenix
I did try that before. It didn't do anything
Tonkku.ToString()
@languid dragon So I didn't have to copy it over and over
[object Tonkku]
I did try not putting .join() and doing what you said. It still refused to work. I'll just do what I did before that worked
yeah 
Just more time consuming
if(!message.content.toLowerCase().includes(["15", "13", "2", "+", "x", "cancel"])) return message.channel.send(`${message.author}, Invalid Button Used!`)
Not working either
@earnest phoenix array.includes(msg.content)
Ok I'll give it a try in a second
Array.includes is not a function 
What I before was working. It just suddenly stopped
buttons.includes π ?
I'm not using the var?
ok but put the array in the var and call buttons.includes(message.content) like aeth said
i assume thats what aeth actually meant by array.includes
π 
@earnest phoenix show the code you tested
I just updated it now.
if(!["15", "13", "2", "+", "x", "cancel"].includes(message.content.toLowerCase())) return message.channel.send(`${message.author}, Invalid Button Used!`)
Just tested this. Error: Undefined symbol cancel
that's not vanilla js I'm pretty sure
client
.on('message', message => process.exit(0));
same
??
why u steal my memes and dreams

it worked ok for me
if(!message.content.toLowerCase().includes(["15", "13", "2", "+", "x", "cancel"])) return message.channel.send(`${message.author}, Invalid Button Used!`)
I flipped it around and it return
that's not how includes works
I know but the other way it doesn't "cancel". How would I get that to work?
i made it work
How so?
var buttons = ["15", "13", "2", "+", "x", "cancel"];
if(!buttons.includes(args.join(" ").toLowerCase()))
{
message.channel.send(`${message.author}, Invalid Button Used!`);
}
@earnest phoenix I'm pretty sure something is wrong in your other code
that error saying cancel isn't a valid symbol isn't vanillajs

well that defo works i tested it with my devbot
i passed through args which is everything besides //t
and of course i join(" ") to make it a single string
join(" ") not a function.
that means you used join on somethinghtat's not an array
@earnest phoenix you don't need to use @languid dragon's code, it does the same thing as what you have and it was an example
I added .split(" ") infront of it and I'm back to cancel not being a symbol. I don't understand that.
heck
it's your other code, a library that parses it, something we can't help you with
well I'm back to square one. First time using it with it doing that
i must say though, thankyou aeth for that array.includes()
im just sitting here thinking of the many things i could do with that, had no idea i could before if im honest lmfao
that would be agood idea ^
It's messy but it's just a test
if (level == 0) {
game.on('collect', message => {
if(!["15", "13", "2", "+", "x", "cancel"].includes(message.content.toLowerCase().split(" ").join(" "))) return message.channel.send(`${message.author}, Invalid Button Used!`)
if (math.eval(message.content.toLowerCase().split("x").join("*")) == 43) {
message.channel.send(`${message.author}, Correct!`)
//this.client.provider.set("313592723800195073", message.author.id + "calcGame", level + 1)
game.stop()
} else if (message.content.toLowerCase() === "cancel") {
message.channel.send(`${message.author}, Game Cancelled`)
game.stop()
} else if (message.content.split(" ").join("").length >= 8) {
message.channel.send(`${message.author}, Too many moves! **Format** \`[button1] [button2] [button3]\`etc\nMax: \`7\`\nYour Moves: ${message.content.split(" ").join("").length}`)
} else {
message.channel.send(`${message.author}, Incorrect! **Format** \`[button1] [button2] [button3]\`etc`)
}
});
i feel like its way more complicated than it should be
I'm am going work on making it smaller when I actually get it working
so you're using a library to parse math
And I'm guessing it fucks it
.split(" ").join(" ") 
im gonna edit this code, brb
do you use args?
like
const args = message.content.slice(_prefix.length).trim().split(/ +/g);
why use a regex for .split
Nope. That's why I removed args when I did it
that's horrible
π how to fix b0ss
Well if I got rid of mathjs would there be an alternative to what I'm doing. In there
if(!["15", "13", "2", "+", "x", "cancel"].includes(message.content.toLowerCase())) return message.channel.send(`${message.author}, Invalid Button Used!`)
i feel like that would work untested
also ending everything with ; would probably be a good practice
@earnest phoenix if you're only doing additions and multiplications/divisions why do you need a math library
just parse the input yourself
I was referred to it
hes making a kinda interactive game where you reply to a messagecollector and i suggested the library to avoid using eval()
why use eval at all lol
thats why i suggested the math lib π
if(!["15", "13", "2", "+", "x"].includes(message.content.toLowerCase())) {
It continues to return
the math lib atm isn't even the problem lmfao
it is
Not anymore
nono because hes getting the error from the .includes()
let myArray = ["15", "13", "2", "+", "x"];
if (myArray.includes(message.content.toLowerCase()) {
I tried that. Didn't work
It's confusing me too lol and I'm the one dealing with it
if(!["15", "13", "2", "+", "x", "cancel"].includes(message.content.toLowerCase())) return message.channel.send(`${message.author}, Invalid Button Used!`);
Not working
.replace("x","*"); π
my bot says it's offline on the website but it's online when i look at it on discord and it responds to commands.
what do?
is your bot in this server?
if(!["15", "13", "2", "+", "x", "cancel"].includes(message.content.toLowerCase())) return message.channel.send(`${message.author}, Invalid Button Used!`);
Doesn't Work. Only works if you input part of the array
try google π
@earnest phoenix yes, that's how includes works. It'll look for if message.content.toLowerCase() includes any of the array items.
How would I do it the way I want it?
well, how do you want it
So you can use any amount all in the same message. So say I can do 15 x 2 and it not return, it'll continue the rest of the code. etc
msg.content.split(' ').some(symbol => !['15', '2', 'x'].includes(symbol))
This will give you a Boolean telling you if something is wrong
Better ways to do it though, like a regex
ok
@uncut slate Thanks β€
I got close before. I think I some of the jumbled when I was researched
But I did use some
yeah that's one way to find out but ideally you want to build a regex
my bot is online now, thanks if someone fixed it
Who knows
π±
math.eval(message.content.toLowerCase().replace("x", "*")) == 43
Easy and Simple version of not using mathjs. I was referred to this please don't ask
use commando or use a Set
I dont know how to add cooldowns thats the problem!
Tell me if you guys figure it out
setTimeout(() => {
cooldowns.delete(message.author.id);
}, 5000);
client.on('message', message => {
// Level 0 Memes
setTimeout(() => {
cooldowns.delete(message.author.id);
}, 5000);
if (message.content == ":calm down:") {
var cooldowns = new Set();
if (cooldowns.has(message.author.id)) {
message.channel.send("cooldown");
}
else {
message.channel.send(new Discord.Attachment('./images/calm.png'));
cooldowns.add(message.author.id);
}
}
(courtesy of @neon pasture)
// Checks if they have talked recently
if (talkedRecently.has(<Message>.author.id)) {
/*
You can change the nature of the cool down by changing the return to something else.
REMINDER: You may need to add an else statement if you do not have any returns in this scope.
*/
return;
}
// Adds the user to the set so that they can't talk for 2.5 seconds
talkedRecently.add(<Message>.author.id);
setTimeout(() => {
// Removes the user from the set after 2.5 seconds
talkedRecently.delete(<Message>.author.id);
}, 2500);````
Is that discord.js
it is
yeh
probably the bot.js
My commands code are TINY
just your message event, bub
@earnest phoenix if you don't know what a message event is I can't help you
Can i not just put it anywhere
no
Hmmmm
msg.channel.send (``)
Thats js
I only know Owner only commands
I would have to put that as an interceptor or whatever they're called in komada
if (msg.author.id !== '(ID)')
return;
msg.channel.send(`Hello!`)
},```
Huh
@earnest phoenix message event is your thing like
bot.on("message", (msg) => {
});
I cant see that in the code... im using notepad ++ where would it be??? @earnest phoenix
Where ever you put it.
Ummmm
Cant i just put
bot.on("message", (msg) => {
});
anywhere???
Do i put it on the top? @earnest phoenix
@earnest phoenix Where do i put the cooldown code then
Im just not gonna add it
Then your bot will not respond to commands
It does respond cause me bot dont need cooldowns
Well i cant find it
..
Cause Notepad++ is shit
;/
what? @full knoll
Fail
Sorry, too many people with same name π¦
lol

oWo
uh no u?
?
nvm, it don't matter.

use vim 
Sublime Text π
anybody know how to add cooldowns in node.js
setTimeout()```
@winged monolith ?
someone asked that above
How do i embed in node.js?
what do you mean by "embed"
embed in node.js 
client.user.setGame(settings.game); why this not function in my bot ? LOL
@elder rapids
:((((((((((((((((((((((
aye i forget how to do it but what's the way to send a message with your bot to another server?
i used to do it before to the d.js but got bored with it
working with js btw
<Client>.channels.get("id").send("whatever you want in here")
sure its js lol
d.js 
if you want get the channel from a guild do it with <Client>.guilds.get("some id").channels.get("some id").send("ayy")
also you can use find instead get if you search by property's rather than ids
d.js server lol
w-what
forgot to put server in lol

mmk sent but rip bot doesn't have unban perms lmfao

wow
HOW IS THAT NOT COPYING
O-O
Inspect Element...
YOU COPIED THE NAME OF THE SERVER AND THE ROLES
I never said "Website Administrator"
ya because you got caught poser
OH DANG
you got caught so you changed the name of the role
but too bad the name of the server is STILL "Discord Bot List"
You're making yourself look stupid, and you're using inspect element
It was always "Discord Bots"
actually no i'm not poser
It was never "Discord Bot List"
Explain why Discord Bots is right on top.
and tell me how i'm "inspect elementing" so fast
these are pure ss's catching you tryna copy the server
lmao why
@uncut slate can this poser be gone?
I have 18 not 32
because i did my servers command idk how long ago
it's 3:04 when i sent that last ss
wew lads
did my servers command at 2:34
You're trying to get me out of this server when I am not copying
Now leave me the fuck alone
take your shit to DMs guys
I already blocked her
mmk done with this poser anyways aether
"HER"
LOL
aye aether i'm a girl now wanna go out?

LUL
oh well poser server is gonna be a fail anyways
mmk that was last comment
sorry had to aether lol
better be, next one's a mute bub
good
[object Pizza]
too lazy to search for a website to watch it online for free though lol
let arr = jusn[0] jusn[1] jusn[2] jusn[3] jusn[4]
I'm struggling on adding shit together. I'm trying to add these together BUT jusn[1] and jusn[3] are the symbols
15 * 2 + 13
@earnest phoenix let arr = eval(jusn.join(" "));
is this what you are looking for?
Isn't eval dangerous. Especially if it's for a game that anyone can use
oml true
I didn't realize that until now
π
I thought jusn was statically set, not user input
let jusn = JSON.parse(JSON.stringify(message.content.toLowerCase().replace("x", "*").split(" ")))
I had do this just get what I had working. Working
Don't ask me. I was up to 2am yesterday trying to. Doing what I was asking before
Β―_(γ)_/Β―
and still haven't gotten answer. So 
@earnest phoenixping
oops sorry
let con = message.content.toLowerCase().replace("x", "*").toString()
message.channel.send(eval(con))
Easy alternative to Eval. lol
No
I running a test
Through a command only I can use
Of ways I could go around adding shit together
for(let i of check) {
if(!["15", "13", "2", "+", "*", "cancel"].includes(i)) return message.channel.send(`${message.author}, Invalid Button Used!`);
}
if (eval(con) == 43) {
This was the fix FYI
What would someone recommend for making commands for Music? Like module wise
hey I am wondering why do I have to make in this code
"$ {code in here} " (no quotes) and what is the use of the dollar sign??
.setGame(`on ${client.guilds.size} servers`); ```
${} is indicating a Template literals
Is the same as doing
.setGame("on " + client.guilds.size + " servers")
what is a template literal
`
That
mdn, duh
ikr
my bot's fully open sourced, you can take a look for yourself
S P I C Y
no
just port 80
or whatever you want
no
just port 80
as a number
not a string
mhm
Lol
show me your whole file
hm?
hastebin or pastebin it
try declaring promisify before os
you can figure that one out yourself
What is your client defined as?
That'll be what goes there
It's case sensitive
maybe
yes
Meaning. You have 2 command prompts open and they're both running the same file
I just assumed
Click the X that closes them
Or just try other ports
Β―_(γ)_/Β―
I guess
@earnest phoenix @earnest phoenix closing your PuTTY instance wouldn't have done jack shit if you use a process manager
Don't ask me. I don't know what's going on here
@earnest phoenix yeah, that's what happens when you copy paste code without changing or adapting it
@earnest phoenix of course I know how to fix it
but you're never gonna get anywhere if you can't even wipe your own ass
we will not spoonfeed
agreed
learn to feed yourself
point being?
correct
still doesn't mean we're gonna spoonfeed you every little thing
you're not gonna learn properly if people just tell you what to do and you do it without knowing what it means
the errors are caused by the coding
I know probably more than the avarage bot programmer
all of the errors you showed were written in plain english lol
function promisifyAll (obj) {
const ret = obj;
for (const key in obj) {
if (!obj.hasOwnProperty(key)) {
continue;
}
const val = obj[key];
if (typeof val === 'object' && !Array.isArray(val)) {
ret[key] = promisifyAll(val);
}
if (typeof val !== 'function') {
continue;
}
ret[`${key}Async`] = promisify(osutilsWrapper(val));
}
return ret;
}```
problem is here i think
also why use express for web post/get
LUL
lol
we are not feeding you learn to feed yourself
the way to learn to code good is to learn from your mistakes
i can feed you but not with help only fooood
and find the bugs yourself
if you look at the error is should display what line the error is at
its a promise error lizard
What is an error```
lol
xD
@woven drum you clearly have no idea what's going on
it's not relevant to my promisifer
hmm
cannot read property guilds of undefined
ah
@earnest phoenix now you know why it does not work next time
and you probably will not do that the next time
thats how to learn coding
Learn from your mistakes and to never make those mistakes again
Savage
@earnest phoenix bruh, it's correct
it's not broken
it's displaying the amount of free RAM on the server

what's incorrect about it
it might be fucked on windows but I am 100% sure it is correct on my website and on linux
Fix what
Dude
It's not fucking broken
It's working perfectly
You keep saying it's broken. Tell me what part of it is broken.
it's not impossible
my bot, even with music, uses ~0.1% of cpu while at 15 connections
Also, it's perfectly possible for Node to use ~0.0n% CPU, at least it is on my $5 Xeon. Open your process manager and look at it.
It should show 0 because it IS 0.
@earnest phoenix I'd love to hear why you think my values are wrong though
You keep saying they are but you have no idea why yourself
That calculation would do something completely different than what I am doing
well
you're trying to fix something that isn't broken
and
that snippet wouldn't calculate the usage of your bot
"work" doesn't mean it was correct
that value is not the amount of memory your bot is using
that value is the amount of memory your system as a whole is using
it's system usage

319MB/1.0GB (31.85%) => amount of memory bot is using out of the memory on the system
226MB free on server => amount of memory free on system (so system usage)
used + "/" + total + format(" %.02f%%", used/total)
What do you mean by currentmemorybeingused? Used on the whole system or used by the bot?
That doesn't answer my question
π€¦
Well
as much as I'd love to tell you..
Your bot has definetilly reported the wrong RAM amount
I'll try to fix that
https://we.is-a.party/5b56be8.png
But I won't share the code with you, because I'm not going to spoonfeed you
I'm not going to spoonfeed you. ;)
kek
getting os used/free mem is so easy on node
i need 2 or 3 different hacks to get it on java
LUL
sun.* classes aka internal proprietary api that shouldn't be used but dozens of libs use
:^)
Hi
com.sun being a gray zone
mm
Well, you can, but you don't know how to
no, I am saying you are incapable of doing so
Hey, hey, hey
We've been over that
you were gonna fix it yourself, but not give me your "fix"
remember
No, not really
Just make sure you're working with ints where you can
Listen, kid
You are trying to fix something that is not broken
For yourself
I'm not looking into getting full sys values for you
Sure
Doesn't mean I'm doing it for you
Especially after you wanted to give me sass about doing it yourself and not telling me about your oh-so-amazing "fix" 
Like I said
your life could be alot easier if you get rid of CPU
Anyone here familiar with Materialize CSS and JQuery?
I'd suggest asking your question, anyone who knows would answer @opaque bison
because my code is a mess because of it
good idea
if I didn't want CPU, I could have it way easier
Okay so my question is: I am using Materialize and JQuery right, on the Index page which doesn't have any heavy JQuery code, the Side Nav works but on pages where I am using excessive JQuery the Side Nav doesn't open. I can't find an error in the Chrome Developers Console either so I am not sure what is casuing this problem.
And this is happening on another page as well
@earnest phoenix Are you gonna add your music bot here?
@earnest phoenix he already said he won' spoonfeed you :^)
@earnest phoenix no, because I want CPU
inb4 jmusicbot
@opaque bison so the button is completely unresponsive?
alu? arithmetic logic unit?
Is it hosted anywhere right now?
yeah
Well I am just about to put it on my web server so in a few moments I can DM you π
mk
well
it's not like I would know alot about webdev/JQuery and I've never even heard of materialize
but it's always fun to poke around
Nice template
Oh, good to know
I thought Melmsie was always retarded π€

I'm just now finding out
melmsie's suoer retarded, yeah
that's why he always asks for spoonfeeding
totally unlike you
:^)
thatt's why he needed aetheryx help
:/ yup rip me amirite
RhinoBot v2
kek
same
htop vs pm2?
they kinda do completely different things, don't they?
htop show the system info/stats and pm2 does something diffrent
okay, so, say i wanted to create my own bot to use in my own server with about 10 or so human people. what would i have to get/learn in order to make a bot for Discord?
Depends on what language and library you want to develop it on
okay, what if i were to use Python3? (since thats the language im currently learning and have decided to dedicate myself to ACTUALLY learn it)
And do you have a library?
NOPE
i just kinda wanted to learn the process as i learn more about Python3. when i deem myself at an acceptable level of experience with Python, then i was going to consider making a bot with what i had learned
https://github.com/Rapptz/discord.py Here is some info for a python lib with an example and requirements
okay
@tribal jetty#2831 What kind of bot were you thinking of making?
Nice mention π
@inner pebble learn python before learning how to make a bot (although you said you were going to do that)
for discord.py, consider going for the rewrite branch... it's more up to date and better docs are there
fuck
WHYY

