#development
1 messages · Page 516 of 1
Either way it's forbidden.
And will get you banned at a high chance.
I actually have a friend who got his account banned
No, I'm using latest disord library in python 3.6.6
@tight heath wdym use a proper way
@hushed berry for that database lmao. I'm just joking.
why make a self-bot when you can make a userscript :^)
All client mods are banned sadly
Even BD
I know you're using the best way known to you (and me) :p @hushed berry
I like that feature because it lets me write all messages to terminal but I think that there should be clearly stated in API that self bots are not allowed
so this is my shards command
await client.shard.broadcastEval('this.shard')
.then((results) => {
const embed = new MessageEmbed()
.setAuthor(`All shards`, client.user.displayAvatarURL({ format: 'png' }))
.setColor('#ED1B24')
.setFooter(`${results.length} shards total`)
results.forEach(shard => embed.addField(shard.id, `${~~shard.ws.ping}ms`));
return msg.channel.send({ embed: embed });
});
how do i get it to show the ping? shard.ws.ping is undefined lol
shardClientUtil does not have a ping property
client doesnt exist tho
thats for the current shard
@earnest phoenix then how can i get one lol
Wdym client doesn't exist
No...not the issue at all
like discord.js collection but I dont think you use that
The issue is that he's trying to access an undefined property
Client is bound as this
what did you eval
broadcastEval(this)
this.ws.ping
#3f44320bbe23f5de829fdad0e19f4381f634ef62
on #508320688289873931 I use the commit before the internal sharding
The indexes of the array represent the shard number
So, the first element is shard 0
Second shard 1, so on so forth
So you don't really need the ID
@sand halo you probably disabled disabledeveryone in client options
disableEveryone*
🤦
does anybody know how to code a prefix command, with discord.py
@torpid sable we won't code anything for you
ik
I'm sure there are tutorials
Well you'll need a database
my friend reccomended tinydb but idk how to use it
rethink is love, rethink is life, fight me
anyone who uses postgres, whats its average memory consumption?
Postgres or bust.
what would be the most memory-efficient way to perform full text search on a 50mb database?
thats also fast
im currently using sqlite FTS5
and its doing a decent job
just wondering if theres anything better
Write to disk? Oh no...
hello
client.on('message' , message => {
var prefix = "-";
if(message.author.bot) return;
if(message.content.startsWith(prefix + "bcrole")) {
let args = message.content.split(" ").slice(1);
if(!args[0]) {
message.channel.send("قم بمنشنة الرتبة | #bcrole @everyone message")
return;
}
if(!args[1]) {
message.channel.send("قم بكتابة الرسالة | #bcrole @everyone message")
return;
}
if(args[0] == "@everyone") {
message.channel.send(`لقد تم ارسال هذه الرسالة الى ${message.guild.memberCount} اعضاء`)
message.guild.members.forEach(m => {
m.send(
"**" + "السيرفر :" + "\n" +
`${message.guild.name}` + "\n" +
"المرسل :" + "\n" +
`${message.author.tag}` + "\n" +
"الرسالة :" + "\n" +
`${args[1]}` + "**"
)
})
return;
}```
this code is allowed ?
this sand massge members in server if members have role
allowe or not
?
@earnest phoenix No not allowed lol
I write to disk @earnest phoenix i have not regretted
if you write to disk yourself you'll end up suffering if you ever have to write a complex query
Will
(Date.now() - 604800000) < Date.now()
work for checking if 1 week has passed?
Ok I asked this question yesterday and it never got answered so here:
What's actually going wrong here? Because this only happens if there's only 1 arg (after I .split(' ')) but if it's one argument it always does this idk...
https://cdn.discordapp.com/attachments/272764566411149314/510255842415607808/unknown.png
actual code:
for(i=0; i < arg.length; i++) {
if(arg[i].match(/http/gi)) {
linkbypass.links.forEach(bs => {
let bsr = new RegExp(bs, 'gi')
if(arg[i].match(bsr)) {
arg = arg.filter(f => f !== arg[i])
}
})
} else {
arg[i] = arg[i].replace(/("|\*|\.|'|\||\\|\/|`|\<|\>|@|#|!)/gi, '')
}
}
```
arg = arg.filter(...)
on the first link regex that matches
once it tries another one
arg is now empty
so arg[i] is undefined
no but it's only filtering arg[i]
but this still works
also i redefine arg but it just equals []
if there's only one arg
and it's not trying to use arg[i] anymore after it filters so why would it error?
also @inner jewel obviously it's not a problem because this error only happens when there's only one argument. Everything else is defined fine but if arg.length is only one then it wouldn't even need it anymore anways
??
Idk any debuggers
but still using logic that couldn't make any sense?
It wouldn't try and match anything after I filtered
links.forEach
so even though, one that's wrong in general because if i filter then arg would still be left with everything else so shouldnt run into any problems, and it doesnt when there are multiple args which is the only situation that'd even make a difference in. and then it wouldnt be trying to match anything after i got rid of arg[i] because that's just it
that's a loop
it'll continue running as long as there's data left
your code would error for any input that has a link as the last element
ohdqiwhqdw
i see
so can i do something like this
let ok = false
linkbypass.links.forEach(bs => {
let bsr = new RegExp(bs, 'gi')
if(arg[i].match(bsr)) {
ok = true
}
})
if(ok == true) {
arg = arg.filter(f => f !== arg[i])
}```
okay so I'm really dumb, so I run here for some help from smart people. I'm trying to make a blacklist command so if someone is abusing the bot i can do a command to blacklist them. any ideas/help would be greatly appreciated.
(discord.js)
Basic idea would be to have some way to add id's to a database and if you want speed caching them on startup then after you check if the message is a command check if they are on the blacklist and return if they are.
yeah, kinda what I thought
all I really have to do is make a command to add id's to a blacklist file
I have no idea how to execute that idea
yes sir/ma'am 
Tony is a cute girl
give an example
not needed
upload it to imgur
I feel that's much better
theres that
what are you doing this for?
Nah I'm just a normal joe
k cool
wym
is it repeating the same image
it'll be something like
background-repeat
wait you can use css in bot pages?
o
uhh
holy shit my bot page looks like absolute garbage
i can link you to a tutoral that does
background-repeat: no-repeat !important;
lmao
^
its css who cares
no
sad
you use it on background-size
yee
cover isnt a property
yes
idk whats a text box
its like
one last question about the API
I found this code on the docs
ISelfBot me = await DblApi.GetMeAsync();
// Update stats sharded indexShard shardCount shards
await me.UpdateStatsAsync(24, 50, new[] { 12, 421, 62, 241, 524, 534 });
// Update stats guildCount
await me.UpdateStatsAsync(2133);```
where would I apply this?
.long-description {
//c
}
is that c#
yeah
maybe in the ready event
whatever event fires whenever the bot connected to discord
ok so RunBot
i guess
and "ISelfBot" causes an error hwo nice
how nice*
not suggesting any using I should try :v
you can use chrome web tools
wait
what browser are you using?

anyways
go on chrome
and press f12
no
go up to the thing with the cursor in the top left corner
wut
show pic
you're in the console
switch to elements
thats right
see the two sections in the right side? you can chose an element on the left one, and change its css on the right one
so you can test your css live
before you put it in the code
listen for errors
@sick cloud it seems to be in discord.js though?
listen for the error event 
@restive silo ah thank you @sick cloud
dl.on('error', err => {
console.log('An error has occurred: ' + err);
});
@knotty steeple Then what?
err => { console.log('An error has occurred: ' + err); }
remove all of this
and add your console logging function
yes
its valid code
okay if you say so
but console.log is a method
so shouldnt it be console.log()
someone else can explain
np
guys
idk java
script
but
i need help in something, its not worth learning just for one single stupid line
member.createDM().then(function (channel) {```
how do i use the settimeout on this
timeout doesnt repeat
i want something that repeats
setInterval
yeah may i get help please sir
setInterval(member.createDM().then(function (channel) {; }, 3000);
i dont think that would work
setInterval(()=>{
...
}),interval in ms)```
setInterval(()=>{member.createDM().then(function (channel) {}),10000)
that looks more weird
wouldnt work
i dont see nothing wrong there
wait
before the interval
set(Interval(()=>{member.createDM().then(function (channel) {}),10000)
i think this is wrong
}))
looks way too wrong
oh
setInterval(()=>{member.createDM().then(function (channel) {})),10000)
like that?
seems k
thank you sir
how i do aliases to commands?
guys
help?
const client = new Discord.Client();
console.log("Welcome Again !");
client.on("guildMemberAdd", member => {
setInterval(()=>{member.createDM()},1000)
setTimeout(function(){ return channel.send("Hello , May i ask you for feedback for a website and a bot?"); }, 60000);
setTimeout(function(){ return channel.send("thank you"); }, 240000);
setTimeout(function(){ return channel.send("hope you enjoy it here"); }, 270000);
}).catch(console.error)
})
client.login("token");```
@sick cloud tony i am not going to learn js for one freaking stupid error
stop mentioning me
daam
you'll figure it out if you bother to try instead of being lazy
How do I always open my bot?
and my friend was helping me out and we didnt figure it out
How can I always open my bot
what do you mean by open
@cinder mango run the code 24/7 pal
online
yea
read your fcking code
i have
what do you mean
tell
me
whats wrong
instead of telling me to read it when i have read it
bro
you've literally forgot a ) or } somewhere
i see it
make sure every ( and { has a matching closing ) or }
setInterval(()=>{member.createDM().then( (channel)=> {})},1000)
tony
guess what
same stupid error
then read it all again and double check
check
then look and fix it
Is here anyone experienced with googles OAuth 2?
I wan't to be able to update my playlist with discord bot, but this oauth throws me back wierd errors
Is there any way to take user input through the host console in NodeJS?
A simple link to a module/docs will work.
you can pass arguments to the js file
node file.js arg1 arg2 arg3 etc
but if you want it to await input like an interactive cmd, then there are modules for that in npm
readline can also be used in files
but yeah its the stdin stdout that does the job
Can you please help me with this error?
OK, but how can I make it this way?
You can't make everyone run a localhost server smh
uh sure?
I can make everyone run a localhost server 
no but honestly
Type in your server IP
Not localhost
henlo qts, am trying to do a post:
const fetch = require("node-fetch");
exports.run = async(client, msg, args) => {
if (!args[0]) return msg.channel.send(":x: I can't post nothing to Hastebin!");
const res = await fetch(`https://hastebin.com/documents`, { method: 'POST', body: args.slice(0).join(" ") })
msg.channel.send(`:white_check_mark: Posted text to Hastebin at this URL: https://hastebin.com/${res.body.key}`);
}```
however my bot responds with a /undefined, the fuck am i doing wrong
first time using node-fetch, no bulli
node-fetch doesn't work like that
it returns a Reponse what extends Body and on that oyu can use methods like json or buffer so you wanna do something like .then(res => res.json())
that will give you the body as object
sure

but care res.json returns also a Promise
how many fucking promises lmao
ye
Why was snek deprecated btw
ask the dev
one for the Request itself, one for the Serialization
hmm
console.log(res.json(res=> console.log(res)))
tried logging this
promise pending
but i did a thing
wait no
fuck
im tired
ignore this 
Lmao
fetch(...).then(r => r.json()).then(body => use(body.key))
I'd just use axios for requests nowadays
The thing I hate about the fetcg api is that the promise won't reject on non-200 status codes
you can easely make that yourself tho
async _fetch(url, options = { returnType: 'json', returnValue: true }) {
const res = await fetch(url, options);
if (res.ok) {
if (options.returnValue) return res[options.returnType]();
} else {
throw new APIError(url, res.status, res.statusText);
}
}
``` i literally just do this
yeah, the fact that you have to do that, is why I hate it
Is is possible to run gifs in Embeds?
Hey, is it possible to do non image attachments (normal files) in embeds?
gifs inside embeds yes
Other attachments only alongside embeds
@sonic monolith @amber junco
meh
But when I put a URL in an embed, my bot doesnt send actual gif, it send ONLY the link in the embed
Yes I did
you have to send the image as an attachment
@inner spruce is your bot even sharded
Yeah
Tim, how do you send the gif as an attachment?
@bitter sundial https://discordbots.org/bot/493065806176059405
Only gives the error when it updates after the timeout
is your code removing the shard object then?
It's on top ill send a snippet after my game
index.js
const config = require("./config.json");
const Discord = require("discord.js");
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: config.botToken });
manager.spawn(4);
manager.on('launch', shard => console.log(`Launched shard ${shard.id}`));
bot.js
const DBL = require("dblapi.js");
const dbl = new DBL('key', bot);
bot.commands = new Discord.Collection();
bot.on("ready", () => {
console.log(`Call Of Duty: Black Ops 4 Beta Bot is online.`)
bot.user.setPresence({ activity: { name: 'BETA Stats Bot' }, status: 'online' });
setInterval(() => {
dbl.postStats(bot.guilds.size, bot.shards.id, bot.shards.total);
}, 1800000);
});
Error: ER_HOST_IS_BLOCKED: Host 'bla' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
how can i solve it?
Lmao uou got api block?
?
what did you ping me for

