#development
1 messages · Page 1630 of 1
One message removed from a suspended account.
let dUser = message.guild.member(message.mentions.users.first() || await client.users.fetch(args[1]));
One message removed from a suspended account.
yes
One message removed from a suspended account.
^
ik so my var is not right
can you explain my command handler to me in dms?
I have DMs turned off.
so explain it to me here?
What don't you understand about it?
the last 3-4 lines
One message removed from a suspended account.
kind of
is it normal that "async def" is an invalid syntax?
let dUser = message.guild.member(message.mentions.users.first() || await client.users.fetch(args[1]));``` This doesnt work the mention works, I think the .fetch part is wrong. Idk what to put their tho.
did you read your error?
yes
bruh, ok, tell me what was the error
here
why can i do
;ping
;ping
;ping
three times yet the bot still responds after the 3 times
and the ping is 102, 79, 293
so idk why it takes thatlong
that long*
nvm ill use cooldowns
that helps
Firstly, it iterates over the commands folder that returns an array. You then .map over that array. Once that is done you loop over each sub dir inside of commands and it returns the file.js or whatever. You then require the file, most likely the file is using module.exports = { } so it returns an object. You console log the file is loaded or something. You then set that file in commands map or collection and then if it has any aliases you iterate over them and add them also.
log args and see what's in there. I'm sure it's args[0]
why are you still using member?
wdym
message.guild.member
Well im gonna make it only take ids from now on
message.guild.member() tries to convert whatever is inside to a guild member
ok thank you
just get this when I log
ye ik thats the error when I run the comand
it doesnt even log the values
let dUser = message.member(message.mentions.users.first() || await client.users.fetch(args[1]));```
Tim does that seem better?
Im just gonna make it acceot only ids
don't you even know how to use console.log
. ido
just args
ok\
so you know the entire array
and then you can see if it's 0 or 1
instead of guessing
oh
ok
let dUser = (await client.users.fetch(args[0]));
i want it to only take ids
let dUser = message.guild.member(await client.users.fetch(args[0]));
but I dont want it to be inna guild
so
now back to my main question
would this work
let dUser = (await client.users.fetch(args[0]));
Try it and see !
😐
i want 'fishing pole' to be an acceptable args. rn i have args[0] to check if it's a valid item, how would i make fishing pole acceptable
i think args.split
not too sure
you could make fishing_pole acceptable instead
if you want two words to be one arg then you'll need to change the way you parse args
maybe substring
no
and get 2 args [0] [1]
hm
trimming removes unnecessary whitespace
using a _ is the easiest way out
what if reply doesnt contain _ 🤠
then it tells them to contain it
but if you want fishing rod to be accepted and do not want to change the way you parse things, you could do this, I'd do something like this:
const combos = {
fishing: "rod"
}
const realArgs = [];
if (combos[arg[0]] && arg[1] === combos[arg[0]]) realArgs[0] = `${arg[0]} ${arg[1]}`
you could just tokenize it instead
i mean
its not like a public bot
its just a bot for friends
so it doesnt really matter
wouldnt that save icon to bookmark only
no
Favicon is a website standard for browser implementations introduced by the W3C back in 1994
Like I said
it's metadata
okay let's say for instance
you go into google and you search up the website
or you have a query result that pops it up
that's what it's used for
it's very similar to why opengraph tags are used in <head> contents.
also
you're calling image/x-icon with a png type, you can't do that
you need to have it as one of these
have you tried them
@quartz kindle js { id: '0', shards: { '0': { ping: '66', guilds: 79, channels: 2507, roles: 8555 } }, memory: { rss: '78.7MB', heapTotal: '30.6MB', heapUsed: '21.8MB', external: '18.9MB', arrayBuffers: '17.5MB' }, guilds: 79, channels: 2507, roles: 8555 } this is the memory stats for my bot on d-rose, its pretty decent right, considering it was ~240 on task manager for you?
yeah
also something to note is that
if you're doing this on a website, it needs to take time to register and be cached
if there is cf caching, that would be the case
my site without caching updates immediately
right chrome does cache for a while
Do CTRL + F5
chrome caching prolly
Use incognito
for quick.db,
db.push('userInfo.items', 'Watch')
db.get(user.Info.items)```
after fetching, how do i check if `Watch` is included in `user.Info.items`
db.has(user.Info.items.Watch) i presume
depends on what you purpose is but yeah that would probaly work
alr
uhoh i made this trash, is it gonna be a problem if it requires a file many times
or is it released when cmd ends
require caches any files you require more than once, but if you do another side effect (like adding it to a collection), you're responsible for handling duplicates.
You should also rely on proper argument handling (msg.content.split(...) is probably not enough) and use the async version of readdir so you aren't blocking.
wym not enough
it grabs cmd name, runs the file
im just worried its gonna grow in size (ram) after many events
Let's say my prefix is ! and I run a command called !load prefix. By that logic, cmd will be !load.js
ah okay
damn command handelrs epic
wait until you touch frameworks
isnt djs a framework
It's a library.
wdym
What’s the issue with the command handler of djs?
what command handler?
djs has command handelrs?

The one you can create 
d.js has d.js-commando
isnt djs commando deprecated?
yeah but commando kinda sucks
it does
It's not deprecated
Ehm I really required to write it down oof
Where are all the weird people and trolls today? 👀
turks?
it's a library for the discord api
djs has frameworks like discord.js-commando and discord-akairo
probs even more
djs is more of a wrapper if anything
oh yeah and sapphire (framework)
yeah, objects are just extensions of molecules which implement atoms in different ways
hey guys, I have a weird issue... when running my project locally it finds the data in my mongoDB, when running it on my vps it only gives the first response of looking trough the database, no errrors... anyone have an idea of what could be going on?
Bruh someone is hacking into my bot
reset token?
must be russians then
that's the most cringey convo I've ever seen
Yep Becuz they are drinking vodka
you should really use a variable for the msg.content.split
console.log cmd
i did
debug your code
its clean
God damn... why would you include you file over and over again?
that
is it gonna be a problem
hey guys, I have a weird issue... when running my project locally it finds the data in my mongoDB, when running it on my vps it only gives the first response of looking trough the database, no errrors... anyone have an idea of what could be going on?
Sure... just load all command files on the initialization of the bot and that’s it.
You gonna create a directory for your command files - using exports in there, read the dir and include all files saving them in a collection.
did you have a database running local and one on your VPS?
Inside your messasge event check if your command got found inside the collection based on specific key and pass your args to it and execute the code.
You sure the VPS data is the same as the one on your local pc?
There's a guide of how to handle command files... gonna post it as soon as I can find it.
@earnest phoenix
is there a way to let users to direct install from github on typescript
so it doesn't work at all
cuz like i gitignore dist/ and npmignore src/
so if i npm i the github it just wont download either of the folders
188836645670223872
@opal plank ponk
await?
do u have to await db.has
o
how would i check the item array for that item
userid{"items":["fishing_pole"]}
thats how it prints
i have fishing pole, but it tells me i already have thief outfit when i dont
i cant seem to vote for bots and the server told me to go here?
get the array and then use includes
huh what's the sense of saving an array in a database?
hmm that's no answer... go on 
what?
usually id do
db.set("itemname_user.id", "purchased")
but pushing to an array is easier
const inv = db.get(${user.id}.items)
Just get the whole array
yeah
and then use includes
no
nvm that doesnt exist
use the includes() method on the array you got
arrayYouGotFromDb.includes("fishing_rod");
quick.db probably json.stringifies the array and stores it in a row
what's inv
Code: https://hatebin.com/ogvydziolj
I’m tryna make a $play command and it says "No video id found"
I did provide a valid youtube url as seen here
For sure it does... never heard of a db arch being able to store arrays as data type
but it doesn't explain why to save an array instead of creating a structure but hey... it's not my db ^^
huh
alright... it's never to late to learn something new
I have a question, how many data can be stored in a json database?
Theoretically it's how much disk space you have available
(node:2140) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of null
at```
i get this error if the user's inv is null, how would i prevent this error
unlimited
as long as u have storage/disk space and ram/memory to handle it
because it needs to check if they have the item or not
if(DB FETCHING CODE == null) return;
or do
but json databases are prone to corruption, and also harder to work with than databases, I recommend using an actual database instead of json
return message.reply("You have no items!")
okay thanks bro
just do
const arr = ...;
if (!arr) return;
// Arr is guaranteed to not be a falsey value
but
Idk how you do your db so
then do if(arr.length == 0)
You wouldn't be getting that error if the array was empty
if(args[0].toLowerCase() === "premium") {
if(bal < 17000) return message.channel.send(pm)
if(inv.includes("premium")) return message.channel.send("You already own premium!")
db.subtract(`money_${user.id}`, 17000)
db.push(`${user.id}.items`, 'premium')
return message.channel.send("Successfully purchased premium! You now have access to premium features!")```
or if(!arr.length)
the error means that the array column is null
do this
if(!inv.includes("premium"))
if thay fails do this
if(inv.includes("premium") == null)
i want to check if they have premium or not
ill fix ur command for u
if they do, send the message
if they don't, then allow them to buy it
because then, it just does the regular process of buying
if(args[0].toLowerCase() === "premium") {
if(bal < 17000) return message.channel.send(pm)
if(!inv.includes("premium")) {
db.subtract(`money_${user.id}`, 17000)
db.push(`${user.id}.items`, 'premium')
return message.channel.send("Successfully purchased premium! You now have access to premium features!")
} else {
message.channel.send("You already own premium!")
}```
np
the issue is that it cannot do inv.includes on null
ok
i can fix it easier knowing that
if(args[0].toLowerCase() === "premium") {
let prem = db.fetch(`${user.id}.items.premium`) || false
if(bal < 17000) return message.channel.send(pm)
if(prem) {
db.subtract(`money_${user.id}`, 17000)
db.push(`${user.id}.items`, 'premium')
return message.channel.send("Successfully purchased premium! You now have access to premium features!")
}```
try that
and also inventory can be alot easier if you do it like this
The way you’re fetching stuff
It returns a object like this
{
ID: "items.userID",
data: {Item1, item2 item3}
}
the easiest way to fix your problem is fetching from db.all();
and using object.entries
why would i db.all
Sorting it, finding the item
hm
Bc the object wont have the item if the user doesnt have it
ngl i might just push a empty space into their inventory
that's a big overhead
' '
So you can always check through the object, which I used to do
just change the inventory system
doing db.fetch("PREMIUM"+user.id) is easier than all the extrra
then i have to save each item individually
which i dont want to do
but i may have to
sad
ill just use ternary operators for their profile
Its alot less complicated i’ll tell you that
so it isnt like 500 lines
I made a function that helps me out
I do dbF("premium", false) and it fetches -> user -> premium
or i do
dbF("item1", true) and it fetches -> guild -> user -> item
hey is it a server for developers or gamers
Can u tell me where to play epic rpg game
developers and gamers tbh
top.gg search up epic rpg
and go to Get Support and join there and play it there
lol well this escalated quickly
wanted to make a function to strip certain punctuation from a string including speech marks
someone pointed out that iphones use 'smart' punctuation like ms word
not a problem, went to look up the unicode values
then i went right down a rabbit hole of i18n
ended up with this
for (std::wstring::const_iterator c = str.begin(); c != str.end(); ++c) {
if (!
(*c == L',' || *c == L'.' || *c == L':' || *c == L'/' ||
*c == L';' || *c == L'!' || *c == L'?' || *c == L'(' ||
*c == L'‘' || *c == L'’' || *c == L'“' || *c == L'”' ||
*c == L'«' || *c == L'»' || *c == L'‹' || *c == L'›' ||
*c == L'「' || *c == L'」' || *c == L'﹁' || *c == L'﹂' ||
*c == L'『' || *c == L'』' || *c == L'﹃' || *c == L'﹄' ||
*c == L'《' || *c == L'》' || *c == L'〈' || *c == L'〉' ||
*c == L')' || *c == L'-' || *c == L'"' || *c == L'\'' ||
*c == L'„' || *c == L'\r' || *c == L'\n' || *c == L'\t' ||
*c == L'\v')
) {
out += *c;
}
}
🤣
most of that is half the world's oddball ways of representing " and '
at this point im probably better comparing against a std::map
wtf is that?
its C++, @lyric mountain
but like, can't u just compare unicode codepoints?
i started off with just the first eight comparisons in the if, and it became a moster real quick
are those sequential?
no, they arent sequential
meh
theyre scattered all over the unicode space
each is a different cultures way of representing various quote symbols
TIL 《 is a quote
doesnt help that unicode and especially utf8 are afterthoughts in C++ until recent anyway
yup
its tibetan, mongolian and north korean
wasn't unicode supposed to be...yk...unified? 
the smaller one, tons of arabic, some geerman, catalan
bulgarian has an upside down "
traditional chinese has 「…」
danish has this
»…«
that's a shy uwu face
norwegian the same but the other way around
we do have upside down double quotes lmao
Quotation marks, also known as quotes, quote marks, speech marks, inverted commas, or talking marks, are punctuation marks used in pairs in various writing systems to set off direct speech, a quotation, or a phrase. The pair consists of an opening quotation mark and a closing quotation mark, which may or may not be the same character.Quotation m...
yes
unicode: unified codepoints but each one chooses their own place to put accents
thing is, some of those comparisons in my loop arent even quote symbols
for some languages i filter out ?, !, -, . but not for others
depends on whats casually typed when answering questions
honestly its pretty cheap
not as cheap as a unicode parse
pre-trained models are incredibly optimised now
i think it takes my python instance 5micros or smth stupid like that to search 
user answers "cat"
neural network says "four legs. eval true. probability 80%. it'll do"
"CORRECT CF8 YOU SAID CAT!"
😂
yeah theres just a hint of sarcasm in there
but ive seen such stupidity from google's image recognition ai
and theyre supposed to have the mega bucks
exactly
i like monkeys
yo pog
thats my favourite animal
it looks like a way to munt up a GAN
ykow what im seeing somethin
Math.floor(Math.random() * 11) + 10;```
does this return a random integer from 10-20
Math.floor(Math.random() * (max - min)) + min;
so 10 instead
you need to subtract min from both value and maximum bound
that's why flaz added that - min
max: 20
min: 10
20-10 = 10
well, it should be round actually
nlp = load("en_core_web_lg")
doc1 = nlp("what has four legs and goes woof")
doc2 = nlp("cat")
doc3 = nlp("go goes woof")
print(doc1.similarity(doc2), doc1.similarity(doc3))
>>> 0.46622830520584546 0.7362269570225349
@green kestrel 1 DonT kNow WhAt YoU mEan
Ah
here one more since yall like AI domination examples
>>> 0.46622830520584546 0.7362269570225349
>>> Took: 0.1782999999999646ms
Still pretty quick
it may be wrong
but it detects cat does not really go woof

ahhhh thats quite scary lol
tbf though @green kestrel are you fuzzy / tokenising the text in anyway to make it a lil more lenient to things like spelling?
ugh that gives me anxiety
it's so bad lmao
are you two using levenshtein distance to get text similarity?
i do use levenshtein edit distance for part of it yeah
with matricies to make the performance not suck ass
thats part of the lienience
first it passes the answer through a filter like the one i pasted above to strip punctuation
then it uses levenshtein on it and allows answers with an edit distance <= 1
so you can be one letter out or one letter transposed
I see
How would I get the aliases of a command that is cached?
are these mongoose connection errors normal?
not normally
a cached command?
what do i do about them then
Yeah, since I might reload a command I want to be able to get what is cached.
Or would I be able to pull the physical aliases?
Hey, I have a error to my event.
Its a event to when my bot joins/leaves a server:
const Discord = require('discord.js')
const { MessageEmbed } = require('discord.js')
const logsChannel = '815953311614107709'
module.exports = async (client, message) => {
client.on('guildCreate', (guild) => {
client.channels.cache.get(logsChannel).send(
new MessageEmbed()
.setTitle(`Omg, je viens de rejoindre un nouveau serveur !`)
.addField(`Serveur`, `${guild.name}`)
.addField(`Nombre de membres`, `${guild.memberCount}`)
.addField(`Fondateur`, `<@${guild.owner.id}>`)
.setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
.setTimestamp()
.setColor("GREEN")
)
})
client.on('guildDelete', (guild) => {
client.channels.cache.get(logsChannel).send(
new MessageEmbed()
.setTitle(`Oh nan, je viens de quitter un serveur :/`)
.addField(`Serveur`, `${guild.name}`)
.addField(`Nombre de membres`, `${guild.memberCount}`)
.addField(`Fondateur`, `<@${guild.owner.id}>`)
.setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
.setTimestamp()
.setColor("RED")
)
})}
The bot dosen't send the message in the channel, and any error in the console
any error? as in no error, or there is an error?
There isn't.
is the id right?
.send(new MessageEmbed() why don't you simly use an object?
Hey, does someone know how I can set my bots status to like "Watching (servers its in) servers and (total members it has in those servers) members"? (I'm using discord.js)
no error in the console
client.channels.cache.get(logsChannel).send( is the same
it is possible to update the user's username, avatar, guilds etc with passport-discord without relogin ?
...send(embed: { title: "Oh nan, je viens de quitter un serveur :/", color: 0xff0000, ... }```
aye just more useless text instead of using the object stlye
Didn't say it wouldn't. But it's not efficient.
so?
is your event even running?
You try to send a simple text message.
yes
just console.log("working")
And make sure client.channels.cache.get(logsChannel) is cached
oki
I will test tommorow, I need to sleep
:/
gn
:))
does someone know how passport-discord module works?
Sure
a lot of people do here
ok
i know some of it
?
can i?
as in refreshing the user data?
yea
How do I check networth
Hey, does someone know how I can set my bots status to like "Watching (servers its in) servers and (total members it has in those servers) members"? (in discord.js?)
let me test it
iterate over each guild and retrieve member count
the what
disclaimer: it'll be slow and heavy
try this : ```js
client.guilds.cache.reduce((x, y) => x + y.memberCount, 0)
where do i put this
anywhere you need the total member count
that returns what you need.
okay ill need a second
I have the set activity code, not sure if im doing it wrong, but it says "Type Error: Cannot read property 'set activity' of null"
client.user.setActivity(`client.guilds.cache.reduce((x, y) => x + y.memberCount, 0)`), {
type: "WATCHING"
}
``` Heres the code i have
remove the temperate literals
Well first, that needs to be in your ready event
oh
Second, yeah that's a string basically, it shouldn't be a string
in the ready event
inside, yes
shouldn't be, no
What exactly are you getting
UnhandledPromiseRejectionWarning: TypeError [INVALID_TYPE]: Supplied name is not a string.
its referencing the line that type: "WATCHING" is on
idk why
but
if it s help
that s my code for that
client.user.setActivity(`${client.guilds.cache.size} servers!`, { type: "WATCHING"});
i will try this
Your code has a wrongly placed )
That's the issue.
where would i put it?
client.user.setActivity(`client.guilds.cache.reduce((x, y) => x + y.memberCount, 0)`), { type: "WATCHING" }
client.user.setActivity(`client.guilds.cache.reduce((x, y) => x + y.memberCount, 0)`, { type: "WATCHING" });
do i need the 2nd one
Of course.
Keep in mind what Hindsight#undefined told you about it.
wdym
Convert your result to a string using toString()
That's a string already.
yea
yes
Thought so
hi, i did not played OW for long - has been solved issue with public and not public IP?
Overwatch?
owo
Quick question for ppl with bigger bots,
from when would you recommend to start sharding
im currently at almost 1200 servers
+/- 1500
Hi guys can someone help me I want to add our discord server in top gg discord server I invited the bot then it tells it will appear in your profile when I click that it tell your server will show up here but it does not show
read #site-status
they're having issues with @pliant gorge
Ok
yep
how many
2 
but 1500-2000 is discord's recommended amount
and what server to shard ratio would you say
2000 is a must
i c
let the lib handle that
well, no, it'll only load shards on restart
using raw client, not bot
fkin hell
permissions array 200K+ in memory wtf
didn't understood, how you have a bot without commands?
he's refering to a d.py thing iirc
when you write a bot (at-least in python) you can either take the regular approach and use the built in bot class
then just listen to commands
and u can install / remove sections with cogs
ahhhh
well you have the base Client class and then you have the commands framework
however because of the nature of my bot
ig its time to migrate to discord.py
i just listen to raw client events
so you're using the peanut butter option instead of the nutella one
that's kinda fine ig
like, you're supposed to make your own command handler anyway sometime
but then you dont get these puppies 😔
its because my bot comes with 0 commands out of the box
and 100% customize it on the web dashboard
nah, that's too nutella
you'll become chunky
discord.py wont help you lol
permissions are attached to roles, the library needs roles to be cached to be able to offer permission-checking functions
hey nerds
does anyone know how i can resize the partition that root is mounted to on ubuntu
ive tried gparted but it doesnt wanna work

have you tried r̴̎̀e̷͋̃s̶̉͝i̵͗̅z̶̽̒i̴̿̕ṅ̸͝g̵̑̂ it?
yes try r̴̎̀e̷͋̃s̶̉͝i̵͗̅z̶̽̒i̴̿̕ṅ̸͝g̵̑̂ it.
oh my
doinkythederp typing since 01/01/1970
hey could someone help me with some regex?
i'm trying to find template literal expressions for js in a string
The filesystem is already 25600000 (4k) blocks long. but its not ggggggggggg
Sure what do you need.
pensive
but if i have multiple, it'll see them as one thing, lemme show you
Just for matching or do you need to work with the match groups?
I'm going to be using it with a JS string.matchAll
here's what it's doing right now: input: "fshfiuhsdufh${hmm}siufhdsiuhdf${test}fdjskhfjskfh" output: "${hmm}siufhdsiuhdf${test}"
instead of returning 2 things, it sees them as 1
here's the regex: /(#{.+})/g
how would i make it stop at the first } it sees?
could u give me a more readable example?
sure
Cool, lemme try that
That looks for the earliest }
cant you just anchor the } with an $
Just want to work with the first found match?
but not $ nor {}
😙
whos did you use
but it could have been made a lot shorter also flazepe is a dumbass
@solemn latch
hi
did u just Wooping?
i installed passport-oauth2-refresh
and i got this error Error: Strategy was not registered to refresh a token
what should i do
whats your strategy
kick asses and chew bubblegum
but my strategy has a problem
i tried this
refresh.requestNewAccessToken('discord', rfrsh.dRTOKEN, function(err) {
if(err){
console.log(err)
}
console.log(refresh)
});
i didn't do anything else with it
i'm just testing it
and btw
i logged rfrsh.dRTOKEN and i got the token
so
that s not the problem
the problem is the strategy looking at the error
Am I just being dumb here, for some reason the value of XP never changes
public static int getLevel(long xp) {
if (xp < getLevelXp(1)) return 0;
int level = 0;
while(xp > 0) {
System.out.println("xp before: " + xp);
if (xp > getLevelXp(level + 1)) {
level++;
}
xp -= getLevelXp(level);
System.out.println("xp after: " + xp);
}
return level;
}
you can't do that
use an aux variable
can u explain to me
i m a dummy
no ur not
should be >= not >
like this part
passport.use(new DiscordStrategy({
clientID: 'id',
clientSecret: 'secret',
callbackURL: 'callbackURL',
scope: scopes
},
Not sure what you meant by I can't do that,
nvm, it's actually fine because it's a primitive
yeah 
btw, wouldn't it be better to instead of subtracting xp just using a formula to calculate level?
It was never changing because the result of getLevelXp was basically 0 as it started at 0
I couldn't work out a formula
that's why I did that

like, mine is xp = level ^ 2 * 100
that's the required xp for level X
to get level I just do level = √(xp / 100)
The XP works like this
xp = Math.round((100 * Math.pow(level, 1.4)));
then each level adds on their current XP plus ALL the xp of their previous levels
so level 1 is level 1
level 2 is level 1 xp + level 2 xp
level 3 is level 1 xp + level 2 xp + level 3 xp
my leveling system was based on runescape 😳

And I'm completely shite at math, so I genuinely don't know the formula to reverse it @lyric mountain
Those look like squiggles to me 
me too
xp = Math.round((100 * Math.pow(level, 1.4)));
in equation is
xp = level ^ 1.4 * 100
your formula is very similar to mine
so reversing should be the same
Huh,
but not square root
pong
mine is xp = level ^ 2 * 100
yours is xp = level ^ 1.4 * 100
how to make it possible to install ts source from git with npm
when i npmignore src/ and gitignore dist/
my reversing calc is level = (int) Math.ceil(Math.sqrt(xp / 100f))
your will be level = (int) Math.ceil(Math.sqrt(xp / 100f, 1.4));
Uhhh, the downside is I can't use that tho because I need to get level from XP, not XP from level
when in doubt, I end up plugging numbers for levels into excel, drawing a trend line and selecting "Display equation on chart" 😄
make a branch or --dev
oh
wdym --dev
level = 1.4√(xp / 100)
how can that affect .gitignore
desmos
That's invalid syntax
it'll ignore everything
sqrt takes 1 argument not 2
branch it
All modrate commands scripts contains $onlyAdmin is this allowed?
ah, mb
level = (int) Math.ceil(Math.pow(xp / 100f, 1 / 1.4))
dbm prob
BDscript
told ya
ew
yikers
Eww.
thanks
But like, asking users to be admin isn't a problem at all
your bot shouldn't require admin though
forgot java doesn't have a Nth root method by default
I knew there was a way to do it, just didn't have the math knowledge to work it out lol
Math.pow(x, 1 / N) does the job
oh, dax
you're the dude from yesterday who was afraid of ending in hospital because of JS ain't u?
I still have to test it to make sure it works mods too that have permission to ban kick users and edit
is it possible to code in discprd.py/.js?
define "code in discord.py/js"

yeah it's u
@lyric mountain The function doesn't work 😔 , each level is the sum of all their previous levels XP
like code my bot in 2 languages at one time so its part python and part js
is it possible
yeah, but why
Hi, i'm developing something i'm using fs, axios, node-fetch the problem is i need to find a way to use more mod that can help me?
just curious is all
That's just a plain fori loop
basically every language out there has json support
you could talk to eachother with json
i guess so
but its plain retarded to do such
for (int i = 1; i < 100; i++) System.out.println(getLevel(getTotalLevelXp(i)));
but i could do it correct?
like i said, yes, but its idiotic
if you plan to showing off by doing that, the opposite will happen
just a headsup lol
show both getLevel and getTotalLevelXp
/**
* Calculates the required amount of XP to level up based on level.
*
* @param level The level to calculate the XP of.
*
* @return The amount of XP required for level up.
*/
public static long getLevelXp(final int level) {
return Math.round((100 * Math.pow(level, 1.4)));
}
/**
* Calculates the total amount of XP required to reach a level.
*
* @param level The level to calculate the XP of.
*
* @return The total amount of XP required to reach that level.
*/
public static long getTotalLevelXp(final int level) {
long total = 0;
for (int i = 0; i <= level; i++) {
total = total + getLevelXp(i);
}
return total;
}
You want me to change my getLevelXp logic?
I mean parts of my bot are in Rust and Python 
or the getLevel logic?
oh nvm
but thats pretty easy todo cuz C api
forget forget

where's getLevel?
public static int getLevel(long xp) {
return (int) Math.ceil(Math.pow(xp / 100f, 1 / 1.4));
}
is this the right way to grab the PNG (never grabbed a local img in that hasnt been in the same are than index
attachment://../Images../Star_Wars_As_ASCII.png
no
you have to attach the file with the filename and use attachment://name.extension
I think the problem is in getTotalLevelXp
like, that calc won't work if there's a loop involved
would need to figure out a way without one
Who wants the code to my bot?
and it enters in, caham, logarithmic
no one wants to code your bot

i said who wants it
nobody
ok
@drifting shell could u give me a sheet of 5 results returned by getTotalLevelXp?
Intersting seeing the patterns that most bots follow with their short descriptions
1 to 5
desmos time
damn it didnt go as planned but looks alright
yikers whyd you go with them 
level 3 is level 1 + level 2 + Math.round((100 * Math.pow(3, 1.4))
yea
so level 3 would be level 2 + Math.round((100 * Math.pow(3, 1.4))
because level 2 is already a sum of 1 and 2
the total XP is a sum of all the previous levels + Math.round((100 * Math.pow(level, 1.4)))
nope, can't figure out a way to keep all previous values without loop
my formula basically ended as a fibonacci series
sure
the probably is a way to revert it using loops
I'm really dumb
boi
just subtract and increase a level variable
It gets added using a foreach so my thought was to reverse the foreach
yeah thats what I did 
this is the way
do you now da wae
that was a mandalorian reference, im very sorry
Do you know the way to san jose?
that was a dead meme reference, didn't watch mandalorian
only know what reddit posts tell me about it
about 5,177 miles to my right
give or take a hundred miles in either direction
heh
Imagine you would turn yourself around 
<guild>.memberCount
ty
excuse me wtf
makes perfect sense for javascript
Those 2 arrays are not the same array
They're 2 different arrays with the same values. So no, they're not equal.
let test = [false, false, false, false, false];
let test2 = test;
test == test2;
well this works
{} == {} is also false, because one object is not the same as the other - they're 2 different memory references.
ig that makes sense
Yes that works because it is the same array, since you made both variables point to the same memory reference.
hey anyone have a legion reveant bot that picks up and turns in quest without me manuallly doing it?
That sounds like cheating in games and we can't help you with that.
Imagine multiplayer game servers ... 554/1000 players AI vs AI
Screaming, rage quitting and cheating AI ... that’s the future I guess
that should be a game. build your own ai and have it take over the world
plauge inc, but with an ai taking over computers
when imposter is sus!! 
is the discordpy extension "Jishaku" good? it appears it shortens stuff like ctx.guild down to _guild etc and is described as "A discord.py extension including useful tools for bot development and debugging."
It's quite helpful, yes
who needs artificial intelligence when we already have natural dumbs running around for free
mmmk ty
dms open
ok?
is there a way to access the dhcp server somehow? Or is there like a way to scan messages like "DHCPDISCOVER" from your own simple homework? I know it is easy in windows server, but how to do that in windows 10? When I go to configuration in Windows 10 all you can do is activate DHCP but DHCP is a server that runs on port 57, how to access that server(ik, you can not access it like a vps with a distro, but there must be something one can do)?
I dont think the DCHP server is available on clients
(Through windows features)
https://www.dhcpserver.de/cms/
I guess something like this could work
can someone please explain how to make a whitelist and restrict people from using this bot? I brought it in my server and cant stop people from sniping XD
I think you're in the wrong server
😊 thank you




