#development
1 messages · Page 1263 of 1
?
When I try to upload my bot, it comes up with: Error 413, Request Entity Too Large.
@open rune
Upload to what
This is my code https://srcb.in/66c0f997e3 and this is my error ```js
(node:31668) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at MemberAddEvent.run (C:\wildcat\src\events\members\guildMemberAdd.js:22:26)
at Client.emit (events.js:215:7)
at Object.module.exports [as GUILD_MEMBER_ADD] (C:\wildcat\node_modules\discord.js\src\client\websocket\handlers\GUILD_MEMBER_ADD.js:16:14)
at WebSocketManager.handlePacket (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\wildcat\node_modules\discord.js\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:210:5)
at Receiver.receiverOnMessage (C:\wildcat\node_modules\discord.js\node_modules\ws\lib\websocket.js:797:20)
at Receiver.emit (events.js:210:5)
(node:31668) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
@pure lion didn't know if you saw this message
@raven owl Probably, your file is too large to be uploaded
you need to minimize the size as you can.
Oh ok
@earnest phoenix https://hasteb.in/
it doesn't matter where
@pure lion where should i put token in bot.login(Token.Token) ?
Okay firstly
I just told you where...
Put the code in the link I provided
Click save
ok
And send me the new link
Show me token.json (hide the token)
@earnest phoenix no, never send the bot token to anyone.
No, just show me the inside of token.json but blur the token or replace it with the word token
did he send it with the token
good
😂 😂 😂 😂 😂 oh my god really? after you said not to?
what means token.json
ok
done
@pure lion check dm is it ok
@pure lion but its offline even i put the token why
@earnest phoenix send me the token.json...but don't ping me just dm me the token.json
I smell copy pasted code
he didn't even send the file I told him to send
which file?
Token.json
OH MY GOD
i dont have
🤦♂️ my brain hurts... @pure lion does your brain hurt too lol
what should i do
^
That should legit be the first thing you learn how to do is start the bot...and I said Not to ping me so I'm done trying lmao
pls some one teach me
go watch youtube
ok i dont know how to code
it was https://pastebin.com
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.
go learn instead of copy pasting code
@earnest phoenix
@naive lagoon
dude
?
that takes alot of knowledge you definitely don't have
Do you know that your first step is to choose your language
js
@misty sigil I am trying not to ping you
js
@earnest phoenix go learn base JS then
bAsIc JavAsCrIPT
https://hasteb.in/ojoruruy.js i have done code then how to make it online ?
i know the token.json now @misty sigil
@fast trench check your dm
@earnest phoenix stop
put json { "token":"your token" } into token.json
.env is more secure tho
its online
nice
Is it still deleting channels?
yes
@earnest phoenix psst i saw ur code and it smells copied
Rip I’m sorry to hear that
@earnest phoenix psst i saw ur code and it smells copied
@cinder sandal hmm
also why would you use an embed constructor
if you can use MessageEmbed
without defining the embed
Btw. “Full username” is referred to as the persons tag.
use mysql instead
Right. So much easier
or mongo atlas @earnest phoenix
@cinder sandal what should i do
undefine the embed
Learn how to code like we’ve said before
^
Wait. How else would you do an embed? I’ve only seen it like they have it? Well I do ‘new messageEmbed’ instead of ‘discord.messageEmbed’
const Test = new RichEmbed()
embed.setTitle('me an embed')
message.channel.send(Test)```
Oh yeah forgot about that way lol
this way is weird
why people use config.json tho
I learned js in less then a week and I am a slow learner
@earnest phoenix no you did not LEARN in a week, I've started in January and I only know basics
@sinful lotus just come here
@cinder sandal canu help me
@sinful lotus what's your bot?
the name seems qt uwu
@earnest phoenix also use ${message.author.tag} instead of ${message.author.username}#${message.author.discriminator}
check docs
let prefix, re
switch(typeof this.prefix) {
case 'string':
re = `^(${this.prefix})`
break
case 'array':
re = `^(${this.prefix.join('|')})`
break
case 'function':
let pre = await this.prefix(this, msg)
switch (typeof pre) {
case 'string':
re = `^(${pre})`
break
case 'function':
p = pre()
re = `^(${typeof p === 'string' ? p : p.join('|')})`
break
case 'array':
re = `^(${pre.join('|')})`
break
default:
throw new Error(`Prefix function output must be string or array. Not ${typeof pre}.`)
}
this is the whole prefix parser
@earnest phoenix also use
${message.author.tag}instead of${message.author.username}#${message.author.discriminator}
check docs
@cinder sandal I told them that earlier lol
is that js or python
js
I guess js, the lack of {} confused me
switch cases don't use {}
@earnest phoenix bro u just leaked ur token at the bottom
@earnest phoenix can u remove the token in the hastebin thing pls
pls make and save it
@earnest phoenix reset👏your👏token
pls make first
or mongo atlas
@cinder sandal something about this makes me think
you could've just said
mongo
i removed the token from hastebin @earnest phoenix
because mongo can be hosted yourself
let pre = await this.prefix(this, msg) this outputs an object @trim saddle could you log the contents?
ok @cinder sandal
now it's super-secret-token
if that error just randomly spawned out from prod, then find the guild that invoked that prefix, then check the contents
this is the output
@trim saddle log the type of that output
can some one make a bot for me
@earnest phoenix why you have so many bot.on message ...
hmm sry
@trim saddle actually nvm, just use object instead of array
it causes spam of the command
or do Array.isArray(pre)
what's wrong with js
you need to put the commands into one bot.on message
just js things u get used to it ¯_(ツ)_/¯
but either use object or Array.isArray to determine
and sorry if my brain is slow, my brain is disoriented from all the stress
@cinder sandal can u once acceptdm
uh
help
if (message.channel.id == 758216351142641714) {
console.log(db.get('Number'))
if (message.content != db.get('Number')) {
return message.delete()
} else {
db.add('Number', 1)
}
}
``` This code working perfectly till i mention everyone and the bot is still online, it just wont delete messages then gives an error: `DiscordAPIError: Unknown Message`
HELP
So I am thinking, that to store them in a variable
THen
if it reaches a certain limit
it will save
HOW DO I DO THAT?
tf are u trying to do
uh
remove the db
make it variable
then every 10 number passes, it will save it to the db
DiscordAPIError: Unknown Message
i think that happens when the message doesn't exist
they didnt delete the message
the bot go panic mode
then bot go coo-koo
then
half of me says this aint a bot problem and i didnt need to replace the db by a variable then save it every minute because the db is local
this might be a rate limit problem
then 1/3 of me says that i should upgrade my hardware

