#development
1 messages · Page 1033 of 1
Also there's nothing wrong with people using tutorials or copying code as long as one learns from it.
Programmers are so elitist smh.
Exactly
I have a simple question can I use this in a normal respond command, ```
Hello
Wdym
Do you mean like message collectors
I think
Am I being wooshed
Wait lemme see
i want to make a npm library, anyone got any ideas what It should be?
Haha you're so funny ||this fucking community||
@digital ibex an easy to work with ascii generator?
@earnest phoenix yup it worked
that would be easy though, i want to do something which would be a bit more challenging
thx
because if u think about it, all it is just replace
not tryna act smart or anything lmao
virtual drum sequence?
you're literally a God to me say what you want
Yeah, like it stores a 4x16 grid (jajaj) and it loops through the slots (jajajajajaj) to check a Boolean maybe, and it plays something??? Bruh idk
@digital ibex no fucking clue if that's remotely possible
is there anyway to open a folder then a file?
def get_accounts_from_file():
with open('accounts.txt') as file:
text = file.read()```
instead of that i want it to open the folder then the accounts.txt file
I'm assuming that's py
to play something lol, idk
where will this video show up in my bot's profile? Is there a recommended resolution to use for the video?
whats that?
oh 
discord.js isn't obligated to cache literally every object
if you change a property on an object who knows when it's gonna get dropped
Is this true?
@opaque seal can we get more context?
ive never seen someone use that tbh
@solemn latch i was looking for an example bot with a video, but couldn't find one either
@proven lantern next to vote button
https://top.gg/bot/697550195910508555 here is example
thanks @summer torrent
hoe can i get user badges in discord.js v11
You can't I believe.
Nor should you be using Discord.js v11, as it'll stop working in October.
how can i avoid being rate limited?
dont go above the rate limit

