#development
1 messages · Page 1646 of 1






@earnest phoenix please don't advertise here
plus the documentation is written with Comic Sans-like font
pog
the functionality's probably very limited tho
when we were at college doing computing, as a complete beginner exercise for those who had never programmed they asked them to write some instructions to an alien who'd never been to earth before how to make a cheese sandwich
cue rabbit warren of realising that you have to define what bread is, what a knife is, how to hold it, where to get bread....
how many years ago was this?
hmm, 23?
god damn
it still applies though! think about it
yeah it really does
yeah, now imagine:
its showing how you cant expect a computer to assume anything, it takes everything literally
so where someone in their thing puts "put butter on bread", the lecturer acts out what the alien would do, takes the literal box of butter and places the BOX on the loaf
🤣
lmao
we all already know how to code, so this is captain obvious moment to us
but if youre explaining programming to your grandma... well this is where i'd start
by the way Brain did you take a break from moderating or?
no im no longer a moderator
ah
I see
working more on the bot?
i didnt have time to fit it in alongside family, job and triviabot, i stopped doing queue
instructions unclear, loaf is not defined
my dict tells loafs are a thing cats do
assuming loaf is a cat
yeah I assumed it was a time thing
eventually they decided enough was enough and took my access away, but tbh i dont miss reviewing endless stream of turkbots at all
i found it demoralising and demotivating
yeah it just seems like pain
i can actually make reasonable money developing triviabot in my free time now
and thats fun 😄
triviabot has a patreon or something?
you go girl
it has premium
basic month premium is £3, charged through stripe/chargebee
in jan i made £750, because 5 people all bought lifetime all at once
wow
pog
it averages about 350 a month atm
it may sound a lot but most of this is repaying the thousands i sunk into ads lol
i loaned myself big money
£350 is R$ 1900 here
you receive a minimum wage
yeah I remember you talking about how its not really worth it
a fun project with benefits basically?
yup
the aim was to get it to pay for its own hosting
i didnt even expect to get that far, because no other project ive ever done has
i sunk years of my life and a couple of thousand £ into developing and releasing a game on steam
that never made its money back
tbh for releasing a quality game, £2000 is nothing. people spend millions
i refused to spend any money on ads/marketing
it was very much fun
well thats good
and i was nominated as finalist at an indie games competition
oh thats cool
won an all expenses paid trip to london, vip pass, afterparties, and exhibited the game at an expo
it was awesome
pog
a thing thatll prob never happen again
how many years ago was this?
2019
oh so the game is still current
yup
what's it called?
search steam for 'mr boom's firework factory'
its a really really hard puzzle game, like the dark souls of puzzle games with a dark storyline
it makes people want to throw their gamepad at the screen
and do this
(╯°□°)╯︵ ┻━┻
game engine or from scratch?
ah
i did two previous versions from scratch and abandoned them
part of the reason it took so long
a large portion of the £2000 cost was graphical assets, and the voice over for the main character
mr boom's voice was done by a guy called matt howell who did the voice over for the world of tanks ad on US TV during the superbowl one year
One message removed from a suspended account.
One message removed from a suspended account.
oh that makes sense
when i went to that expo, i networked with a bunch of people and one of them put me in touch with really nice voice talent
i think his voiceover cost me £300
any errors?
Nope
steam listing itself cost me £70
Nothing
are you catching every error 👀
And my bot is being reviewed today or tmmrw so this is kind of sad
Yea, out of NOWHERE this happened.
It was working fine last night then now nothing
if(!answer4.first().content.toLowerCase() === "partner") {
return message.author.send("That was not a valid program. Please re-run the command and enter a valid program next time.")
}
if(!answer4.first().content.toLowerCase() === "notable group") {
return message.author.send("That was not a valid program. Please re-run the command and enter a valid program next time.")
}```
confusion
if i say partner
it returns that message
does your bot do stuff which might cause it to get ratelimited?
@small meteor you didnt host it in france at ovh did you? 
but i want it to say that message if the content is not partner or notable group
lol brain
No, its CA OVH @green kestrel
ovh...
LMAO
And no

@solemn latch
this bot's on fireeeeeeee
im on OVH Poland
learn the and operator
i tried and
have you tried restarting the bot?
@green kestrel im on OVH Virginia
thats even more of an issue
i need to review my backup policy tbh, reading about what happened to france DC scared me
Yea I did
DC?
data center
ah
Can someone take a look with me in a VC?
are you using try/catch everywhere so that errors dont log? 👀
if(!answer4.first().content.toLowerCase() === "partner" || !answer4.first().content.toLowerCase() === "notable group") {```
yea
unfortunately i cant. my work uses discord, i spend 9 hours a day in their VC
no because that will always be called
thats a bad thing, you wont know what errors are happening if you never log them
@solemn latch There is nothing wrong with the Code..... everything in the Code is fine, the bot just doesn't trigger commands
Dashboard runs fine
@green kestrel bro get discord canary and stable so you can have 2 vc connections
instead of !condition1 || !condition2
the former will run if either of those is true
the later will run if either of those isn't true
I even restarted my VPS
that is an issue with code though 👀
if the bots online, and its not doing what its supposed to, 99% of the time its a code issue.
I cant see how that is possible lol
do you do any requests with your bot
web requests
in your main bot file
bc that can be the cause of ur bot not responding
It works now... I found the problem
what was it?
@sterile lantern thank you for that idea, I had the handle incorrect
I must have typed something there on accident bc on one of my lines it said thank you LOL
Welp
one of the things that can help with these types of accidents is using git. once you update something, you can see all changes from that point to find those kinds of mistakes.
it can save a lot of time
git gud
me merging my 17 commits across 2 machines
those two untracked files
So it's showing permissions that the user doesn't have anyone know what I did wrong?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