?!?!?!
you said that before fucking pinging me
wtf
i would like ot not get random pings in here thanks
Other languages in #memes-and-media
О чём вы, а? У моего бота пинг за 500
@past lichen Russian in #memes-and-media
@serene cobalt but I need it only for my purpouse 😄
The Russian wasn't asking/answering questions related to development anyways 
Error: ER_HOST_IS_BLOCKED: Host 'bla' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
How can i solve it?
unblock with 'mysqladmin flush-hosts'
How can I detect when an emoji has been added/removed/changed in a guild? Talking about discord.js.
read the docs™
Thank you.
what score?
football
what league/tournament?
turkish league
if you cant find it, it probably doesnt exist
you'll have to scrape it off of sports websites or something
point a camera at your tv and run a machine learning algorithm to recognise the score
@heady anvil it's cool but 😄
find a website that does live updates, and get data from it
okey thanks i'll try
fs.readdir("./commands/", (err, files) => {
if(err) console.log(err);
let jsfile = files.filter(f => f.split(".").pop() === "js");
if(jsfile.length <= 0){
console.log("Couldn't find commands.");
return;
}
jsfile.forEach((f, i) =>{
let props = require(`./commands/${f}`);
console.log(`${f} loaded!`);
bot.commands.set(props.help.name, props);
});
});
}
what i need add this to do aliases?
i dont speak english good lol
i want add aliases to my commands
what i need add to this code
to do aliases?
ok so you have to make a collection for the aliases
like how you did for bot.commands
@earnest phoenix add, props.help.alias ? lol
How i can ban user and delete all message from last 7 days?
w h a t l i b r a r y
d i s c o r d . j s
d i s c o r d . p y
oh
d i s c o r d . t o a s t
d i s c o r d . w h e n c a n i d i e
d i s c o r d . n o w i f u w a n t
pls
nice shitpost
th an k
ok cool
Got it lol
But that example only gives an option for 5000 each how do i do a different amount?
500 what
5000*
5000 what
1000 per shard is what people usually do
where do i put that though-
2500 is when it's mandatory
Yeah
I need to go 500
Because I've delayed all my commands in order to hurry up the censoring but it's still like a pretty big delay and it's getting worse the more servers
its 2018 and there are still shard managers out there that dont auto shard by the recommended amount coming from discord?
For d.js sharding you need a separate file
Yes I do
I don't think you choose the server count per shard, discord doesn't for you, you only handle the shard count
You don't see what i see
Does it*
you can spawn 2 shards
I don't think you choose the server count per shard, discord doesn't for you, you only handle the shard count
no you can choose your own but why would you
Sharding at 500 is the stupidest fucking thing I've heard
ikr
l i s t en I need it ok
you dont
you don't choose how many per shard, it's all based on server id
you don't need it you want it but there is no valid reason
^
I'm not arguing whatever sure
Either way, you have the information you wanted,why are you still here?
we gave you all you need, it's pretty self explanatory
I still don't know how to choose the amount of servers per shard like gnu said
You dont
you dont
you dont
Nice
you....can....not
LOL
if you have 1000 servers, and you put shard count 2, it will be ~500 on each shard
if you have 500 servers and you put shard count 5, it will be ~100 each shard
@quartz kindle not necessarily
@slim heart dont quote me kthx
@topaz fjord try out ahk
"me"