any api suggestions
Can you be more specific please.
what type of api u looking for?
Can any experienced nodejs dev dm me
I have some ideas I'd like help implementing
There will be people in the Chat here willing to help you with setting it up we just aren’t gonna provide you the code to do it as all that does is teach you how to copy and paste someone else’s work.
I'm not asking for copy paste code
Then yes there is tons of people here who can help if you prefer private support that’s your choice all I’m saying is feel free to ask it here
What's the best way to do this
I'm paying servers to advertise the bot, whenever someone votes I want to give them a certain role, and I want to be able to change the guildid & roleid that the roles is given in easily, so I'd have to remove the onvote event and add it with the new variables.```
are you even allowed to do that
Vote rewards are allowed yes
As I know it isnt allowed
How's it not allowed..?
hi, i wanted to separate some of my problem code is that it doesn't work
var config = require('./config/index')
config.initialize```
```js
var Cfonts = require('cfonts')
var config = {
initialize: async() => {
await Cfonts.say('Utter|Tools');
}
}
module.exports = config;```
@🔥 Frazzen 🔥#7360 dlaczego przeklinasz. Why do you curse?
Reward users of your bot for voting.
Try to limit voting required commands to 2-3```
see
“Another” bot which would mean your own bot is fine
Oh sorry
Reposting for exposure
What's the best way to do this
I'm paying servers to advertise the bot, whenever someone votes I want to give them a certain role, and I want to be able to change the guildid & roleid that the roles is given in easily, so I'd have to remove the onvote event and add it with the new variables.```
I don’t want to point you in the wrong direction but this might be API related support ^^
Right but it’s regarding the DBL API
My question is how I can add and remove events easily and reliably
100% not api question
fair enough
you want to add remove events? like javascript events?
Yes
Guys how do I fix a cooldown for my bot commands and stuff
like 3 seconds slowmode on a channel
like this? https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events @earnest phoenix ?
Nodejs
events work in nodejs
ik
like this? https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events @earnest phoenix ?
@solemn latch thx
kk
Also guys how can I split a message like this in vsc in a respond command
Hello!
Wassup
@solemn latch
@autumn aspen get patiente lol
Ok
Also
Why not work?
ALso what the hell is the command for this lmao
need to fix this
copy paste 🤦♂️
Welp
bruh
copy paste 🤦♂️
@spare mirage Can u help
nah
Alright if I delete the command then?
Is there anything else above in the screenshot which may cause the command to not proceed further
or is the kick command just not doing anything
you sure it's down
I think so
@earnest phoenix
my bot wont connect
its nobt
rip
Have you checked it's not an issue with your bot / host
idk
bruh
I deleted one thing
why do u log everything?
^^^^
yes two message events and for some reason you're exporting a run function in your index file
const Canvas = require("canvas")
async function welcome(name){
const canvas = Canvas.createCanvas(700, 250);
const ctx = canvas.getContext('2d');
const background = await Canvas.loadImage('./wallpaper.png');
ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
ctx.strokeStyle = '#74037b';
ctx.strokeRect(0, 0, canvas.width, canvas.height);
// Slightly smaller text placed above the member's display name
ctx.font = '28px sans-serif';
ctx.fillStyle = '#ffffff';
ctx.fillText('Welcome to the server,', canvas.width / 2.5, canvas.height / 3.5);
// Add an exclamation point here and below
ctx.font = applyText(canvas, `${name}!`);
ctx.fillStyle = '#ffffff';
ctx.fillText(`${name}!`, canvas.width / 2.5, canvas.height / 1.8);
ctx.beginPath();
ctx.arc(125, 125, 100, 0, Math.PI * 2, true);
ctx.closePath();
ctx.clip();
const avatar = await Canvas.loadImage(message.member.user.displayAvatarURL({ format: 'jpg' }));
ctx.drawImage(avatar, 25, 25, 200, 200);
const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'welcome-image.png');
message.channel.send(`Welcome to the server, ${name}!`, attachment);
}
welcome("jeremy clarkson") ``` so im testing my canvas stuff and this doesn't send anything, can anyone tell me what the issue is?
Welp
I regenerated token still dead
yeah don't delete them
Ok
do you have a good understanding of JavaScript and Node.js
Kinda
no
kinda
lol
"kinda" - HoldFiZzT
🤦♂️
Anyway you can't use that module.exports stuff decently if you want to store it in one file. You're better off using one single message listener with each command.
As for your kick command not doing anything, can you tell me your Discord.js version and can you upload your kick command (only that section of your code) to a site like hastebin
Poob
Anyway you can't use that module.exports stuff decently if you want to store it in one file. You're better off using one single message listener with each command.
As for your kick command not doing anything, can you tell me your Discord.js version and can you upload your kick command (only that section of your code) to a site like hastebin
@sudden geyser oh ok
194 ms is very low for an bot api xD
Ok
I normally get 1600 ms
Okno
@sudden geyser can I create a kick.js file and put it there
wanna see
@spare mirageSURE
You probably want to create a command handler.
The kick command
You probably want to create a command handler.
@sudden geyser But can I put in botfile or what
How do I do that?
what
let botping = message.createdAt - new Date()
let apiping = bot.ws.ping
``` why does my bot ping break
You'd need to use the fs module to read a directory of files and load them together along with managing a collection of commands. There's a guide for it but if you don't know how Node.js's fs and module.exports works along with how it would dynamically work, it's like jumping into a big world with no context.
it goes into negatives
Well you're trying to minus a message's createdAt date instance by the current date (which would logically be ahead of the createdAt date).
always worked :/
Well you're trying to minus a message's
createdAtdate instance by the current date (which would logically be ahead of thecreatedAtdate).
@sudden geyser Can u help me with the kick command now pls
- If you know something, and someone asks a question about that thing, don't shit on them for asking. Either help them or stay quiet. If you don't have anything nice or helpful to say, keep quiet.
- This channel exists to help people. If you're not feeling helpful, your not wanted in this channel.
- Keep in mind that we started as beginners once, so be nice. Helping people helps us all. The more knowledgeable the development community as a whole is, the more we all benefit.
- Don't say random, un-helpful, unrelated jargon to try to make yourself sound smart, if anything it makes you look dumber.
- If you can't answer someone's question, don't try to extrapolate your knowledge from something else, you'll most likely confuse everyone involved.
- Don't ask to ask (eg. "can I ask a question"), this channel exists for questions, you don't need permission to ask one.
- Keep inside jokes in responses to a minimum, they're likely to confuse the person asking for help.
- No language/library wars, it makes everyone involved look like a dick.
Do not assume people haven't already Googled their problem. If they're asking here, they've likely already Googled their problem. Telling someone "google it" is run and unhelpful. This happend me earlier today. But some helped me
Lite explained the logic
You don't need to constantly mention someone when asking for help
Sorry
Im to exited
ecxited
Broken english
ALso Im gonna nitro boost this server
var config = {
menu = {
title = ' Choix'
}
}
module.exports = config;```in an export how can I recover the string?
Wat
are you using JavaScript, because that menu = { syntax does not look correct.
and @autumn aspen I explained the logic, but didn't give any actual code because making a command handler isn't something that takes 5-10 seconds. There are guides to this (such as discordjs.guide) if you need an example.
How exactly can I setup webhooks inside of my python bot?
I created a channel webhook for my support server and gave that link, but I am not sure what is the right way to do it
you are defining config as a obj {}
objects are property sets, 'key':'value'
@wicked pivot
var is bad also, dont use it
const config = { /*this {} is an object*/
menu: { /*this is property 'menu' inside config obj*/
title: ' Choix' /* this is property title inside menu, inside config*/
}
}
that example of his is too basic to be spoonfeeding
thx thx
I have another problem x)
I call a function in another function, how to make so that the continuation of the code is executed once the function call is done
async function call(){
await wait(1000)
await console.log("call ok")
}
async function this(){
await call()
await console.log('this ok')
}``` example
my heroku app says my bot has successfully deployed - however, the bot is not online
any reasons this could be happening?
What library
running the bot locally doesn't result in any errors
(discord.js)
Yes u can but it be hard to get a server ID unless ur in it or ur bot logs joins
client.guilds
the guildCreate/join event for your library
Oh ok ty
@wicked pivot it should be fine to call functions inside other functions, though dont defined them inside eachother
another thing, for grammar syntax use Pascal for functions
JS uses camel case
its just personal preference anyway lol
true
its good to have standardized norms, specially when you ask for help outside
cant hurt to know, either
but really if you use some built-in functions that follow a certain case, it's kind of easier on eyes to follow it
nah just name all your functions and vars and classes some random incremental value
lmao

