#development
1 messages · Page 1657 of 1
AbortError: The user aborted a request. what is the error?
bloated code++
request timeout. Either your client's connection reset or Discord took too long to respond
should I make it more bloated?
Seems like a high level interface for a simple task
@tired panther replace(/.*(a|b|c|d).*/gi)
oh
@delicate zephyr
.* could match the entire string
correct
its called cramping code
I already knew this solution lol, but I ask for faster ways 
You don't need to account for that. You can use boundary characters
ah oh, wew no, there isn't
oh that's what you mean... yeah god damn - was thinking about a different case/app
not needed for js
it was a pattern for searching a string and I wrote replace in front of it, lmao


happens if your fingers and your brain aren't working together
it happens
just wait another 10-15 years and you will feel like I do
is this the limit of bloated code?
im back >:)
hi back
:)
needs to be longer
run your code through a minifier
already did
im making a purge messages cmd
there is an error
but i cant find out what it means
What's the error
how are you sending messages? since channels arent cached you cant message.channel.send() cuz theres no channel
you either message.reply() or send it via raw gateway with request with the channelId payload
same as above
I used ctx.reply
ctx being Context
use conetxt.message.reply()
your Message variable is named message not msg
ive had that before too
so i should have this
realistically you'd wanna cache guild/channel though
Message.startsWith isn't a function either. it should be Message.content.startsWith
msg.startsWith message.startsWith
content is the string
where do i put
msg.content.startsWith
@cinder patio you can always do what i said and use rest which doesnt require cache, the way you're approach is using the cached method
replace the message.startsWith
with
message.content.startsWith
do i put message or msg
Alright txn
thx
message
if it says msg is not defined and you use a mixture of both msg or message, you should choose one or the other
let channel = await context.client.rest.createGuildChannel(context.message.channelId);
channel.createMessage('hello world')
this is doable too
hm
is this detritus
yeah
why is the method called createGuildChannel
that's a bit misleading
"message not defined"
cuz you can create different channel types
use only msg
DM is dm channel
oh Erwin is here
But doesn't the function fetch it
the rest is guild related as parent
basically
@lament rock said to put msg
How do you define your message variable in the client.on("message"
if message is not defined and msg is not defined, what is defined?
good question
getch
in my other commands i have a mix of msg and message
If I were to see that without knowing I'd think it creates a new guild channel
You shouldn't do that unless you're assigning a new message to a variable
and put something in the ""
If I were to see that without knowing I'd think it creates a new guild channel
getGuildChannel() would probably be a better name
ye
then there we go, you can use rest directly to send the message with the id
without any cache
as long as you have the channelId(which should always be present on message payload) you should be fine
no, your .on("message"
should look like
.on("message, msg => {
// put your code here
but you can swap msg with whatever you want to cast your message variable to
so
personally i would recommend to keep channel cache, but its up to you
i should replace all "msg" with "message"
I don't need any channel data
Just take a look into your code and see which name you've choosed
then use the method above and you should be golden
personal preference on how to name your variables. It has no effect on how things work
grafana setup time pog
where do i put it tho
<client>.on("message" ... should be in your code somewhere already
Where you have your code for checking command stuff. Where does the message variable in your code come from?
Do your other commands work?
You should be doing it similar to those.
all my commands work
except the RemoveMessages one
i have a ban command, a kick command, and a embed command
What are you doing differently
i cant rly tell
do u want to see one of my other commands
and then see the purge command that doesnt work
Just show the code a few lines ABOVE your first command
so, considering discord lets 9999 people share the same name
there you go, your var name is message
Are you doing a client.on("message" for every single command
so i should put my variable as message on all commands
it's possible to rate your discrim, u just need to find someone with your same discrim and set yor name to theirs
do not do that
all the commands that work have one
omg... I didn't see his last line
the command that doesnt have one doesnt work
I'm not even gonna help here lmfao
:/
It's bad practice to do that, since all of the event listeners are triggered and that requires more processing when everything could be routed through 1 listener. You should look at a tutorial for command handling
so doing that would make my Bot slower
how you have it, it would be
ok
In simple words put all of your commands into the listener
so what should i do in replacement
you could also run into logical errors the current way it is
look at a command handler example
hard to describe in words
cant you type what to put instead
No. Not gonna type code on mobile lol
Look at examples and cherry pick what you think is relevant
wont changing it mess up the command
client.on("message", (message) =>
{
if(message.content.startWidth(...)) ...
else if(message.content.startWidth(...)) ...
else if(message.content.startWidth(...)) ...
}
thats what i have rn
It does not work
lol startWidth
string.startWidth is not a function xd
As we told you already, DON'T create a new listener for each command
should all commands be on the same listener
You mentioned you have 1 message event for each command, the way they showed was having multiple commands in 1 event listener. You can make use of multiple if else statements in the same scope
client.on("message", (message) =>
{
ALL COMMANDS IN HERE
}
NOT another client.on (listener)
oof... what a complicated case
wait
too lazy to edit it... doesn't matter in this case anyway I guess

looks correct
u sure?
at least do an else if instead of if
wont putting all my commands on one listener slow it down a LOT
At a glance, looks okay. Not gonna check all of it since I'm short on time
const Client = require('../structures/Client');
const { Messege, ReactionUserManager } = require('discord.js');
module.exports = {
name: `modmail`,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
if(client.threads.has(`${message.author.id}`)) return message.channel.send(`You already have a ticket open!`);
const Channel = message.guild.channels.cache.find(ch => ch.name.toLowerCase().includes("modmail"));
if(!Channel) return message.channel.send(`There is no mod mail channel`);
const newChannel = await message.guild.channels.create(`modmail-${message.author.id}`, {
type: 'text',
parent: client.catergory,
permissionOvwrwrites: [
{
id: message.guild.id,
deny: ['VIEW_CHANNEL']
},
{
id: client.role,
allow: [`VEIW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
},
{
id: message.author.id
allow: [`VEIW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
}
]
});
Channel.send(client.embed({
description: `This user ${message.author.tag} (${message.author.id}) is creating a modmail thread! Created in ${newChannel}`
}, message));
}
}
``` Help meh my second allow is underlined red
Still yes.
One message removed from a suspended account.
on the contrary, it will be faster
One message removed from a suspended account.
this
,
One message removed from a suspended account.
One message removed from a suspended account.
also, no. Imagine this:
you have 15 scopes listening for the same event:
when that event fires, all of the listeners are looped through and triggered with the data from the event that triggered and they do their own processing as compared to 1 doing it's own processing for every command since 1 message can only contain 1 command, logically speaking.
lul true
with all events in the same listener, the internal event emitter will just do runMessageListener(messagedata), if you use multiple listeners, the internal code has to do runMessageListener(messagedata); runMessageListener(messagedata); runMessageListener(messagedata); etc...
well at least he did some work to remove all the comments lol
and I thought he copying the embed example code was bad
oh ye I didn't put a , after id:
wdym
i watched youtube vids
Is there a way I can get function of setInterval?
One message removed from a suspended account.
assign the function to a variable
then use that variable in the setInterval
i dont get what u mean
The function was important and I deleted the message
the odes i have arnt 100% original
One message removed from a suspended account.
inb4 they nest their listeners
One message removed from a suspended account.
for the embed?
One message removed from a suspended account.
setInterval(() => { function() }, (9999 * 100));
One message removed from a suspended account.
what command r u talking bout
const someFunc = () => {
doBlaBlaBla();
//whatever
}
setInterval(someFunc, time);
One message removed from a suspended account.
I asked for something else
well then try to ask again
You should learn JS a bit more before trying to make a bot. You could possibly put users at risk who depend on your bot and think it's reliable if it isn't and is being developed by an amateur. Nothing against you, personally.
I wanted to get the function I used in an Interval
i watched youtube videos on how to make the commands
One message removed from a suspended account.
I just said how
One message removed from a suspended account.
setIntervals are anonymous
no
One message removed from a suspended account.
HOWEVERE
i watch new vids
you can do this
DiscordAPIError: Invalid Form Body
parent_id: Not a category
at RequestHandler.execute (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async GuildChannelManager.create (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\managers\GuildChannelManager.js:112:18)
at async Object.run (C:\Users\ravi_\Desktop\Discord Bots\Mail\commands\modmail.js:15:28) {
method: 'post',
path: '/guilds/821471322885718076/channels',
code: 50035,
httpStatus: 400
``` I got an error
One message removed from a suspended account.
One message removed from a suspended account.
const interval = setInterval(() => something, time);
There is no way to access ticking timers without assigning them to a reference
Ok
Might have to write the code again
One message removed from a suspended account.
One message removed from a suspended account.
ok
i get that
i also use the discord.js help page
they constantly update that
also
i came here to ask for help with a cmd :/
if you're used to copypasting, you'll not learn WHY a code works but HOW a code works
why is more valuable than how
aye and you got your answer where to write your commands
you become dependant on others
I'm also unsure if you can access functions initialized with a NodeJS.Timeout
They'd have to hold a reference somewhere, but idk if the reference is actually anonymous or on the Timeout instance itself
don't ask for a fish, ask to learn how to fish
indeed
and you got your answer to use the var name message instead of msg according to your code
i am, im looking up javascript videos and websites and im trying to learn. Its the same way that i learned Lua. I watch videos and look up functions and what they do.
and im asking for help
videos are too bad for languages like javascript or java
DiscordAPIError: Invalid Form Body
parent_id: Not a category
at RequestHandler.execute (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async GuildChannelManager.create (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\managers\GuildChannelManager.js:112:18)
at async Object.run (C:\Users\ravi_\Desktop\Discord Bots\Mail\commands\modmail.js:15:28) {
method: 'post',
path: '/guilds/821471322885718076/channels',
code: 50035,
httpStatus: 400
}
``` An error Help!
those langs update too often
so i can learn why something work and others dont
we still dont magically know your code
first of all start with an empty bot
i did
like, the most barebones you can get
lol here
no you didn't
yes i did
you started with an example code
i made a empty file
then pasted the code
i started with youtube videos
This is what I used to begin my learning on JS. It's decent https://www.codecademy.com/learn/introduction-to-javascript
where i wrote the code
const Client = require('../structures/Client');
const { Messege, ReactionUserManager } = require('discord.js');
module.exports = {
name: `modmail`,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
if(client.threads.has(`${message.author.id}`)) return message.channel.send(`You already have a ticket open!`);
const Channel = message.guild.channels.cache.find(ch => ch.name.toLowerCase().includes("modmail"));
if(!Channel) return message.channel.send(`There is no mod mail channel`);
const newChannel = await message.guild.channels.create(`modmail-${message.author.id}`, {
type: 'text',
parent: client.catergory,
permissionOverwrites: [
{
id: message.guild.id,
deny: ['VIEW_CHANNEL']
},
{
id: client.role,
allow: [`VEIW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
},
{
id: message.author.id,
allow: [`VEIW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
}
]
});
Channel.send(client.embed({
description: `This user ${message.author.tag} (${message.author.id}) is creating a modmail thread! Created in ${newChannel}`
}, message));
client.threads.set(message.author.id, {
channel: newChannel
})
}
}
``` @boreal iron here my code
the only thing that i have copy and pasted was the embed code, and ive learned enough to change almost all variables and still have the command work, exactly how i want it to
VEIW
Looks like Timeout._onTimeout is the reference to the callback function. You just need a reference to the Timeout
VEIW_CHANNEL is a typo:
VIEW_CHANNEL is correct
I guess that's not the only error
I got a new error
DiscordAPIError: Invalid Form Body
parent_id: Not a category
at RequestHandler.execute (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async GuildChannelManager.create (C:\Users\ravi_\Desktop\Discord Bots\Mail\node_modules\discord.js\src\managers\GuildChannelManager.js:112:18)
at async Object.run (C:\Users\ravi_\Desktop\Discord Bots\Mail\commands\modmail.js:15:28) {
method: 'post',
path: '/guilds/821471322885718076/channels',
code: 50035,
httpStatus: 400
}
Code is
The ID you passed doesn't belong to a category channel
const Client = require('../structures/Client');
const { Messege, ReactionUserManager } = require('discord.js');
module.exports = {
name: `modmail`,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
if(client.threads.has(`${message.author.id}`)) return message.channel.send(`You already have a ticket open!`);
const Channel = message.guild.channels.cache.find(ch => ch.name.toLowerCase().includes("modmail"));
if(!Channel) return message.channel.send(`There is no mod mail channel`);
const newChannel = await message.guild.channels.create(`modmail-${message.author.id}`, {
type: 'text',
parent: client.catergory,
permissionOverwrites: [
{
id: message.guild.id,
deny: ['VIEW_CHANNEL']
},
{
id: client.role,
allow: [`VIEW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
},
{
id: message.author.id,
allow: [`VIEW_CHANNEL`, `SEND_MESSAGES`, `ADD_REACTIONS`, `ATTACH_FILES`]
}
]
});
Channel.send(client.embed({
description: `This user ${message.author.tag} (${message.author.id}) is creating a modmail thread! Created in ${newChannel}`
}, message));
client.threads.set(message.author.id, {
channel: newChannel
})
}
}
so what to take off?
and add
const type = types[args[0].toUpperCase()];
if (!(args[0].isNaN() && type)) return message.reply(`${type} Isn't a valid type, or ${args[0]} isn't a number!`);
It says args[0]#isNaN() isnt a function
@lament rock then how do I check if it is a number
isNaN(...)
@cinder patio how you enjoying the lib so far?
It's nice, I haven't worked with it much though
arguments are a little confusing though
parsedArgs?
the second argument from the run function
heres a little trick for you
Is it a CategoryChannel object or the ID of the category
async run(context: Command.Context, _args: ParsedArgs): Promise<any> {
const message = context.message;
const cc = message?.client.commandClient;
if (!message || !cc || !message.channel) return;
use this and you'll have it exactly like discord.js
Guess he wanted to use channel.category but copy and pasted the code...
actually
my bad
async run(context: Command.Context, _args: ParsedArgs): Promise<any> {
const message = context.message;
const cc = message?.client.commandClient;
if (!message || !cc || !message.channel) return;
let args: string[] = _args[this.name].split(/ +/g);```
CategoryChannel.toString(); // "<#id>"
ah, what about the args property in the command object?
parsed args comes with the name of the prefix that you have
optional chaining
let me check rq
node 14 feature
oh i guess you can use that too, but i never used it before
im still using the command as if it was d.js's
so i cant help much with that one
oh good to know
I tried using it but it didn't change the args arg at all
could give it a try later, but it would probably be best to ask cake of evans directly
ads! mods!1!
const type = types[args[1].toUpperCase()];
Why is this undefined if args[1] is equal to D6
[
"D6"
]
Arrays are indexed by numbers
arrays start at 0
going with that mindset, posting discord.js discord is also ads 
Array<T>.indexOf(item: T): number
🤦♂️
erwin I am ad
you just earned another 100 bucks I guess
Posting link to Discord api server is ads /s
dunno what you talking bout
that's what you get for using lua


what is types?
I need to use indexOf
jobless reincarnation. Poggers
ikr, amazing LN
and how did kuuhaku know I was from lua
true
because it's the only language in the world that arrays start at 1
also it's a BR lang
bronzil
that's why its bad
brazil
Come to Brazil
100% jesus country
huehuehueland
auhshushaushusauhsauhsa*land
saokspoakspoakps-land
that escalated fast
youblinkurobbed-land
kkkkkkkkkkk-land
Erwin doesn't need to steal it... he got rich cause of all the ads
Nah I don't wanna get murdered by the cartel

my income is based off how many people i invite to the cult use detritus
lmao
I'm yet to find a modular interface for voice
Detritus?
yeah detritus pog
I tried to make one from djs code, but djs' internal code and code quality sucks
kadching
you be casually talking in#development
and then katchau
le erwin appears with detritus ads
Why use some high level client when you can use djs?
Same question here
djs is high level
better memory performance? out of the gate command handling?
Use djs... Which has normal complexity
lmao
theres plenty of reasons
Why use a wrapper when you can build http requests yourself
https://million.is-a.computer/files/kE6Yga7xj6iX7oxU.txt million was testing the library
@opal plank bro im pogging
Use commando for that
tf is discord-rose
those tests are not a good indicator btw
you would be sad if there's no troller in this channel 
correct
too small of a sample
80 guilds most inactive
why use http requests if you can send electrical current directly through the ethernet cable
@nimble kiln @old cliff #development message you can always check this if you want to see how handy they make command handling
you either do it yourself or stop doodling about it 
told ya to benchmark their performance
you ignored it

alright good, so I can stick with d.js
gib data[
plus comparing different caching designs is not fair if they are not caching the same data
I was doing all cache disabled
I write my own interfaces for what I need in mem. Minimal garbage
agreed
sometimes my bot restarts out of nowhere, and i just noticed its the Garbage Collector colleting the whole process
When your bot detects that the bot itself is garbage 👀
Do you send the process a SIGTERM or something
is it possible to set up a webhook to send a msg on my server when someone votes for the server on top.gg? I'm not really sure how webhooks work with top.gg and i think i got told i can't use discord webhook links in the top.gg webhook area
Apologies if it has been answered earlier, i didn't see a msg so could someone ping me if they have a answer.
Is that an old client?
ah wait. Not SIGTERM. I forget which one forces node to take a heap dump
what lang?
process.exit(1) is the proper way to dump the bot
ctrl C
SIGINT ftw
I always used process.exit(0) for some reason 
lol
But I'm not catching the error code so it doesnt matter
what is error code 1?
process.exit() :^)
+1
exit code 0 means success
hi
an error
oh it does? ok then I always used (1) to exit my bot 😛
specific exit codes can allow for exit handling so that the process can clean itself up before exiting
any status other than 0 is an error
i meant a discord webhook. which can sned a msg when soemone votes for my server on top.gg. i'm hoping to do tis without having to host something
you can do process.exit(42069) it'll still be an error
a nice error
you have to host something
there's a bot that does that iirc tho
damm, thanks anyway
When I start my bot it says "undefined"
does anyone remember its name?
which bot would that be? cna you link it?
I don't remember its name
translate pls
it is
this one? a few popped up
@opal plank I request you flex your grafana
yeah, that one iirc
When I start my bot to it, it gets an "undefined" error like this
translate to EN
true
hey, i made this all by my self because im a BIG BOY >:)), it doesnt work, the error says that it cant define 'Amount'. Does anyone know what i did wrong.
but what is it supposed to show?
Translate this to english
we don't speak turk
it says guild delete
don't use capital A
Also translate this
at last
there's also this one, guess i'll inv both and see which i prefer
RAM usage spiked at 600MB while using discord.js. Post the last spike, I moved off discord.js
there's no remove.Amount
i thought that would be the case lol
should i just do
- amount
Discord did a poopoo and threw a bunch of GUILD_DELETE
@final lynx Stop copying stuff. Think about what u do.
if (!message.content.startsWith(prefix) || message.author.bot) return; is copied, once again
I could write that and people could say that
looks like brazil roads

LOL
if (!message.content.startsWith(prefix) || message.author.bot) return;
by to remove a message, would i put
message.channel - amount
or something else
(amount is the variable)
wat
im trying to delete messages
TextChannel doesn't have mathematical expressions
the fek
you want to delete a message? or remove a word from the content before you parse it?
so this?
wat
tim be like
To get to know how to get the arguments your user enters
first of all, you're not supposed to have any command inside an event
And think about it instead of just copying it
use a command manager to prevent cluttering
don't...
meant don't waste your time
with command managers?
we tried to explain already
oh, that
That's what I do and it works good 🙂
it's not like things need to be repeated over and over again (for the same person)
I would call that bad practise, too
this also works good
https://media.tenor.com/images/413f2b6ec63fa204da27c4e6ce05e66b/tenor.gif
yeah
yet we can't say it's right
haha lmao
I think you're crazy
a bit maybe, yes
i also think im crazy
I dont see any performance degradation when I do what I do
so this is what i should have
well better crazy than boring
So I dont have the need to rewrite it
it's not about performance, but about maintainability
also overhead
can somebody help me editing my desc
the amount is still wrong, very wrong
By now I know my 4000 line long index.js file very well
you cant do mathematical operations on text
I can maintan it pretty good
@earnest phoenix
what should i put to define "amount"
@unreal estuary do you have programming experience?
you need to process the text using textual tools
such as .slice()
to extract parts of the text
i mean
what is it supposed to be
or split() to divide it into pieces
programming with java, javascript, python, etc
or splice to remove
or length() to get the length.. woop woop
message.content - (prefix + "RemovedMessages" + " ")
no
lol
don't mind that, it's wrong
that doesnt make sense @lyric mountain
yeah ik lol i was asking what they were trying to do 
the code wont magically understand what you want
you need to be extremely explicit with it
trying to get the amount arg
well it should 😠
ah
let him think
well u could split the message content by spaces?
if(command == "ban") banTheFuckingUserIGotInMyMind();```
_that's not how coding works_
it does something now
lol
pog
@opal plank Can I opt-out from the command tracker? 
im having a lot of trouble defining "amount"
Hey @twilit rapids, sorry for the ping. I wanted to ask you about 16x sharding on d.js w/ kurasuta. Can we take it to dms?
ok first, what do you want the amount to be
i want my amount to be the number after the command, so if i put ()RemoveMessage 3
i want amount to be 3
ok
as Tim already, read the docs what slice() does and how it works
nobody will help u if you refuse to learn the JS basics
maybe start with something simpler than a discord bot?
i have
like what?
i can use Lua very well
looks like fun
javascript??
once i finish work i wanna work on the bot for a bit
im using javascript rn
Uh sure just ask, I'll be able to respond in like an hour though
Not at home rn
did you read the docs about string.slice()?
yes
and?
yeah so do something simple with javascript not lua
need to fix my logging for MongoDB inside of Grafana. fucked there something up
@opal plank Don't ignore me! #development message
i can make a simple embed cmd or kick cmd
i want to help but i dont want to spoon feed you the answers lol
just describe what your bot does, if i can manage to do it for a bot with 6 commands you can do it too (got approved)
if you're used to lua you could just make a bot in lua
did u learn what .slice does?
what do you guys have your ws ping stable at?
can you make a discord bot in Lua???
like tim said
all of it
yes
nani
ok look it up first
you can make bots in anything that can make http requests
you can make bots in all languages
huh
you decide
around 100 MS
dont judge but i use Lua for roblox studios
ok
18 gang
oh no! OVH
you mean NaN?
Infinityms
you survived the fire?
(Not Straßbourg
)
20-25ms / TS Pittsburgh
probably 9999999999ms on the next fire
lua looks like javascript
Gravelines france
pogging
abit
jeez no
You mentioned a modification to d.js for supporting 16x sharding on kurasuta that worked for Reaction roles I think? Can you help me out with the modification?
thats what I thought for a sec
well i dont think there are API servers in europe atleast none you can ping directly
is this lua lol
yea
I'm also on the Lua train but for TBOI
it looks like discord.js
its not
Binding of Isaac mods? 
just saying
what command tracker?
ok
it's just naming convention
Indeed
the syntax is totally off
way off
Looks like you track which client is running which command
which client?
also, what's the reason for ß to even exist?
im confused as to what you're asking tbh
isn't it always ss?
OH GOD... USER
yes, im tracking which user uses which command, where and when
since its for logging and debugging purposes, not really
moon not here
why does it matter?
woah it rlly is
its s f w
#development moment
@boreal iron why do you ask?

LOL
you see nothing
mooni
Hi. I'm complaining about the MC-AT Discord Bot. Yes it's a very nice bot but for some reason my server is afk and therefore I can't run commands so I'm complaining.
stink
nah just wanted to ask if a client USER can opt-out
can't help you

-wrongserver
Hey! We think you have our server mistaken. We do not provide support, help, or advice for any bot. You need to click on the "Get Support" button on the bot's page, not the "Join Discord" button at the top of our website. If there isn't a button that says Support Server, then we can't help you. Sorry :(
since its used internally, not really, the data consist by majority of discord data, not end user
I swear I clicked memes and media
Mooni bonk
of course, you arent allowed to share it, hence why every time i send a screenshot i blur the id's
wasn't sure if that panel is internal use only
I'm not confused about data sharing, just wanted to know (for statistics)
can u make ur own license for your projects?
yes
ok cool
unless you're fine with loopholes
on every command, i simply log guild, channel, userid, timestamp, command, arguments and response time
so i can make one myself but it will probably have loopholes people could exploit
hmm and I see you store all that data... I mean why not :D
its usud mainly for debugging and improvement of the bot
yes
ok thanks
with that i can see what were the last few commands used before the bot was kicked from a server, that gives me a hint of what commands are not meeting user satisfaction levels
pick an existing license to see how it works
rabbitMQ queues 
yeah, not a bad idea... my scope is a few guilds only
it's actually not a bad idea tho
so, i think i found out my problem for all my commands
mi using rmq as well
ok
Your screenshots have some stain on it
Better clean your phone
im always taking quality levels above the norm 
yes
ok
top level dashboard, custom presence, insane logging
you dont have to
whatever i do, i put 110% commitment
but its more organised
as everyone pointed before
i think it would be easier
ya
but thats just me bragging
else if (r.emoji.name === '📃') {
How do you aadd custom emojis for reactions?
i put all my commands in one file for smaller discord bots
sounds good... personal demands should always grow
<:name:id>
oh thanks
4k servers soon
or <a:name:id> for animated
i think this is where i would make the new scripts
growing at a rate of 550 servers per week now
how would i add them
dang
you dont do it from package.json
index.js
ok
thats good
\o/ hazzar it works though
doesn't sound bad even if I'm not aiming for popular bots... imma just coding for requests for stuff which doesn't exist yet
and replace "nil"
with the name of a command
then make a new file inside a folder named "commands"
and add a file into that
just spoken about discord bots, of course
with the name of the command
how would you make the code do that?
?
tis a pain to setup but once it's setup its so nice
like how would you make it do a function from the command file
i know
perfect load balancing between clusters not just per shard 
using it for my current job, its fancy tbh
but
inside of index.js
i would make commands called
else if (command === 'name) {
and inside a folder named
command
i would add a file called the name of the cmd
and then put the code inside of that
is that what im suppost to do?
no
supost*
that wouldnt do anything
ur not making the command do anything by just creating a file
you could use fs
@modest maple
that and redis are heling a lot with handling this much traffic
@modest maple
keep a copy stashed on rqm for one of my bots to parse chat moderation
are you running rabbit on docker?
oof
Me, who'll likely never get to use them practically:
:p

Oh no you revealed your IP address


Already hacking into his mainframe
Do you have a bit with 150k servers then 🤔
Oh you do

yup, sent you a friend request
@opal plank decent start? https://million.is-a.computer/files/HkyH5KjTXRAeDyY0.png
too flat metrics, but yeah
what did you use as Time Series database?
influx
nice, tried to use it but the docs are "special"
honestly im just fucking around trying to get it to work
i might look into it, tomorrow
but for now, ive got a Dashboard for my Server, MongoDB and Redis
pog
also got alerts for my server if the Ram or CPU usage is to high, if this happens i get a Alert send via Webhook into my Support Discord Server
"HALP, I'm dying"
LOL
Imagine if Icarus had a webhook for that before you Kuu 
lul
high value: 100.000000
higher value: 100.000001
ik
if(!message.guild.me.hasPermission("SEND_MESSAGES", "EMBED_LINKS")) return; my code is but not working is there a mistake?
check for channel overwrites too
Hi! Okay so you know how npm packages have this in them?
/**
* Title
* * lol
* @type {Object}
* @see {@link https://randomsite.co,}
*/
``` I don't now what they're called and I was wondering if you guys knew.
I got this damn error saying UnhandledPromiseRejectionWarning: AbortError: The user aborted a request
Damn. That's rough.
What does that mean?
Client taking too long to send a request to discord api
Were you talking to me?
wait is that Github?
No, Im writing to you
A quick-start to documenting JavaScript with JSDoc.
I already found out what they are. Thank you anyways!
mgs = (await message.channel.messages.fetch({limit:100})).array().filter(m => (!m.pinned) && (m.createdTimestamp < message.createdTimestamp) && (m.createdTimestamp > (message.createdTimestamp - 1209600000)) && (!m.deleted))``` what did i do wrong?
var db = new sqlite3.Database(':memory:');```
can anyone explain wat the memory database is
yo is that free?
it is
grafana
ah
is it hosting or just an app for your server?
dont think so
How can I get the total space of the os in js
os.totalmem doesnt seem to be accurate
The space of the OS or the drive?
totalmem sounds like memory
I asked you what are you looking for?
The DISK/DRIVE size or memory usage?
all of the above
The inbuilt process infos of node can show you at least the memory usage
if you’re using node
in d.js i am trying to get the badges can someone help
let IncludeBadges = {
"DISCORD_EMPLOYEE": "emoji 1",
"PARTNERED_SERVER_OWNER": "emoji 2",
"HYPESQUAD_EVENTS": "emoji 3",
"BUGHUNTER_LEVEL_1": "emoji 4",
"HOUSE_BRAVERY": "emoji 5",
"HOUSE_BRILLIANCE": "emoji 6",
"HOUSE_BALANCE": "emoji 7",
"EARLY_SUPPORTER": "emoji 8",
"BUGHUNTER_LEVEL_2": "emoji 9",
"VERIFIED_BOT": "emoji 10",
"EARLY_VERIFIED_BOT_DEVELOPER": "emoji 11"
};
let DisplayBadges;
for (var key in IncludeBadges) {
if (member.user.flags.has(key)) {
console.log(IncludeBadges[key]);
}
}
I get an error ```js
RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.
Not sure about the disk size tho but I’m sure there’s a lib for it
@boreal iron that is what os is for im pretty sure getting ussage is process
process.memoryUsage()
I kinda wanna get all the true stats of the host Im using
You’re not speaking about the node process but all processes and usages on the system?
Alright that’s a different story
In a website, using JS is there a way to detect if a user scrolls to the bottom of the page? Meaning they hit the end of the page?
yeah
Take a look and search for npm packages with key words, I’m sure there’s one if you think the node process infos are inaccurate
window.scrollTop > 0 means the user scrolled
You need to calculate the height and offset to check if he has scrolled to the bottom
help how to use node.js