my bot is randomly losing its status
can anyone tell why?
So bot went fine when there is low traffic, But when I mentioned everyone, the bot panicked. The db is local, by quick.db.
@ionic shard Its possible that rn the discord api is shit
It might be bcausr idk network stuff
not my code issue?
Mhm
How can I use regex to see if someone says like
[@user] qt or [@user] is qt
just check if it contains a mention and 'qt' at the same time
is [@granite pagoda] qt
eek
while true the message above would count as valid
Which I don’t want really
short answer: learn regex
yourMessageAsStr.includes('qt', mention);
can someone help me please
my bot is dying
So bot went fine when there is low traffic, But when I mentioned everyone, the bot panicked. The db is local, by quick.db.
if (message.channel.id == 758216351142641714) {
console.log(db.get('Number'))
if (message.content != db.get('Number')) {
return message.delete()
} else {
db.add('Number', 1)
}
}
``` This code working perfectly till i mention everyone and the bot is still online, it just wont delete messages then gives an error: `DiscordAPIError: Unknown Message`
what are u tryna do
if u are using return why are u using else
console.log(db.get('Number'))
if (message.content != db.get('Number')) return message.delete();
db.add('Number', 1);
}```
anyway this wont solve ur issue its just better practice ig
so what happens when u mention everyone
the messeges didnt get deleted
log message.content
a bunch of random numbers
a bunch of random numbers that the people sent in that channel
try using !==
That wont solve it?
maybe
i think its a hardware issue
no
i think its an api rate limit
const NumMsg = args.join(' ');
const number = db.get('Number');
console.log(number);
if (NumMsg !== number) return message.delete();
db.add('Number', 1);
}```
try this
try now
just edited it above
shouldnt be hardware
it aint a big deal
const NumMsg = args.join(' ');
const number = db.get('Number');
console.log(NumMsg );
console.log(number);
if (NumMsg == number) { db.add('Number', 1); } else {
message.delete();
}
}```
thanks for the help but i think its really a hardaware issue
the more you put codes in, the slower it gets
all ur doing is adding a 1 to current number
i ran prefix with quick db on local on 5 servers from my pc its no load
custom prefix
uh
hi
are bots that send messages like twice every minute allowed
the bot will only be in 1 server
depends
in this case yes
is Heroku free if you are using $0 dynos
i coded a bot working how do i make it 24/7
XD
use them temporarily but switch to a REAL VPS later
Do I mock the fact that you use repl.it?
@slender thistleplease shut up
@earnest phoenix i dont even have a penny
@earnest phoenix i dont even have a credit card heck not even a good wi fi to self host
Lol
😁
@fickle sapphire can u send the link of free hosting
@earnest phoenix is hroku free
Heroku works fine for a while
then?
banned
i got banned
don't use heroku
or glitch
then
repl.it is the only host i trust
free?
(yet)
free?
@earnest phoenix but with a little bit of limits
.env file is private so not if you do it the right way
repl.it shows ur botum tokenum
@earnest phoenix "N" + "O"
"w" + "t" + "f"
i hate whitespace
it is the most used character in English and makes night mode pointless because half your screen is filled with the same white character
pls anyone tell free hosting sites allways free
what is vps
Virtual Private Server
You can acces it using your pc and then host your bot there
how do i download