name them based on first letter
a {}
aa{}
ab{}
ac{}
makes debugging a hell lot easier(not)
You are muted for promoting violence because I'm getting triggered
sometimes i name my vars x1 x2 x3
lmao
funny enough im pretty sure discord uses that syntax for most of the stuff
lemme see if i can force a crash rq to produce a stack error
on a discord library or discord itself?
thats most likely because of babel + webpack
indeed
didnt dig thru too much
but still the though of naming stuff with double letters is insanely triggering
blame js compilers/transpilers
might add that on my todo list to the ultimate trigger code
functional yet absurdly bad code
according to Heroku, my bot has been succesfully deployed, yet it is still offline. what step am I missing?
(nodejs)
you are missing the step where you dont use heroku
cuz its not suppose to be used for bots
cheap vps or run on a device you have laying around
mobile, old wii, anything works
there are vps's for $3
my bot for example is running on my old wii
installed linux on it and its good to go after some configs
looking for something that doesn't cost money because I'm just doing something casual but I still need it to be online consistently
if you dont want to pay you either can do what i said and repurpose an old device to run it or ask someone to do it
apart from that, cheap vps are the way to go
heroku and glitch are agressively removing bots from their platforms
why
neither of them are platforms to host bots on, its mainly websites
anything more intuitive to use that wouldn't be too complicated?
running on your old phone or pc. Unless its a massive bot, it shouldnt use more than 500mb of ram for a good 100-200 guilds
I don't want something that relies on my internet though, as it's really unstable
then either convince someone to host it for you, or spend $3 a month
with my custom bot
unless I'm completely misunderstanding and Heroku requires my internet?
thats gonna do everything
running on your old phone or pc. Unless its a massive bot, it shouldnt use more than 500mb of ram for a good 100-200 guilds
@opal plank I use 600mb at 3000 guilds, it's really not too bad
^^
I alrdy made kick ban purge slowmode cooldown things
600mb jesus
support here @autumn aspen, brag elsewhere
Oh
srry
maybe think before you "tf lmao" someone
imagine bragging about making generic bot features 
@vernal basin heroku host it on itself, though your bot will likely go down on it, as they are removing bots from their platform
I alrdy made kick ban purge slowmode cooldown things
@autumn aspen did u make them?
okay I'd still like to get it running, even if it iwll get taken down, as like a training thing?
No lol I put them in the vsc
to like learn how to do this in the future
id say heroku is fine to host on at least temporarily, I've never had a bot removed
heroku host it on itself, though your bot will likely go down on it, as they are removing bots from their platform
this, both heroku and glitch have made statements that they're removing / banning projects that use uptimer bots
So good that my is online and 100% working
the statement was made recently
Heroku just restarts every like 24 hours
that's fine honestly
Whats the best vps for discord bot hosting?
you don't need an uptimer bot for it
@vernal basin heroku ISNT meant for bot hosting, its for websites. They go on stasis when there arent cnnections/traffic incoming, meaning your bot stops working after a while. Some people use uptime bots to keep constantly pinging the bot to keep it alive
and cheap
Whats the best vps for discord bot hosting?
oh i see hm
i like galaxygate @spare mirage
so it won't be better than my internet
you should NOT use glitch NOR heroku for bot hosting
hmm
$3 a month for 1gb of ram and 1vcpu
Guys this is a command right?
there are free f1 google cloud things too iirc
i dont remember who told me about it tho
maybe it was Woo
we never tested it erwin
google compute engine and amazon aws have free trials for 1 year each
shii 8permonth
plus google has the free forever f1-micro yes
Guys this is a command right?
@autumn aspen no
there you have it
@autumn aspen no
@earnest phoenix What is wrong then?
aws threw an absolute fit for me when trying to get my bot on there
it's an event
@autumn aspen you're using ' and ${member} :D?
i was fine with them, my bot grew to 1.5k on the aws free trial
oh
usually commands are based of message event
i was fine with them, my bot grew to 1.5k on the aws free trial
@earnest phoenix WHat should I change then?
what
Did you quote the wrong message
I'll be honest I'm stil l using heroku at 3k
im confused
I'll be honest I'm stil l using heroku at 3k
@restive willow lol
i was using google's f1-micro until like 1k
okay I'm going to backtrack this then, is there a way to launch my bot even if my computer can't connect to discord? (i.e. is there a way for me to launch my bot while on internet connections that block discord?)
how much ram do u want for a discord bot to not lag on?
GUys tell me what wrong
problem with me doing that is the IPC tim, otherwise i would
not*
like formula 1 racing, just smaller
@autumn aspen use ` not '
i cant open ports to get a server listening to outside events
stuck with local only
okay I'm going to backtrack this then, is there a way to launch my bot even if my computer can't connect to discord? (i.e. is there a way for me to launch my bot while on internet connections that block discord?)
@vernal basin your best bet is to use a VPN or a proxy
okay
@autumn aspen use ` not '
@vernal basin where
any recommendations for free proxies?
okay I'm going to backtrack this then, is there a way to launch my bot even if my computer can't connect to discord? (i.e. is there a way for me to launch my bot while on internet connections that block discord?)
@vernal basin I mean yeah, hosting
you probably don't want to use free proxies
yeah I tried hosting but apparently heroku doesn't like that
they sniff your data
How could I combine multiple float-point precisions in one string? By it, I mean stuff like %.2f and %g
yeah I tried hosting but apparently heroku doesn't like that
@vernal basin where am I gonna replace it?
stop spampinging me
a discord bot's memory usage varies tremendously by which libraries you use, how much you optimize it and what your bot actually needs to work, besides how many guilds it has of course
I'm not going to spoonfeed you code
i told you what to replace, you have to figure out how to replace it
a bot in a couple thousand of guilds can use 100mb or 2gb lol
Yes but there in the command the ${member} one?
20 mil users in 8gb, thats best ive seen so far
play with your code
there's literally only 1 spot you could replace it
holy shit galaxygate is cheap
just edit something
why are you afraid to experiment and try and see the result
Ok
programming is all about resolving logical problems in whichever way you want
just try and see
if it's wrong, and you don't edit it, it will still be wrong
your code is not a subatomic particle
20 million users in 8mb is not possible, unless you mean 20 million total count and 0 users cached
oh ok
8gb*
personally my code actually is a subatomic particle
sharon accomplished that with deno lib
@restive willow xD cheap
oml
cached 20m users in 8gb of ram
okay search up how to use ` in javascript
8gb makes more sense
You need to change the string where you use ${member} to a template string
okay search up how to use ` in javascript
@vernal basin Dude I can I have a JavaScripted bot
oh
hold, consider reading this https://meta.stackoverflow.com/questions/258206/what-is-a-help-vampire
thx
ffs
8gb for 20 million users cached is still a big as accomplishment
use brain pls
help vampirism is discouraged here
@spare mirage thats 4gb of ram
you can have them for $3 a month
okay, so I'm currently using protonVPN - it works running locally, the issue is that the bot will just stop operating randomly
like the proccess won't even stop
it will just not respond to anything
and after a few minutes the bot will go offline
deadlock?
what's that
google it
like this?
erm no I don't have anything that awaits anything else
@autumn aspen literally just use ` instead of '
@autumn aspen https://www.w3schools.com/js/js_intro.asp
you replaced { not '
aw I was late
jokes aside, check the last link @autumn aspen
is it an internet problem, if my bot loses connection for a second, will it just terminate?
well not terminate, just die, rather?
you should really at least skim thru the js docs before doing a bot
both js docs and lib docs
thx
._.
congrats
petition to copy the rules from stack overflow over to #development but replacing stackoverflow to this channel
http://rlemon.github.io/so-chat-javascript-rules/#asking
Unofficial room rules for SO JavaScript Chat.
javascript
yeah my bot is javascripted
@sudden geyser can I put the kick commands in index.js as I did?
yeah
command handling
@opal plank can I create one?
read guide above
Hold you should learn more JavaScript before attempting to make a command hanndler.
that too ^^
yeah
otherwise you'd be copying over what the guide shows
the guide assumes you know js beforehand
But look I dont get it shall I make a command handler or is it alrdy there?
Just pls help at least with that
There's probably one on the Internet laying around
but in order to easily apply it to YOUR bot, you should get hang of JS first
There's probably one on the Internet laying around
@slender thistle Is the command handler alrdy in VSC or what?
VSC is a code editor
What
You edit files with it
oh
commando might be your best bet, though i recommend the guide
a command handler is a simple piece of code that does the following:
- read all files in a folder
- require each file found and put it somewhere
- when you receive a message, check if command exists somewhere
- if it does, execute the command
commando cringe
Guys but where can I find the command handler or where do I write it??
though for starters it might be a good solution
pretty much everyone writes their own handlers
Pls dont be hard
I use a custom version of discord-akairo
you dont 'get it', you make one
just follow the steps i showed above, one by one
Thx
and try to write code that does that
@opal plank
ok
out of all the messages you only saw the ones that said "it's on the internet"
^
^^
^^^^
^^^^^^^^
not a rule but rather to add it to list of advised things
put it in the faq
^
Post it here and pin it
Can we pin the dontasktoask link
having it on rules or somewhere at least let us mini mod our way thru it to prevent people from coming here with 0 knowledge
the only thing rule says is spoon feeding
problem isnt that they dont know, is that they refuse to learn. Its a constant cycle of coming back and fourth between 'okay, how do i do this now?'
'it no work'
'here error, fix'
which will be punished accordingly if it keeps on going
we usually point out the guides but it gets on the same vicious cycle where we are stuck with ignoring it
Everyone starts somewhere and asking questions is smart. Do not attack people for not knowing how to code. Point them to great learning sources and help them with problems.
However, you shouldn’t just give them finished code because then they only learn to copy more.
b. If you are a beginner, have a will to learn and do not expect to be spoon-fed.```
stuff like this is rather strict on when it can be applied
```Show effort: We really like to see that you are trying to achieve your goals on your own first.
Be ready to be wrong: Often we suggest you take a new approach.
Don't ask for help before doing the research yourself: If my google search returns your answer in the first three links, you are doing it wrong.
When given resources to learn, use them. We do not like repeating ourselves.
Do not beg for help: If you have asked once and we ignore you then move on.
Contribute to the community: We like to help people who also like to help people, it's pretty simple.
Don't ask for code: Pseudo code is more than helpful and will set you on your way.
Ask for help finding the answer, do not ask for the answer: we are not here to do your work.
stuff like this at least added ontop should help a bit
of course, thats just me copying the rules over, but it gives a general sense of what im trying to say
im trying to get the initial creation time of my bot. im using fetchApplication to try to get the app's data, but i get an error
Request to use token, but token was unavailable to the client.
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=fetchApplication
https://discord.js.org/#/docs/main/stable/class/ClientApplication?scrollTo=createdTimestamp
refrsh token
Why dont we have an message pinged with link that "teach" u how to learn a coding language
Guys Im better then thos that made Windows
oops'
thats a political argument lmao
@spare mirage my token is valid
console.log(app.createdTimestamp)```
hmm
does that fetchApplication function work for you?
I can try
if you dont have support for the await keyword you can use this instead client.fetchApplication().then(app=>console.log(app.createdTimestamp));
client is new Discord.Client()
is the client logged in?
oh, i might be doing that before the login finishes
does anyone know a good module to get stats?
yeah
@torn ravine stats of...?
like memory, cpu usage, etc
Oh
1593248817455 this is what my console logs
.toLocaleTimeString
@proven lantern
I can't remember spelling
was dat @pure lion
Uh
what does that number mean
the timestamp
how do I convert it into a date xD
@torn ravine os-utils
@quartz kindle that did the trick. thanks
Is there an free hosting for the discord.py bot?
There's free hosting for any bot
@spare mirage thanks for checking. i was trying to call that function before my bot finished logging in
heroku
GliTch (pay)
@earnest phoenix you can host the bot on your computer
dont use glitch either
Heroku can't run code of 5 mb
Buy a server boi
host it on an old device you have laying around
makes me wanna throw up
Host on a server boi
@earnest phoenix you can host the bot on your computer
@proven lantern I don't have turned on pc 24/7
old phone, wii, old pc, whatever you got
heroku cant run code of 5mb? wtf
Jake even hosted a bot on a fridge
Host on a server boi
@pure lion What server?
smart fridge bot hosting
old phone, wii, old pc, whatever you got
Teach me the ways of the wii
You shouldn't use Heroku or Glitch to host bots
ye spls
But heroku don't work
imma use my wii
@pure lion https://wiibrew.org/wiki/Wii-Linux
and run it on COW
Ty
wait what
It just work if code is ```print("hello")
What is wii
no u didnt
that old white thinng you have getting dust
I don't have
@earnest phoenix wow imagine not knnowing what a wii is
I'd recommend using a Raspberry Pi if you can't afford monthly fees
anything you have laying around?
anyways @earnest phoenix
free trial: google compute engine (1 year), amazon aws (1 year)
free forever: google f1-micro, heroku/glitch/repl.it
paid: a billion vps hosting providers starting from as little as $2.5 per month
@strange trout raspberries suck for music
Ok tim ty
I have a raspberry
Get an Intel NUC then
Maybe my dad has something great
I just need hosting (not require credit card, pay.., ...)
idk
Or a Dell OptiPlex
use pingign service
glitch
@earnest phoenix can't run python i think
like freshworks
pinging service - freshworks, uptimerobot, statuscake
they are free
it basically pings your vps so it stays alive
glitch doesn't allow it anymore
all three of them can run python, but all three of them auto-sleep after inactivity, so you will need one of those pinger workarounds anyway
statuscake and freshworks don't know what is
If you're a college student or have a school ID sign up for GitHub Student Dev pack. You get $50 credit to Digital Ocean as a perk
If you're a college student or have a school ID student sign up for GitHub Student Dev pack. You get $50 credit to Digital Ocean as a perk
@strange trout i am not
freshworks is really good
@stark abyss i will try wait
hm?
because people want something 100% free that doesnt ask for credit card on account creation
afaik those 3 are the only options
because people want something 100% free that doesnt ask for credit card on account creation
@quartz kindle ok
VSC is a text editor
I have a raspberry
@pure lion same
Just run it on ur main pc then
Alibaba Cloud: No. 1 data sharing platform, No. 1 cloud computing platform, cloud product solutions, multiline dedicated bandwidth, developers' platform, webmasters' platform
They run pretty good for small bots
I'm experimenting with awaitMessage but it's not working
const filter = response => {
return message.author.id === response.author.id;
};
message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] })
.then(collected => {
if(collected.first() === "diamond") message.channel.send("true")
})
.catch(collected => {
message.channel.send('Looks like nobody got the answer this time.');
});
Any idea why?
.content
trivia command?
.content where? collected.first?
collected.first().content
That's because collected.first() returns the entire message by the way
hmm
@earnest phoenix google it
im thinking... Do people sit here in this channel
and
not saying anything
to get free code
?
@earnest phoenix nothing wrong with trying
dont
whats uptimerobot
usually those limits are in place to limit abuse of their api uncessarily
i hate how ppl ignore me
it keeps pinging your bot so it has incoming traffic and doesnt go idle
Don't use any of those services to host your bot
why
Host it at home or get a cheap VPS
the fact that you need an uptimer means the platform isnt meant for bots
Google cloud f1 micro
aws trial(1 year)
@earnest phoenix
or use danbot
Google cloud f1 micro require credit card?
or use danbot
@earnest phoenix what?
ok then dont use danbot hosting
DanBot sounds sketchy
i googled "danbot hosting" and didnt find anything lol
Same
what is danbot
yikes
that looks like something stealing ur account or token tbh
i have 3 servers
sounds sketchy af
¯_(ツ)_/¯
Cool effects on their website but still sketch
im not forcing yall to do anything
Cool effects on their website but still sketch
@strange trout lmao
its pterodactyl panel lmao
i cant find any information on danbot hosting, the link you posted is for the admin panel login
switch (collected.first().content.toLowerCase()) {
case "rocks":
chosen = "rocks"
break;
case "iron":
chosen = "iron"
break;
case "diamond":
chosen = "diamond"
break;
default:
return message.channel.send(`This isn't a viable option.`)
Why is this returning to the default?
where do you find hosting plans, prices, resources, etc?
When I log collected.first().content.toLowerCase() it equals rocks
@quartz kindle danbot is "free"
anyone wanna make an alt and try
only 22 clients/users?
online
either really new project or really sketchy
https://hosting.danbot.xyz/auth/login how to sign up?
anyone knows my issue?
you sign up in the discord
i dont wanna join their discord just to see prices/plans lol
It's ultra sketch lol
how much ram is the free one?
anyone knows my issue?
Sec Dev
still sketchy
Just buy a vps
i will try
looks too good to be fake, though i still have my doubts
I bet they use ur information/code
no, im aware
not blaming it on you or saying you're sketchy
its the fact that no one here knew about it before hand
so its likely knew or something
Nah, there's other services exactly like that
if you are trying to run a website there, he will even set up a reverse proxy
did u read #getting-started?
this is about to become advertising lol
NO
Ok I'll go do if else stacking if no one knows my issue then
I try to be fancy for once lol
Can you share more code?
i just want to know how much ram it gives you lol
Can't really tell from what you shared, Chicken
5gb
your code looks correct chicken
thats obviously lied
@earnest phoenix thats not ram
no its not
glitch is good
yes storage is 5gb but so is ram
thats imposibble
it only uses as much as it needs to until it hits 6gb
pretty sure its not
Glitch boosted projects is good
You can also use object literals Chicken
DanBot hosting is ||shiiiiiiiiiiiiiiiiiiit||!!!
It's cheaper to buy a VPS instead of buying "Glitch boosts"
You can do the exact same on Linux VPS
6gb ram is a lot, noway anyone would offer that for free
Just requires more setup.
@earnest phoenix you can run python on glitch
there
Okay I think it's sketchy but calling it sh*t because you don't know how to sign up is kind of dumb 
really
he is a human too ya know
Okay I think it's sketchy but calling it sh*t because you don't know how to sign up is kind of dumb
@strange trout This ||sht|| work?
u have to make a ticket and wait for him to create you a server
6gb of ram is an insane amount to give out for free
theres not to many people using it
im pretty sure its shared ram
so what happens if one bot starts using too much ram? does he remove it?
and it's great
no
A VPS can be bought for ~3 dollars
i use about 200-400
then they are obligated not to sell your info
im perfectly fine
let pembed = new Discord.MessageEmbed()
.setTitle(`Item`)
.addField(`You picked ${chosen.toUpperCase()}`)
msg.edit(pembed)
Where did the undefined come from?
they do stuff with your code
No value
It's late ok
no fixed already
i dont think my bot will even begin the process of getting added to the list
why lol
Hello (:
hi
list in top.gg or that danbot thing?
cuz if its here, you'd be surprised how many copy pasted bots are here
@opal plank have you seen the amount of bad bots in the new section?
i stopped looking, it gave me a headache just looking at the bots with 4 basic commands as their whole content getting added
They're all the same
ping, say, mute, ban, kick, help
nothing wrong with that, its just scary to see how easily it can get added
oop double ping
the only reason i see why you'd use it here is to get a decent idea of ram usage and networking, since it has 100k users and its a good sample to check your stability
I've been working on my bot for a year and I still think I should have waited to add it
i asked DAPI and a couple other big servers to see if i could stress out my bot by doing some very intensive loop commands between all users and see how well my network config and bot would handle
most people have no idea what this server alone does to their bots
lmao
im still amazed WanKill didnt manage to provide an accurate enough traffic to stree my gigabit network
but Discord api managed to get me a fuck ton of stress
looping through members/users is something that should be avoided at all costs, since there no way to do it without caching all of them and skyrocketing your ram
all the real time updates and presences did a number
that was the whole point of it
stress testing if the config was stable enough to be run on bigger servers
was using redis/postgres to cache every user obj in a call for each column, then fetching more from the api for public flags with a ratelimit in place
couldnt figure out a way to cause more stress than that locally
im open to suggestions
180k users with multiple db calls and api calls
then dropping the data tables
not interested in keeping all that data, its just for stress test
interesting
did you measure the different stages separately? ie time for download, time for insert, etc
that i did not, but could be interesting to check
see where the biggest hopld is, though im sure it was the queries to check duplicates
it takes about 15 seconds to download 100k members on my vps
to download, yes, but parsing all that data took a lot of time time
specially cuz i purposefully inserted each member with 8 different database calls
one for each column
lmao
makes sense then
but doesnt that make it more of a database stress test than a network test?
both local and network
some of those calls required public flags and such which im doing with axios for requests
so there was a lot of traffic going in and out
like fetching flags for each separate member?
yup
im unsure if there are other better options to stress test the whole bot environment other than that
network/memory/database all at once
If i wanted to hire someone to code a discord bot to run a league through crowd funding for a e-sports video game... the idea would be people would !join a ranked match and the bot would have matchmaking capabilities and basically run an MMR system through a chat bot is this a good place to talk about that?
lucky discord doesnt seem to have rate limits on GET requests to users/members lmao
@pseudo garnet i dont think this is the right place, but i could be wrong
i dont think chunk works for public user info
Hey no worries I am just probing around I am not sure if this type of thing exists already for other games
but basically i know a community that would easily crowd fund that sort of thing
This is for development, there are some servers which are purposefully for that. Though #bids might help you
i've seen a few tournament/matchmaking bots, but never used one
im unsure how bids work here
thanks for the info!
there might be some pre made bots that do exactly what you wish
yea thats what im wondering
it seems bots have evolved a ton recently
so i think i can complete my quest somehow 🙂
agreed
we realize we are all bots
beep boop
pong!
🙂
btw erwin, which lib did you use for your test?
d.js
unmodified, though i should do some upgrades
im running some benchmarks on some js libs
the only reason im not moving to it is that i already spent way too much time on djs-light
not gonna give up on it now
You developed discord.js-light right?
the problem with my bot is that its multi purpose, so its a project that doesnt end
ye
Is it easy to move from d.js?
depends what your bot does
It does what's on my status
Fuck it I'm gonna make a package that automatically adds 100 commands so nobody has to waste their time making the functions of literally every other bot
shouldnt be hard then
lmao
Oh I know I'll make a discord.js wrapper 
i use np to publish
lmao
im usually against the idea of that pre-made commands
there are always two sides
Fine I'll just dumb down the API even more than light
with the amount of bots out there, its simply wasteful to keep making repetitive stuff without any uniqueness
its simultaneously a good thing and a bad thing about the whole npm ecosystem
only reason i'd see is when customization isnt an option nor hosting
there are countless copies of the same thing out there, nobody knows anymore whats good and what isnt
^^
Okay but for real
so nobody trusts anything anymore, and everyone just makes their own copy, which further increases the problem lmao
What does a package have to achieve, and how would it do so?
First write the commands lol
writing modules is annoying
Say I wanted to add features to djs, make it simpler
Simpler-er
You know what I mean
Tim might give you a better insight, im not at libdev level yet of proficiency
step 1: run npm init in some folder and fill it up with your package info
step 2: install required modules
step 3: write your code in one or multiple files, and export something from your main file
step 4: require your package in some other project/folder
Alright
So pacc is written in js, but do I need to have deeper knowledge? What would I need to learn about?
pacc?
if you are going to modify, you should have a really good understanding of general js. Though for a lib dev, you prob need to be very proficient
Look at the source code of packages so you can see how they structure everything