I've seen some shards that have drastically different guild counts
notice the use of ~
my quote does not justify your plan
fucking tilda looking like a dash
Your avatar states the opposite
putting less servers on a shard than recommended will leave you worse off in pretty much all dimensions
if your shit code has performance issues with too many guilds i suggest you go fix that instead
sharding low amount of servers is like writing 1kb files on 64kb allocation units
I'm running 32 shards for my test bot rn :^)
....
I don’t need to shard for a long ass time
just accept how much better gitlab is
no
sad
that's one of many
i have free unlimited private repos on github aswell
anyone know why this is happening https://media.turtle-bot.com/f/wG7WC.png
no
How do I get an iframe working in the bot description? I enter the url to my website but I only get a white screen. Any tips?
is the website https
nope, it's http
eek
it's not like there's any data you can feed into it anyways
but that's the issue ay?
Might have to get a SSL cert then
ayhe, true that
Anyone know how to fix this: error not found: git
Add it to path
Check if its there if the error is like that then 2 strong possibilities are
Git isnt installed
Git isnt added to path
@coral trellis ^
Yeah thanks
np :)
2
3 using namespace std;
4
5 int main ()
6 {
7 int a;
8 int b;
9 int sum;
10
11 cout << "Please enter your first digit! n\";
12 cin >> a;
13
14 cout << "Please enter your second digit! n\";
15 cin >> b;
16
17 sum = a + b;
18 cout << "The sum of those numbers is" << sum << endl;
19 }
20
21```
why do shard IDs in djs revert?
i set my activity to [id] but it keeps reverting to my old [#id']
@earnest phoenix copy pasta
what
@earnest phoenixisnt it /n 
On the Webhook Url, what should be put in there?
your webhook url.
I kinda don't get it.
then use the standard method
the ip to your vps + port + path
you need to be running a web server of some sort to be able to actually get the requests
0.0.0.0 is a local ip
Oh.
you need the public ip
the one you use to connect to the vps, assuming you're using one
I just need it for upvoting then the upvoter will get reward. 😦 But i kinda don't get it.
i mean
like you could just use a premade lib for that
¯_(ツ)_/¯
wait
no
im dumb
looks like they have it setup but they're just not able to put the url in lol
if it's a vps just get the public ip?
doesnt glitch give you a domain thingy
does glitch even have a public ip address
yes?
How to post Server Count to API
glitch is designed for apps/websites so yes lol
yeah
@earnest phoenix #topgg-api
Kinda.
Yes, i'm using glitch.
get a vps lol
¯_(ツ)_/¯
yeah it is im sure
Yes
Oh, I see. Thanks
Hey, does anyone want to help me design a new RPG bot?
I'm going with a space-themed, futuristic approach where players can mine, trade, kick each other in the ass and play in a dynamic galaxy.
If anyone is interested in working with me, shoot me an DM.
Is i can create a webhook and delete it after webhook sent message using code
Or there is a ratelimit?
Anyone can help?
Did someone now this : my bot token regenerate when i reload the dash page
And when i log my bot with the token it's say "Invalid Token"
I hope you aren't copy-pasting only some part of the token
If you aren't, just regenerate it and try again
I have already try this ^^
I reload my page
And i have a new token..
@slender thistle
Discord you cuck 
😦
And when i regenerate the token with a new, i copy it the button and paste the token and lunch my bot
Invalid Token
Forgetting to save the file yet? 
Yeah ik
I have no doubts it's a token, dw 
I have a doubt on that one
Huh
someone know good meme api?
Make your own
where i can find meme collection for upload them on image and and then to json and random json url
how is working niceme.me
learn basic english grammar first, please
I'm 20, kiddo
k Kiddo
I like this guy, he stands for himself when he gets argued at

Lol
I hope you aren't going colorblind, Deive
actually I do have a little bit of colorblindness
almost only between green and blue
I sometimes can't tell the difference
Is i can create a webhook and delete it after webhook sent message using code
Or there is a ratelimit?
Anyone can help?

Discord's webhook*
Do you mean delete a webhook after it sent a message?
Yeah
yes, a webhook can be deleted afterwards
the message object will keep the author's name and avatar
Is there any limit of webhook or ratelimit?
webhooks have slightly more forgiving ratelimits on sending messages than anything else on discord
Ok thanks
Anyone familiar with Image Manipulation API's for JavaScript?
Please DM me if so
@uncut delta wrong
@stable tide nope, it's \n
To change line
Or go to the next line
What am I doing wrong
https://equalizerbot.xyz/screenshot/su30gu1i.png
Uh
xD
You can also use endl; btw
webhooks are overpowered
Okay so I made this and in all honestly I'm kind of proud about it, however I would like to make it so that it doesn't only work with 3 args, it just work completely if 2 or more are only 1 in length and then combines it
for(i=0; i<arg.length; i++) {
arg1 = arg[i]
arg2 = arg[i+1]
arg3 = arg[i+2]
if(!arg2) continue;
if(!arg3) continue;
if(arg1.length == 1 && arg2.length == 1 && arg3.length == 1) {
arg[i] = arg1 + arg2 + arg3
arg.pop(i+1)
arg.pop(i+2)
}
}
Because I could just if a bunch of times but i 1 really dont want to do that and 2 it still wouldnt work sometimes because i'm not about to write scenarios 2000 times for each possible 2000 args that could be 1 in length
@slim heart what does it do
so for each argument (message content .split(' ')) it checks if it's only 1 in length (ex: a) and then checks if the one after it is 1 in length and then checks if the one after that one is 1 in length and then if they all are it's replacing the first arg with the combined version of all 3 of those args and then pops them out after
so that people cant just bypass my filter with a space
is this for like a word filter?
For a specific bot my token is regenerated every time. Any ideas
?
Check your email
yes
Should see something like this https://vgy.me/wNtesX.png
The best part of that email is it is addressed to you
k e k
I’ve never had one of those emails 😃
lol
but yes groovy it is
It's easy to hit when your bot has 128 shards
oof
lmao
how
remember that rave
i finally had fixed all the issues and the bot was like 90% logged in
😂
and hten discord was like
nup
lmao
No one have an idea for me ?
so rip my question?
I'll have a look
you use js?
code looks like it
question is
what's its purpose?
im confused about it
-bots @quartz kindle
@oak sentinel 
but it seems like he wants to turn insert random s tring w i th swear w ords broken by spaces into something readable by his spam filter
oh we've met before?
your profile pic is familiar
you know it from Anna maybe
but
I know you and your bot
idk where from
but I do
lmao
lmao
hi im Tim xD
oh, that was unexpected
we're still about the script tho
Then stay on topic
I was just midly mindblown
okay okay
before he sends the bearcops
because if you wanna do a swear filter
you could just
im a law abiding citizen (for the most part)
^
and then check if that long string
rave and tim im just talking about if after arg[i] (which is 1 in length) if after it is 1 in length then combine them and then if after than check if it's 1 then combine
I do an arg based filter
but if you check if content matches assume then you could write assume fuck then it wouldnt do anything
so you could do a recursive function that continues until the next arg is not length 1
this is the basic premise
yes
that s o u n d s like what i need
n o w, how lol
i just sent the wrong screenshot btw
this is the basic premise
tfw you censor code
okay I see the issue
its not really an issue
let result = "";
function something(args,index) {
if(args[index].length === 1) {
result += args[index];
if(args[index+1].length === 1) {
something(args,index+1);
}
}
}
something(args,0)```
just more of a want to stop people just bypassing with space
thanks tim
wait wouldn't it just combine every that's only 1 in length?
because i wasnt to have it so if its seperated by a word with more then 1 in length then it doesnt combine them
it will do it sequentially, if the next one is not length 1, it doesnt repeat
mmmm recursion
@earnest phoenix o it was typo sry
Ke
Ok so Tim i got that and it works great the one thing though is if i do it in a for it'll keep going down the list so if if i do it to args with a s s it'll also return ss, how would i 1. pop it after and 2. combine them into one?
@quartz kindle
i dont get it, can you show an example?
So like while that does work, I want make it so that if those args after that arg[i] are a length of 1 it combines it back into arg[i], and then also pops them out of the args array
ah i see
wouldn't you just push it back into the array?
yes i could but theres no keeping track of which args were combined so i cant pop it
@slim heart try something like js result += args[index]; args.splice(index,1); if(args[index+1].length === 1) { something(args,index+1); } else { args.push(result); result = ""; }
that would remove it from args, and push the result to the end of args if the next arg is not length 1
so ["abc","a","b","gg","lol"] will become ["abc","gg","lol","ab"]
if you want to keep the original index, you need another variable to keep track of it
uh...
move the args.splice() to inside the if(args)
i made it delete the array before checking the next array, which makes it check a non-existent array xd
oopsie
(i hope thats the only problem with it)
it looks like it'd work
idk why it does that
oh you know what
result += args[index];
correct me if im wrong
but it seems like you're adding args[index] even if it isn't length 1
no still doesnt work
please help me
it checks if length === 1 before it puts it in the result
ok thanks
primed that wasnt for usksks
what does the error say?
function findone(args,index) {
if(args[index+1].length === 1) {
result += args[index];
args.splice(index,1);
findone(args,index+1);
} else {
args.push(result);
result = "";
}
}```
ok well this is what i have tim so far
=
dont use 3 ='s
use 1
you're not asking if it equals something you're defining it
he changed it
smh Tim 
@slim heart you removed one of the ifs
lol
now you're only checking if the next element is length 1, not if the current one is
Where can I find my directory for globally installed packages?
Oh ok, wait can you just type out what it looks like?
function findone(args,index) {
if(args[index].length === 1) {
if(args[index+1].length === 1) {
result += args[index];
args.splice(index,1);
findone(args,index+1);
} else {
args.push(result);
result = "";
}
}
}```
is this what it's supposed to look like?
remove the index+1 since the splice takes care of that
forgot about this
else it will error if the last arg is also length 1
ok well something isnt the same here
function findone(args,index) {
if(args[index].length === 1) {
result += args[index]
args.splice(index, 1)
if(args[index] && args[index].length === 1) {
something(args,index);
} else {
args.push(result)
result = ""
}
}
}```
^
tim u have any idea why?
show the code where you run the function in
and even if i just do findone(args, 3) which 3,4,5 = a,s,s it just pops a and then does literally nothing else
well, for loops are not supposed to be used together with recursive functions
because the for will execute faster and run over the function
so i await it?
what
i feel like it must me something wrong with me