<Permissions>.toArray(); will give you the permissions as an array
no need to if each permission
no idea tbh, im too hungry to think 👀
but you could get rid of 99% of the code, for a 100% working method
Is Permissions what the user has or what's modified? isn't there an allow | deny property
It should list the permissions that the user has
but the permissions that should be listed that the user has are listed
and not like a permission view channel
i explained a working method above
<Permissions>.toArray(); will give you the permissions as an array
member.permissions.toArray();
instead of all those if statements should give you the permissions the user has as an array.
let me get this straight
.addField(`Permissions: member.permissions.toArray()`, true)
What the fuck no
the only thing your doing is replacing the if statements
and instead setting your permissions variable to the array
this part, can stay the same. ```
.addField(Permissions: ${permissions.length ? permissions.join(', ') : 'None'}, true)
don’t you need another value
didnt i just say exactly that 👀
oh heck yeah that too
index how
They're not sorted/indexed
Isn't that there
You read a dictionary by a key
how can i read one then?
the title, value and inline is there
i do dict["key"]?
yes

who the fuck needs google when u have shiv lol
Tim is the StackOverflow here
lol
does anyone here run a bot in a lot of servers? having some issues with lag and wondering if anyone else has experienced & fixed similar issues
Usually has something to do with resource-heavy processing
im nto really doing anything intensive, most it does is upload emojis
thats the most intensive thing i can think of it, most of the other commands are sending embeds with stuff in them
wym by caching
Member/user/presence caching
I haven't touched that, would i need to disable aynthing
Well, it's suggested to only cache what you really need, so go through what the bot needs to cache and apply appropriate intents to your client on connection
Apart from that, make sure the machine the bot runs on doesn't get overwhelmed along with its network
What exactly do you mean by lag. How much memory is it using? Is it downloading large images and then re-sending them? What language are you using?
lag as in sometimes commands take a while to respond, even simple ones like >help
let me pull up the vps dashboard
and ill get back to you
100% cpu usage
python seems like. Might possibly be asyncio wait blocking the thread.
What you should do is use non blocking methods or multithread your application
isnt that the idea of async functions? to be non blocking?
186MB free is also not great. You shouldn't be depending on swap too much. Might possibly be the garbage collector blocking the thread
What's with the big cpu increase? New feature?
it was offline
thats true - but dont want to upgrade my vps and then find out it doesnt help at all
The issue just might be that you have a memory leak or that you should look into intents. I know discord.py isn't all that great when it comes to cache management, so I'm not too sure what you can do in that regard. I don't code in python, so I wouldn't know what your best course of action could be other than to possibly cut back on intents you don't need such as presences. Practicing efficient memory management is good
Is there any way to have a module like in npm but private .Since i want to update it across folders.
Actually there’s 2.4g available
Linux is using 2.5G for a disk cache
it’ll reallocate it as needed tho
You can have private modules in npm, you have to pay though
The disk may be a hdd and trying to sweep from an hdd will lock the process while it sweeps
See this https://www.linuxatemyram.com
avoid swap at all costs
how many is a lot
mine started struggling around 15k so somewhere around there
but i am searching a way without paying
that's a sizeable amount yes
with module i mean a folder which can i update via command
:/
lol.That is the same if i copy and paste.I am searching for a efficient way
As in updating from like github?
github private repos can serve as private npm packages
npm also has private packages, but I haven't personally seen this
no you have to pay for it
no you don't
for private repos?
github private repos are free
there is github submodule
no i mean npm
does it have to be npm?
whats the requirement that means it absolutly needs to be npm?
no
if you're installing something as a dep, github works. npm works
Just pull from gh?
npm install AmandaDiscord/Reloader
github repo
if it's in the package.json, you need git:User/Repo
i will use submodule.If there is no other opinion
but the repo has to be public, no?
no
I think you can auth in npm
what thE FUCK is that indentation
lol my repo
what if you indent things, but like only once
channel.sendMessage("Calculating ping...").queue((msg) -> {
final long ping = ChronoUnit.MILLIS.between(message.getTimeCreated(), msg.getTimeCreated());
msg.editMessage("You reached the alpacafarm in **" + ping + "**ms").queue();
});
Am i calculating the ping correct? because im getting a 700/800 ms result or is just my latency so high
I get this error..
message.winner.send(`**Hey ${message.author}! You just won a giveaway for ${prize}, in server named ${guild.name}!`)
^
TypeError: Cannot read property 'send' of undefined```
And what I am executing from index is thiS:
message.winner?
ya, the winner is the user who won a giveaway..
I definded it like so:
where is it defined
margarine
..
eat some to clear ur mind
alr, I guess I dont realy need that part..
no
winner.send("xdfsgadfgsdthsdfgv")?