for free
A VPS isn't free
go to ionos.co.uk you get a vps for 1£ a month https://www.ionos.co.uk/server-configurator?__sendingdata=1&cart.action=add-bundle&cart.bundle=tariff-cloud-vps-fix-xl-bundle&packageselection=servers%2Fvps
Virtual Server Cloud XL
4 vCores CPU
8 GB RAM
160 GB SSD
I already have a sandbox cluster on mongodb, I'm trying to create a new one, and I can't select the free plan. What is happening, is mongodb limited to 1 free cluster?
I already have a sandbox cluster on mongodb, I'm trying to create a new one, and I can't select the free plan. What is happening, is mongodb limited to 1 free cluster?
@rocky hearth probably yes
can anyone help me in music commands in discord.py?
can anyone help me in music commands in discord.py?
@earnest phoenix just ask your question no need to beg for help
ok
^&
i want to add a command where the bot joins plays skips and leaves the vc
this only
can I create multiple local clusters? For development?
@earnest phoenix and what is ur question
read documentations @earnest phoenix
Smh

"read the docs" aka "I'm lazy to point you in the right direction myself"
and can i test my bot here in this serveer?
Well its a smart thing to read the docs first before asking questions
repl or heroku?
be more helpful and point them to the right docs while you're at it
and can i test my bot here in this serveer?
@earnest phoenix bots are not invited to this server anymore
I personally like heroku
it is not good heroku
There's not a single beginner-friendly free hosting website that is trusted
k
you can paid to host
I personally dont recommend a free host
2.99$ host from month
ok
you can use vps
how can i get my bot verified?
Anywhere from a few ($2-5.99 per month) to hundreds of dollars per month
internet search
...
let chnl = args[0].split('<#').join().split('>').join()
client.channels.cache.get(chnl).startTyping(10)
```hmmm
Takes around 6 weeks to get ur bot accepted or rejected
Make sure your bot meets the requirements
but arent discord closing applications for bots?
No they're not
Because it would be a waste if time if its rejected
ok
Its in there
Make sure its 24/7 online because when your bot is offline they cant review it and it will be rejected
is . a common prefix?
It is
Yep
so my bots gonna get denied if i have . prefix? even tho i have command to change prefix?
Bots don't get declined for common prefixes
and it doesn't matter in any case as bots aren't invited to this server anymore
ok
so the whole common prefix thing will just be scrapped
ok cool.
ok
U can just use the dot if u want
yeah cuz changing my prefix now would hurt
why do u need that
for https://uptimerobot.com/ its a free hosting site for ever
let chnl = args[0].split('<#').join().split('>').join()
client.channels.cache.get(chnl).startTyping(10)
```is this the best way to fetch a channel using '[#general](/guild/264445053596991498/channel/264445053596991498/)'?
for * its a free hosting site for ever
@earnest phoenix doesnt look like a hosting site to me
🤦♂️
its
uptime monitoring service.```
not website hosting
not sure sorry
@carmine summit yes do u know how to get url
l = "[#123456789](/guild/264445053596991498/channel/123456789/)"
console.log(l.substr(2, l.length - 3)) // "123456789"
Might be a better idea to use that instead of two .splits
@carmine summit pls help how can i get url
Why did I read that as "unoptimized"
because js kinda eh
How do I know how many words are there in a string
words are separated with a space, so split by a space and return the length of the returned array
@earnest phoenix where are you hosting?
@honest perch no i am thinking for heroku
words are separated with a space, so split by a space and return the length of the returned array
@slender thistle if you wanna be really accurate, smh seperate the string into an array of five letters each since a word is technically any combination of five letters except whitespace (google it)
ok thanks
Magically
@honest perch where u
In Europe
?
if (command == 'type'){
//2second per word
let chnl = args[0].split('<#').join('').split('>').join('').toString()
let msg = args.slice(2).join(' ')
let seconds = (msg.length / 5) * 2
console.log(chnl)
client.channels.cache.get(chnl).startTyping(seconds)
setTimeout(function(){
client.channels.cache.get(chnl).stopTyping()
client.channels.cache.get(chnl).send(msg)
}, seconds*1000)
}
```hmmm
In Europe
@honest perch link?
bRuH
@honest perch i said where do u host ur bot not link lol
I host my bot on a vps
any free
No
how do i get my bot url @honest perch
By going to the servers ip
sry i dont know that
nvm got it
https://discordapp.com/channels/264445053596991498/714045415707770900/758253180554575916
@earnest phoenix dont do this! You'll be banned from whatever free bot hosting service you use.
on glitch especially its actively against their TOS and theyll detect it and ban it
after i ran the command, after the bot sends the message. Exactly 7 seconds the bot is going to type again without permission
then what should i do sir @green kestrel
dont try and force a free hosting provider to stay on 24/7 when its designed not to?
bUy A vPs