yes
yes

I think its already defined..
you know the answer to that
what guild r u doing it in
you must have an approved bot on the site.
m.guild?!
Nothing. Im just doing guild.name
message.guild yes
if ur doing the guild of the giveaway message?
yes..
message might be entirely different
ok
I'm create a bot
I*
youve asked this question several times before smug, and gotten the answer several times before
alr. Code it @earnest phoenix
Wait
Right....
Is this the dude who didn’t know how to create an object
I genuinely wouldn’t be surprised
it is
yea..
😅
if your having trouble remembering solutions to a problem, maybe try writing down issues you have in a journal(or file on your computer) and looking at that when you have an issue.
no
yes it is
i always find writing down my development issues helps.
oh..
ok
Hard hard hard hard hard hard hard hard hard hard hard hard hard hard
D.js Official? helpful? Have they changed so much that they've become suddenly helpful in the last year?
.setFooter(`Uptime: ${uptime}`);
How do I set the bot icon in the footer iconURL
.setFooter(`Uptime:`, uptime, client.user.displayAvatarURL());
I think its something like that.
footers only have two parameters.
lol yep
can someone help me solve this problem?
The code:
.addFields (
{name: 'Difficulty:', value: {
im: s.Aim,
Rating: s.Rating,
}, inline: true},
)```
the problem:
The value should be a string not an object
please why does everyone have fucked up indentation
but is it possible to put objects in the string?
... no you need to give value a string
because it's not python 
value will not accept anything else
I got it, thanks
makes it easier to read tho...
hmm
I have a minesweeper bot with this code
for (c = 0; c < board.length; c++) {
if (board[b][c] > 8) {
try {
if (b - 1 < 0 || c - 1 < 0) {} else {
board[b-1][c-1]++
}
} catch (error) {};
try {
if (b - 1 < 0) {} else {
board[b-1][c]++
}
} catch (error) {};
try {
if (b - 1 < 0 || c + 1 < 0) {} else {
board[b-1][c+1]++
}
} catch (error) {};
try {
if (c - 1 < 0) {} else {
board[b][c-1]++
}
} catch (error) {};
try {
if (b < 0 || c + 1 < 0) {} else {
board[b][c+1]++
}
} catch (error) {};
try {
if (b + 1 < 0 || c - 1 < 0) {} else {
board[b+1][c-1]++
}
} catch (error) {};
try {
if (b + 1 < 0 || c < 0) {} else {
board[b+1][c]++
}
} catch (error) {};
try {
if (b + 1 < 0 || c + 1 < 0) {} else {
board[b+1][c+1]++
}
} catch (error) {};
}
}
}```I wanna find a way to make it more efficient
why in heavens is that not a global try/catch, first of all?
Explanation: loops through the whole board, finds which squares that are bombs, and adding 1 to all of the squares around it
Also... do you not know how to invert conditions?
this code hurts my brain and my heart all at once
if you think about a grid:
💣⬜
⬜⬜
@umbral zealot I managed to solve the problem
it will catch on the -1
ok but try/catch is to catch errors, oyu shouldn't be purposefully introducing errors in your code
make sure your conditions are correct and don't cause errors
what happens if I have list index out of range then
uh make sure it's not?
You create the grid, you know the size of that grid, how would you ever get an index out of bounds?
that would be a sign of bad programming
I have a command folder and how do I delete the whole cache of the command folder (to reload it)?
Ik its delete require.cache , but does it work for it?
so something like this? for (b = 0; b < board.length; b++) { for (c = 0; c < board.length; c++) { if (board[b][c] > 8) { if (b - 1 < 0 || c - 1 < 0) {} else { board[b-1][c-1]++ } if (b - 1 < 0) {} else { board[b-1][c]++ } if (b - 1 < 0 || c + 1 > 0) {} else { board[b-1][c+1]++ } if (c - 1 < 0) {} else { board[b][c-1]++ } if (c + 1 > 0) {} else { board[b][c+1]++ } if (b + 1 > 0 || c - 1 < 0) {} else { board[b+1][c-1]++ } if (b + 1 > 0) {} else { board[b+1][c]++ } if (b + 1 > 0 || c + 1 > 0) {} else { board[b+1][c+1]++ } } } }
wait no
Also... ```js
if (b - 1 < 0) {} else {
board[b-1][c]++
}
easily simplified with ```js
if (b - 1 > 0) { board[b-1][c]++ }
easily simplied with if (b - 1 > 0) board[b-1][c]++
invert the condition and suddenly you don't need the else part anymore
removing the braces is... not always recommended.
hmm...are there any cases, it is not recommanded?
thats a easy operation
When you respect proper recommended linter setups
lol, my question got lost 😦
ah okay, interesting fact
if (b - 1 > 0 && c - 1 > 0) {board[b-1][c-1]++}
if (b - 1 > 0) {board[b-1][c]++}
if (b - 1 > 0 && c + 1 < boardSize-1) {board[b-1][c+1]++}
if (c - 1 > 0) {board[b][c-1]++}
if (c + 1 < boardSize-1) {board[b][c+1]+}
if (b + 1 < boardSize-1 && c - 1 > 0) {board[b+1][c-1]++}
if (b + 1 < boardSize-1) {board[b+1][c]++}
if (b + 1 < boardSize-1 && c + 1 < boardSize-1) {board[b+1][c+1]++}```
something like this should work right?
const resolveFolder = folderName => path.resolve(__dirname, "..", "..", folderName);
const commandsFolder = resolveFolder("commands");
fs.readdirSync(commandsFolder).map(async(dir) => {
if (dir.endsWith(".txt")) return;
fs.readdirSync(path.join(commandsFolder, dir)).map((cmd) => {
const pull = require(path.join(commandsFolder, dir, cmd));
delete require.cache[pull];
client.commands.delete(pull.name);
client.commands.set(pull.name, pull);
if (pull.aliases) {
pull.aliases.map((p) => client.aliases.delete(p));
pull.aliases.map((p) => client.aliases.set(p, pull));
}
});
});
``` Does not work, It does not reload the commands
guys
my bot is like..
EXTREAMLY slow..
It takes it like 10 seconds to reply..
and its only in 17 or so servers..
😐
You did something wrong in your code
or internet broke
no, does not help
Im litilary next to modem.
I checked it and I found nothing wrong..
no like, modem to internet, not computer to modem
every guild by me uses 2mb ram
wify
wifi isn't internet. wifi is your local home connection
do an internet speed test
@jade saddle its arround 230s.
Random question but, is there a length limit for vanity url?
idk
I think there is..
what its showing.
lel
can you like screenshot the result screen
my ping is 10.
MPBS is not mb/s :c
Speed looks great, so definitely not a problem with your internet then
Sounds like a code issue - 10 seconds is simply way too long even for a show internet
What sort of command are you running?
1000X awaits lol, probably they are waiting for something
help command
👍 1ms ping
are the all in a file?
you edited it lol
hmm edited it?
Is every command slow or just those ones?
I got a command handler
portland OR.
protip: Inline is deafult on false
o
hi
might be a bit more efficient to define the embed when you first start the bot
so like
ping is stupid
const (embedname) = new Discord.Messageembed?
don't ever compare it
ya..
const help = new Discord.MessageEmbed()
.setTitle("Minesweeper Bot")
.setColor("#E6E7E8")
.addField("ms/small [difficulty(1-3)]", "Generate small game (6x6)", false)
.addField("ms/medium [difficulty(1-3)]", "Generate medium game (8x8)", false)
.addField("ms/large [difficulty(1-3)]", "Generate large game (10x10)", false)``` put that at the beginning of your code
ping is quite literally how far you are from the server
and just call "help" every time you run the command
it really only matters when its super high
ping for a bot matters
because thats bot -> discord
a speedtest tho
thats internet -> the random server
hello, I made a new update for my bot which was running completely fine in the test environment, but when I ran it on the standart version it seemed to loop in this error
therefore if you do it at some Uni, its gonna be low. Even when you could be miles away from discord servers
I read that Discord Client extends the node emitter or smth, could I have too many shards that I need to increase the emitter limit mb?
can't even run the index.js file anymore
lol
cuz it does
I got this:
it extends emitter
module.exports = {
name: 'ban',
execute: async (client, message, args) => {
if (!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send("You can't use that!");
if (!message.guild.me.hasPermission('BAN_MEMBERS'))
return message.channel.send("I don't have the right permissions.");
const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
if (!args[0]) return message.channel.send('Please specify a user');
if (!member) return message.channel.send("Can't seem to find this user. Sorry 'bout that :/");
if (!member.bannable)
return message.channel.send(
"This user can't be banned. It is either because they are a mod/admin, or their highest role is higher than mine",
);
if (member.id === message.author.id) return message.channel.send("Bruh, you can't ban yourself!");
let reason = args.slice(1).join(' ');
if (!reason) reason = 'Unspecified';
member.ban(`${reason}`).catch(err => {
message.channel.send('Something went wrong');
console.log(err);
});
const Discord = require('discord.js')
const banEmbed = new Discord.MessageEmbed()
.setColor('#FF0000')
.setTitle('Member Banned')
.setThumbnail(member.user.displayAvatarURL())
.addField('User Banned', member)
.addField('Kicked by', message.author)
.addField('Reason', reason)
.setFooter('Time banned', client.user.displayAvatarURL())
message.channel.send(banEmbed);
console.log("Ban command had been ran..")
},
};```
which you likely use already
DiscordAPIError: Invalid Form Body
ya I do..
the reason you can use .on() and .emit() is because its constructd with super() with the event emitter
aka its extending
smug, not you
oh
@smoky herald referring to this person