i dont have money
ask around friends who have bots
see if they can give you a user account on a vps theyre paying for
i dont have any friends who will pay money for me
@carmine summit in some countries its not possible for anyone under 18 to even have a bank account, so they cant pay for a VPS or have a paypal etc
@green kestrel i m 18 i cant have paypal i should be 19 😭
can u give me a vps
pls
someone
Try to convince your mom to give you her credit card
then put the 3 numbers
the card number
no, i dont have enough free resources, otherwise im all for helping out random strangers 🙂
the card exp
and the card name
how tf did i mistype card for carn
its d and n are so far away lol
@carmine summit lol my family dont have paypal or credit or debit crad
BrUh
Where the hell are u living @earnest phoenix
In 1900?
no
😭 i want vps
pls
some one give me vps

nobody who doesnt know you is going to give you something that costs money every month for free
if you need a free vps you need to network, and maybe exchange skills for services
do them something in exchange
i can exchange steam acc with $2.12 and fall guys game @green kestrel

no, i dont have enough free resources, otherwise im all for helping out random strangers 🙂
@green kestrel give whole house
@earnest phoenix dont beg
ok
My command handler uses a discord collection.. is it easier or faster to use a Database for those commands?
What
For my commands I use a collection
but I don't know if it is easier to use a Database
What do you mean by a database
for the commands
Idk , just wondering
😄
store all the bot scripts on database, just run everything with a single import and execute