as far as too many shards, realisitically its completely up to your processor/threads
theres no "hard limit" on shards
I made a cool npm module, with all moderation commands and db. But I wont publish it. Bc it doesnt fullfill the standards of @Not Erwin#8753 lol
though you'll hit the maximum your processor/threads can handle depending on how many you'll be spawning


good, keeping NPM a friendly and clean place
you should be stringifying or checking some stuff
i assume the issue is
.addField('User Banned', member)
.addField('Kicked by', message.author)
either one of those
sooo, each client.on in shard counts as the emitter, meaning the more shards the more emitters, meaning the "possible leak" isn't really correct and increasing the emitter limit is sufficient?
I'm currently at 13-14 shards with 13.8k servers and the hosting machine is 2 virtual cores I believe
while they SHOULD turn into string called with toString(), tehcnically you passing an object to where it should be a string
I.... dont understand.
discord.js should have a sharder for it, you shouldnt need a client.on(*) any
fields: [{
name: string,
value: string,
inline: boolean
}]
this is the shape your fields must have
as per discord api documentation
require.cache[require.resolve(`./dev/eval.js`)];
``` why doesnt this work lol,
```errror
cannot find module './dev/eval.js'
``` I want to reload a command in a category
member is an object
same for author
you should be passing a string
not an object
this is one of the downsides of not using ts, typescript would warn you about that
@quaint wasp
typescript would tell you about this error before you even ran the code
it works with ./eval.js , but when I want to reload a other command in a other category. It causes the error
as for you, that usually means you got too many, you realisitically dont need that with internal sharding, though if you're using a sharder, thats a different story
what do you have rn in terms of code?
internal or cluster sharding?
I'm using the inbuild discord.js sharding manager
hmmm i havent used d.js sharding, you might need to ask someone who knows more
i know about sharding, since i use it myself, but not in d.js
even though i know a bunch, im not going to give input on something im not sure of myself
nvm , fixed itmyself
i use a better lib 
o.
so I just have this in the index.js that I'm running and the client.on() "ready" and "message" in the app.js file
detritus clan
whats your problem?, I am good at sharding lol
so it should be.. ''?
what?
the stuff surrounding the message?
I restarted my bot with a new update which was running just fine on the test bot, but I started getting this error
#development message
👀
that might be the cause then
Flash emojis are not allowed 😦
that has nothing to do with it, i explained, you're passing an object, its expecting a string

shit too flashy
dang
📸
thats what she said
is it?
yeah, it glows in the dark
read the error lol, it says to append the max event listner
thats a bot probably, which just take action on gif emojis
huh
and your code pls
well it directs to memory leaks, would be increasing listeners a solution in the case something is looping in the code? I don't even properly know how to append the max event listeners tbh, first time I read that term 
client.setMaxListeners(<number>) should work
I had this error a while ago, when I was doing some tests. How much memory does your device have?
i had to set my listeners dynamically for my other project
i should've added that to the cursed code i've created
lol
aight, Ill give it a try
it has 4gigs, it didn't go above 2.2 of usage before this restart
thats not a solution lol, thats hiding the error
i dont think you quite understand how bad practice what i did is
the issue is that i knew what i was doing
you're adding data and error listeners to the same emitter, not different emitters
any half baked dev would tell you how critically dangerous what im doing is for a coding evnironment
actually
while tim is here
@quartz kindle let them know how good this is

I want to create another line in the fields, I tried to use the comma but it didn't work
code:
{name: 'PP', value: "raw: \ " + pp.raw, inline: false}
when your code has an error or something is wrong with the maxSlaves. It will explode lol
i handled all rejections properly, so it wouldnt cause issues.
the reason thats there is so node 15 doesnt crash
most stuff i have is shielded inside catch blocks
why do you need so many listeners lol
me?
ye
for this
a npm package for letting exploding your code with maxEventlisteners 
yikes
a question, what are the "__", how are they called?
a 💡
usually you append _ for stuff thats used internally
since the lib im using already has stuff internally, im adding my own internal
so i stacked 2
...
Wait, dont you need a package for underscore? or does node.js has it on default?
probably a really shitty design, but since it was already super complicated i went for adding/removing listeners on the go
huh?
usually people use _ for lodash
wait not what, my typos 😔
but not, apart from global theres nothing js provides out the gate for you
hello
well, you could easily increase/decrease max listeners instead of setting a global max
any good free service to host 24/7?
increase when adding, decrease when removing
your computer
and you load the require on the dash xD 💡
that would work, but i went for 50 simultaneous messages/events per shard(slave)
repl.it hacker plan
yea but turns out
you get it 6 months free, when you are a student
heroku only has 20 days a month and I need to add a credit card for that extra 10 days smh
do you have a credit card or nah?
no

glitch or heroku
or just get a separate rig like I have
Repl is fine
heroku only 20 days a month
i heard some token leaks from rpl
and run that 24/7
repl is better than glitch
glitch is shit
i recall someone mentioning having their tokens stolen from repl
from repl? token leaks?
lol
token leaks you mean from .json files or .env
i assumed that too
but they showed it wasnt posted
and after they changed, it got leaked again

i really dont recall who it was
Sounds like just dumbassery to me
i assumed too, but i kept it in mind
repl is a big company, I dont think that they leaks token
Assuming their server did not get hacked
I hate heroku, 20 days free hosting but need to add a credit card for that extra 10 days

I can't literally start the bot
after you putted in not Erwin setmaxEvent.... ?
there was this really weird bug with linux and discord.js
it was using .flat and apparently javascript on linux doesn't have that
what?
or node on linux
yeah make sure you update
i use node on linux
lol
absolutely bs
i just removed the lines it was on
im using ubuntu
and it worked fine
you are probably on node 11
^^
array.flat() was introduced on node.js 12.0
update your node my dude
hmmm
it didn't occur after I added that line, once I got the leaks message and terminated the process, I couldn't run it again
ok
you're likely using the outdated linux node
that's pretty possible, but would it just making trouble now?
you have to install node directly from the node website, or using node installers/managers
the linux repos for node are always outdated
no but remember node 15 crashes on ANY unhandled/uncaught rejection
so unless you're coding your bot properly(which i can see you arent), dont update to anything beyond 15
Node 14 is good or should I update to 15?
oh lol, thx
downgrade it to 14.x
okok
uhhhhh
so sudo apt-get install nodejs won't work?
I followed the directions on the website
how should I do it then?
you can try this https://github.com/nodesource/distributions/blob/master/README.md
or install nvm from github
@opal plank could you pr buckets (limits) into this? https://github.com/discord-rose/cooldown-middleware
I finally got it
hell nah
pog
lmao
lmao
same, but not same for the im working part
lmao
i literally just stare at my code for a few hours instead of... working on it
same
i dont even stare at it actually
i just think about it 24/7
but never do it
staring at code is boring
just think about working on it but never do it
i code in my imagination and in my dreams
your dream says:
syntax error on line 34
line 42*
i've had moments where i'm very tired and i have a problem in my life and i find out the solution in my head to that problem with programming... then i remember that you can't do that

hahah
I want to this too
thats what I did
and I followed what it said
is there ever a case where a bot can reply to a message in a text channel using msg.reply, but cant use msg.channel.send?
no you need it
idk, normally if the bot has send permissions both should work
actually, reply is basically sending a message while mentioning the user
so prob not
and which version did it install? do node -v
version 10

ye thats old
thanks, that's what i'm thinking too
o h god

yeah so then i'd use the package in the internals as well
use this then https://github.com/nvm-sh/nvm
use what hen, tim
o wait
just like ez import { RestManager } from '@disord-rose/rest' or something
for the curl command
i still think [ object Object ] should have custom cake role
I didn't know some people's birthdays lasted 2 days
look Tim’s like the queen
ez, birthday on feb 29
he's gonna have cake role for the next 4 years
<@&330168063729074177> bonk
i would actually laugh my ass if he kept it
ez tim ping
Tim does not consent to having his cake role taken away
can someone help me message.guild.members.cache.random(); is returning undefined
no members cached
2024 tim gets cake role for the next 4 years

is .random() even a thing in collections?
yes
yep
Even though I only call for one message to be send, why is my bot going back over and sending a second message? Basically doubling down, only one node processes by the way I already checked that.
yes
onteoresting
so is there a way to fix it?
very onteoresting
cache members
how
do u have the members intent
await message.channel.send(`Okay ${message.member.displayName}, this will take you about 15 seconds! (I will give you your results)`);
setTimeout(function() {
if(x <= 20) {
return message.channel.send(`No damage to the cuffs when you tried to pick them, but you're stuck still.`)
}
Why would this be sending two messages?
yes
lol, when it took 2 days to born you 🤣
i do
lmao
go do Discord Dev portal and enable the toggle for member intents
idk how djs works anymore ask in their support server
add it in clientoptions in ws
ws?
ws: {intents:["GUILDS","GUILD_MESSAGES", "GUILD_MESSAGE_REACTIONS", "GUILD_MEMBERS" ]}
})```
ah
wait check now 
still undefined
show me how you fetch the members
wait what
message.guild.members.cache.random()
intents is a number
It takes an array
what should it do?
get a random member
read the first line
oh yeah i probably should have said im using discord.js
@misty sigil client: Client = new Discord.Client({
ah
it would be idiotic of me to call detritus Discord
type script
works fine for me, can you log out message.guild.members.cache.size?
it works
(im using
if(message.content) { console.log(message.guild.members.cache.size); } to log)
@tired panther
now replace .size with .random()
its logging this
ah if i do .tag is undefined
which is what i was using
random().user.tag yes
random()?.user.tag

wait got it
just supported on node 14
so leviathan?
properly check if random() returned something
no, genshinUtils
advertise moment lol
leviathan is my twitch/discord bridge bot
ur css is pretty easy i can do, but how to change vote buttons,report button, with like colors and stuff like before

wdym?
Because you hover to ALL which is indeed number no? What if you hover the intents parameter, docs say it is IntentsResolvable which is including but not limited to number or I'm just too sleepy
discord just did big lag
types says number, im going with it

like
adding like animation etc
one thing i've learned is
css breaks
easy
REALLY easy
copy pasting small things work
lol
but the moment you try to adjust it to all platforms and window size it fucks up
REAL good time
i can make this
https://top.gg/bot/724847752449753140
but i wanted to change vote buttons etc but top.gg removed it in the latest update
that bot is in 5kservers
or having custom commands feature
bruh
it still there tho
my bot is all in one and only 100servers
SDK
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
thats a bad bot, it just has give, take role and small stuffs
i know right but 5k servers
my bot is all in one and i recently released it but only 100servers
dumb ppll invite it, like the npm package is-thirteen
i got my first 100 servers within the 5 days i made my bot

i learned from watching my cousin steal other people's myspace designs
kinda blew up
idk for me almost 2 weeks cuz when i made my bot it had only 1 feature that is chatbot
and 1 command but now it has 100+commands
one sec