fuck github and other things to store code
can I host on firebase?
aws is not free.
I need a free hosting service for development. I was wondering if I could use firebase for both database and hosting. Can I?
@rocky hearth i have tried firebase before but i dont think you can host bots there
also aws IS free
you get a whole year for free
if that doesnt fit your taste check Google's F1 Micro
if that also doesnt hit the spot, buy a VPS

1 year free, for 24/7?

For database, can I have multiple FREE clusters in mongodb
if you host your shit on heroku/glitch it clearly shows you have no concern wahtsoever about the quality of your bot host
@rocky hearth please buy a vds
in Turkiye it is very expensive
just convert the money
like 26TRY
That is 240rupees for me!
Unless you live in zambia or some african country $3 shouldnt be much regardless of ur currency
@opal plank ford mustang is 10.000 dollar
in america
but turkiye, it is 400/500k
this is basic example
Had you worked with mongodb locally, can I have multiple clusters there?
im well aware of overpriced stuff in third world countries
im a database supremacist @rocky hearth
i only use postgres, the superior database
cassandra pretty good too
and redis
thats about it
k
get all messages and store them in memory 
How do I get mentioned member in a command?
like:
^hello @balmy anchor
(JavaScript)
discord.js?
yes
message object has a mentions property
ok thx i think i got it
message.send 🤔
lol
You mean get a mentioned user from the message and parse it or something
<message>.mentions.members.first()``` this will do
HOW HAVE YOU SECURED ACCESS TO YOUR SYSTEMS AND INFRASTRUCTURE?
yo how would i go about answering this question
Trying to apply for verification?
from Discord Developers server
Want to know what we mean by "how do you secure your infrastructure"? Well, that's easy. How do you restrict access to your bot? As before, if we want to know more about this, we'll ask.
i only use postgres, the superior database
@opal plank lies, all lies, IBM DB2 is where its at 🤣 /s
@green kestrel Postgres, Cassandra(for some other stuff) and redis is best combo
prove me wrong
Nah JSON db is the best /s

@grizzled raven do you have sftp/scp in preference to ftp? do you deny plaintext password login? do you deny passwords at all in preference to public key? do you encrypt data at rest? is there 2FA? etc etc
@opal plank i cant prove you wrong, works for you! my personal preference is mysql 8+ and redis tbh
or mariadb
ive not found any overriding requirement for something like mongo ("document/object" stores) yet in any of my projects
i like foreign keys and table relationships too much for that
relation db's

postgres has been a bliss in my life tbh
the amount of advanced stuff in it beats sql by a mile in my opinion
last time i looked into postgres was many years ago, it had the fact that it was quite strict towards sql standards going for it, but wasnt as scalable or fast as mysql. however back then mysql mainly had people using really awful MYISAM table format instead of InnoDB which didnt have row locking, or field locking, proper foreign keys, etc
@opal plank the fuck is that emotr
i can definetly assure postgres scales fine
back then MYISAM was much faster than InnoDB, since oracle acquired it tons of work has gone into InnoDB and its now up there with microsoft sql server and oracles enterprise products
can postgres do a master-master replication?
this is when i was purposefully trying to kill the rig
with conflict resolution?
thats within 5h
this is often a problem with most databases, they expect master-slave setup
you can setup constraints in it to remove duplicates
hmm, i wonder what my mysql server stats are on triviabot's server, i havent looked
those results are flawed btw
i did not use a single indexer
i was trying to kill the server
which i did not accomplish
conflict resolution has to be done at the db engine level, its more than just deduping, every field would have to be timestamped
i twas using 2 cores
i think mysql can do master-master but its never been a recommended config
im talking about where you have a cluster of multiple individual servers all replicating the same db and all can be written to as well as read from without issue
Hmm database talk
as long as the DB is ACID compliant it should be fine
since it should have any loss in the data
looks just like with mysql, it "kinda does it", they have a similar kludge called multi master 😄
i'd check this if i were you brain
though in concept there should be no loss in data on postgres
not im not sure why you'd be interested in multi masters
both SQL and Postgres run on ACID compliant
95,000 inserts per hour
82 million selects, over what timeframe?
what exactly are you doing there, plotting the orbit of a space probe? 😮
Running 70% of twitch's global traffic
mines just the database throughput of two bots, sporks and triviabot, plus their websites and dashboards
@green kestrel
11 Million Users registered
curently 840k cached
i should likely dump all those messages cached tbh
after dump
11 Million Users registered
@opal plank Why do i see smoke coming out of the database
webscaling is fun, makes so you have to optimize every last bit of code to make it more performant
its a good way to get good coding practices scaling--friendly
How big of a database you got mate
big in what sense?
Big in how much it can store
databases can store a fuckton of shit
It must be huge than big
Yea i know, but what db are you using
postgreSQL
look at this for example
if i were to log all messages, i'd hit those billion numbers in no time
Doesn't db sometimes cost money, like a MongoDB cluster
thats 6 mil in 5h
no?
just like your node bot, it runs on a server
be it a vps or a computer
¯_(ツ)_/¯
im the one setting up my database
i got 2 databases rn
one locally which has the same shape of the main, and the main one
did u see the pic i sent?
What do you mainly use them for
175 BILLION tuples returned in 4 hours
Bruh, that a lot
well theres a fuckton of shit i keep
mainly user data
stream and user data
the rest is configs per channel
and logs
stream data?
yeah
its twitch
we refer to channels as streams too
just like here we use servers as guilds too
Oh that, i remember when you said you had a bot for twitch
its technically the same bot
though its a standalone thing
they talk via IPC pipes
its the same bot, but they can work individually with limited functionality
Oh, k but how long did it take to setup the IPC pipes
couple hours maybe?
Interesting
though i had already known how to work with IPC before
so it was less learning and more working
Well if you know how something works you don't learn much tbh, because you don't remaster something you already mastered
So the work matters more than learning at this case
correct and incorrect
while i knew a bit of IPC beforehand, like i said, scaling stuff on this level requires fine tuning
otherwise the whole bot collapses with clogs
clogs?
yeah, bottleneck, it clogs up, halts,
Damn
its way too much traffic to be running on one core alone
i'd need to cluster it, though im trying to avoid doing that rn
I wish I had something big to do this on
Recommendation: Dont do twitch @cinder patio
im only here still cuz ive put too much time and effort into it already
the api and libs are not nearly as polished as discord's
if(command === "unban"){
if(!message.member.hasPermission("BAN_MEMBERS")) {
return message.channel.send(`**${message.author.username}**, You do not have perms to unban someone`)
}
if(!message.guild.me.hasPermission("BAN_MEMBERS")) {
return message.channel.send(`**${message.author.username}**, I do not have perms to unban someone`)
}
let userID = args[0]
message.guild.fetchBans().then(bans=> {
if(bans.size == 0) return
let bUser = bans.find(b => b.user.id == userID)
if(!bUser) return
message.guild.members.unban(bUser.user)
})
;}```
im using v12 and i cant get this cmd to work
any reason?
Error?
no
don't ask2ask
ask your question instead of "please help"
and someone will help
or go to discord.gg/programming
if (command === 'ban') {
if(!message.member.hasPermission("BAN_MEMBERS")) return message.reply("You don't have premission to do that!");
let reason = args.slice(1).join(' ');
let member = message.mentions.members.first();
if (!member) return message.reply('You must mention someone to ban them.');
if (reason.length < 1) return message.reply('You must have a reason for the ban.');
let dmsEmbed = new Discord.MessageEmbed()
.setTitle("ban")
.setColor("#00ff00")
.setDescription(`You have been banned on \`${message.guild.name}\``)
.addField("Banned by", message.author.tag)
.addField("Reason", reason);
member.send(dmsEmbed)
.catch(() => console.log("Couldn't send DM before banning"))
member
.ban({
reason: reason,
})
.then((member) => {
message.reply(`Successfully banned ${member.tag}`);
})
message.delete();
}```
when i ban someone it says banned undefined
member.user.tag
yea
ah i am dumb thanks
np
take the roles, map them to their mention property, join with whatever char you want
hey how to animated bot pic in top.gg?
you cant have an animated bot pic but u can use css
example?
how can i put all roles with @ in embed?
@half bearjs message.guild.roles.map(role => role)
@shy turret give me example pls
@half bear
js message.guild.roles.map(role => role)
@earnest phoenix is it only for 1 server
and is it like that?
...
{ name: ' Roller', value: `${message.guild.roles.map(role => role)}` },
...
the mention property is role.toString(), not just role @half bear
that would be the object and in order to format it to mention, you have to use `${role}`, might as well use role.toString()
ок
how to make this buttons in top.gg with css lol
what
animated buttons and bot logo
example?
What would it look like to set a cooldown in JavaScript. Like for the bot to wait before logging something
And hi again I've been taking some coding classes
that's not what a cooldown is
Pb. I'm still relatively new at this. I don't know the terminology for a lot
a cooldown is the amount of time needed to execute an action that had been executed previously
ergo cooldown
http://xyproblem.info - what do you exactly want to do
Asking about your attempted solution rather than your actual problem
Oh
What I want to do is that when the bot receives a command, it'll wait a set amount of time before logging a response. What I don't know is how to put that into JavaScript. I don't know an object is there I'm missing. I don't know what I need to do to make a delay
setTimeout
Ok. Is that the command?
that's a method
globally available
Ok that's what I was looking for
Thank you so much
first parameter takes a function you want to execute later, second parameter takes the amount of ms
no problem, always
2 parameters?
yup
Oh I looked it up I'm being input
Getting**
you should be able to find samples by just googling the name
yeah
is there a doc to make a unban command for js
no
that's a stupid question
it's like asking "is there a step by step how to solve 4x^2 + 1x + 2 = 0" in maths
not everything will be given to you right away, take a step back, analyze the problem and conclude what you need. search around your lib's documentation for the methods you think are appropriate
Ok. So now all I need to do rn is figure out how to make a discord bot without being able to download anything. I know how to make the code, I just need to know how to get it into discord
I for the most part have the code. That's good
it's not how that works
One message removed from a suspended account.
Huh?
Is there any dbl vote tracking code written using discord.js? When someone votes, they will send a thank you message to the channel I chose.

One message removed from a suspended account.
it's like asking "is there a step by step how to solve 4x^2 + 1x + 2 = 0" in maths
not everything will be given to you right away, take a step back, analyze the problem and conclude what you need. search around your lib's documentation for the methods you think are appropriate
@earnest phoenix get that quadratic formula
One message removed from a suspended account.
One message removed from a suspended account.
how i make the reaction work only if the user has specific permission or role
i was looking for a website that did that formula @faint prism
click this
and have your retinas burned
does anyone else have the formula engraved into your brain or was your math teacher normal
Indeed
Yeah
lol we had a "song"
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i forgot it too
lol we had a "song"
@sonic lodge same
its been to many years
One message removed from a suspended account.
i think its been 5 or 6 years for me
we're constantly using it
the "song" just happens to be the formula to the tune of mary had little lamb or something
Anyone knows how to code java for bot
The quadratic formula of navigative b is plus or minus the square root of b squared minus 4ac all over 2a
coding java? well that's an intense task considering there's a whole company out there working on it 😓
3 billion devices run Java™️
-since 1965™️
X=(-b ± √(b²-4ac))/2a
wait, it's always 3 billion?
ive never seen that number go up nor down
hey please stay on topic this is development not math-help
Help
i dont recall ever seeing it at 2bil
runs on 3bil devices because oracle paid companies to enforce java lol
If we code in kotlin for a bot
One message removed from a suspended account.
hello
I see c#
does your class extend InteractiveBase
One message removed from a suspended account.
anyone here available for a web project?
Nowadays the only thing im extending on my code are bugs 
Oofers
i forgot how interactive works
Patches bug on index. breaks remote filed that used to call whatever was there before
One message removed from a suspended account.
viewing gh on mobile sucks ass
@keen willow uh pretty sure this isn't a place to ask for people to work together with you, but instead for coding help.
the repo should have samples though
run it on mobile version
It allows awaiting for messages, and other stuff
desktop*
@keen willow uh pretty sure this isn't a place to ask for people to work together with you, but instead for coding help.
@fluid basin https://discordapp.com/channels/264445053596991498/264445053596991498/758323029796323360
i abandoned discord.net ages ago
yeah I saw
Oh it should attach the methods to the command context from what I remember
instead you should describe more about what you are doing instead of asking blindly
@keen willow
DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.
thanks @twilit rapids
yeah, extends ModuleBase
Mhm
well @twilit rapids why does @sacred cypress said to look here 
Mhm
Like I said
does anyone use docker for their bot here
"Mistake from them, sorry"
I want to create a bot please help me what is the easy coding
oh ok
theres no easy coding
?
you gotta learn the language @narrow cloak
How much knowledge do you in programming?
me?
No jeffin
ah
You I already know, knows a lot
@vernal rivet I am nothing know
Then I recommend you learn some before jumping in.
Java or python or kotlin
learn: Programming languages to start out with:
JavaScript: Programming language used mostly for web development, very widely. used
https://www.codecademy.com/learn/javascript - Interactive tutorial for JS in
http://javascript.info/ - Another tutorial
Python: Well-known programming language, widely supported.
https://docs.python.org/3/tutorial/ - official tutorial, not interactive
http://www.learnpython.org/ - somewhat interactive tutorial
Ruby: Another programming language similar to Python, easier to learn for some people.
https://www.ruby-lang.org/en/documentation/quickstart/ - very quick introduction that only teaches you the basics
http://poignant.guide/ - the infamous "Poignant Guide", a light-hearted humourous tutorial
https://www.codecademy.com/learn/ruby - interactive, serious tutorial
Lua: A programming language that provides a really simple syntax, easy to learn, and understand, yet powerful language, mostly used with games.
https://www.lua.org/pil/contents.html - "Programming In Lua" book, the official guide to Lua, this is the free edition that aims at Lua 5.0
https://www.lua.org/manual/5.1/manual.html - The official language manual for Lua 5.1, contains everything you need to know about the language.
I recommend javascript or python for newer programmers
Thanks a lot

👍
Np
Oofers
Rip
When I cache DB, should I then reffer to an user as if(DB.ID === message.author.id) or is there other way?
Sounds fun
what? cache DB?
NoSQL
if you want to cache things, that largely depends on your data structure
It's usually different for every db
usually DB's are either persistent or in memory
im not familiar with 'cache db' either
hmmm ok
also a database is not a cache
cache implies temporary
It's a holder of data
so its either memory or storage/persistent
#development message
you can check this out if you want to use javascript
@fluid basin what is this link
afaik, there might be some other stuff there im not aware of
@narrow cloak uh some resources and what you need to know to make a bot?
Ok bro
thats for javascript/nodejs though
Rip erwin
btw mongodb has no cache afaik
i sure hope IRC uses specific sessions rather than tokens to rate limit
cuz otherwise i'll get my ass ratelimited hard
with irc spam
IRC doesnt
I use my custom caching for mongo life ez
ooh its rare seeing a green shiv, anyways mongo is pretty fast if you use a ssd/nvme drive instead of a hdd
since it usually directly reads the data from the drive
thats why its mem usage is little
When you notice your bot is offline for some reason 💀
seems like a library issue?
Normally when it disconnect it reconnects
:/
But it's like it gave up this one time 😒
Those log entries are from the lib, not mine
if anyone knows kotlin language
pretty sure there are kotlin libraries for discord
kotlin language for bots if its true
It's just java but with boilerplate code reduced, yeah?



















