#development
1 messages ยท Page 571 of 1
have an array of prefixes
why would you have that
Because I dont know how to set up custom :^)
gg
@unique iron set prefix in db, or json. and update table with new prefix 
hey can someone help me
hm my 1st bot is working but second one is not replying messages 
@unique iron check "an idiot guide", maybe they created this
@granite yoke send message event
np
What can I do to make this work in botconfig.json
`{
"prefix": "<<" && "@fringe helm"
}
`
I get error, obviously
thats not how javascript works either
what are you even doing lol
&& works like this ```js
if(true && true) {
this
}
it wont
discord adds a ! in the mention if there is a nick
so @amber fractal
btw sorry for the ping
you're fine
https://hastebin.com/xecopozihu.js
moment(mention.createdAt, "YYYYMMDD").fromNow()
Can someone please tell me why that isn't working?
i don't use moment for date stuff. I use dateformat npm but this is the layout for that one if this helps ๐ค
dateFormat(member.user.createdAt, "dddd, mmmm dS, yyyy, h:MM TT"))```
can someone help me make this
.addField(`Free Memory`, `${os.freemem}`, true)
look like this 23.82 MB instead of like this 259207168
os.freemem / 1048576
Wanted Result
a ๐ test ๐ message ๐ here
Actual Result
aaaa
Here's my code. https://github.com/sublands/lizzy/blob/master/commands/clap.js
(I'm using a command handler and file system. Please tag when responding. <3)
@raven bronze Maybe like this? js const text = "Hello my name is lizzy"; text.split(" ").join(" ๐ "); // Hello ๐ my ๐ name ๐ is ๐ lizzy
The funny thing is, i've used that code many times for other things. But it never occured to me to do that. I'm stupid.
@opaque eagle Also thank you.
Yw :)
@earnest phoenix put that in #memes-and-media not development
okie
my bot makes requests to an internal api but the urls are exposed in web tools, whats the best way for me to authorize these requests?
since any headers etc sent will be seen, its hard to make it secure
this is the dashboard making a request to change data through an api
its not user based
and even then, the user can probably then access hidden endpoints
proxy it through your backend
idk
basically the api is built with the bot
and hosts its own /api/...
and then the web dashboard uses ie. /api/guilds/:id/prefix and POSTs with a new prefix
what i thought tho is how do i make sure it can only be used by my dashboard
you can't
just make a token per user and validate it on each request
even some kind of origin check maybe natan?
you can hand craft http requests
dang
checking origin/whatever is 100% useless
not having authorization checks is the same as opening everything on those endpoints to everyone
just store for each user on eg localstorage a jwt with eg userid
hm, okay
You should auth each user anyway
To make sure they can only retrieve info about guilds they have access to
since jwts are signed you can know it's your own thing
Is there a specific way of getting args in eris?
no?
"args" is just the message content
works the same way in any lib
msg content, split by prefix/command, shift, join
how do i prevent a html form from being submitted
What do you want to do with the form @sick cloud ?
Because if you dont want to submit it just dont make a button that submits it
You can still press the enter button and the form will submit
use cmd
bruh you might wanna reset your token
yes
?
You leaked your token
nah it's better to troll people who want to use it
Oof
Anyone can use your bot with it
Idk what i need to do, i just transfered the files to other pc
Downloaded and installed it

Error msg?
Node:the term node is not recognized as the name of a cmdlet, function...
And you have actually installed node
Itโs the right folder
?huh?
From your image is saw that it is the right directory
Ok, but why does this do this?
Because node is not a function, it says that when node isnโt installed
But you say it is
But not on vsc
Maybe you need a node extension for vsc
?
I installed vsc and node, same things as i had on the other pc
Where did you install node
It does this on the other pc
๐
In Program files
Huh?
I am so angry at this pc
I think i am just gonna delete the bot
And quit
Never quit ๐ข
I have to
๐ญ
I can't keep my main pc open 24/7
It is my gaming pc
And it is loud af
I need to get this to work
But how?
Glitch is free and easier than heroku
?
would you ask your friend to host your bot 24/7 for free? no, and that's the reason why companies charge for it too
Well keeping your pc open 24/7 isn't free neither
@pastel tiger just make it unsubmit-able through enter
๐ค
@desert hearth did you restart your pc after installing node?
No...
But i'll try the glitch.com
Are you using windows?
sometimes you need to restart it so the environment variables are updated properly
Cuz linux doesn't need restarting ๐
Do not use glitchs builtin editor
Its worse than notepad
and if you're looking for a free host, i recommend google or amazon, both are free for 12 months, more than enough time to get you started
๐ fuck ๐ผ windows tbh ๐ค
How do i extract the zip file in glitch?
What if i just use github?
Can i use it?
Idk what i should do
I know, but to save the bot files on github
Yeah? Thatโs what github is for
But make sure you don't upload your token to GitHub
๐คฆ um im kinda stuck how to help if you can't use github
do you know what your toke des
Yeet
I know, it connects to the bot in discordapp.com/developers and opens the bot by the script
Oof
๐ @desert hearth don't delete all you have to do is go to discord.js and other webites and lerarn how to code then you will do fine
Really
But where can i host the bot free
u sure about that
I know some coding
nowhere
Glitch is ridiculously easy to use
But i can't send folders in it
?
Why did you upload a zip file
Of course you can't extract a zip file in Glitch
Oh, i am a idiot
you upload each file individually
Or just import from gh
But, i could keep my pc open 24/7, but how do i minimize the ram and cpu usage of vsc?
XD
Itโs using a node script
you dont run bots in vsc lol
Node scripts are ram heavy
Not
you run it directly with node from cmd
Oof
you dont need vsc open
You run on ethier paid vps or glitch,herouk etc
I used vsc always
I use
/ month
vsc is just an editor who happens to run things for you as an easy way to test
It's not even an troller ๐
Umm... Can i get help with the cmd? It is not working
Congratulations, I think u just hit the world record of number of messages you sent that got starred within 10 mins?
@quartz kindle I asked a question about ${os.freemem} last night and you gave me the answer to do this os.freemem / 1048576. Just clearifying that I put that inside the {}?
@earnest phoenix didn't you use glitch...
says they know how to code
cant even open the command line
windows + r
cmd
enter
I can open it
I know
xd
@earnest phoenix I can see because you got the name wrong too
@bitter sundial this guy is the c.i.a
@desert hearth https://www.w3schools.com/nodejs/
...
Boi that's like level 200 cringe
I don't need teaching
you do
I'll just leave and never talk to you again
you need the most amount of teaching if you cant even run a fucking node script
I donโt need teaching
what is a command line
how do I run my script
bot connects to discord thru discordapp.com/Developers endpoint
does GitHub host bots
how do I unzip file in glitch
You need teaching.
my point
I am new, i just needed small help on how to host the server free๐ข
How can I put the voter's id in .hasVoted()?
No.
@dusky steeple yeah, you said freemem gives you the value in bytes right? divide that by 1048576 to get the value in megabytes
ok great ty
I'm putting it on automatic, so when the user votes, the rewards is sent automatically.
No messages needed.
Yeah, I know that. But on the docs, it only shows one specific user id.
Yeah
That's what I'm asking, what should I put in that.
the user's id?
Yeah.
@whole karma discord.py?
discord.js
Nvm I canโt help then
dbl.hasVoted("95579865788456960").then(voted => {
if (voted) console.log("Tonkku has voted!!!")
});
example
ur not supposed to literally use this code
replace the id with a user id
if voted then apply rewards
hmm lol
Free Memory
336.02734375
what
I need to figure out how to shorten the number a bit so it shows 336.03MB or something
Round it ?
Yea i'm going to
just haven't got that far
trying to update my bot for DBL first
trying to figure out why it's showing it's offline when it's not
you can use toFixed
it will convert the number into a string, and trim it at a specific decimal point
(336.02734375).toFixed(2) = "336.02"
Can someone help me with making it say you must have mange_messages perm to use this command? im confused
Looks at tim
@quartz kindle
Depends on what library you use
js
whyme
your smart
you're*
shhh
@dusky steeple i use this
function formatBytes(a,b){
if(0==a) return "0 Bytes";
var c =1024, d = b || 2, e = ["B","KB","MB","GB","TB","PB","EB","ZB","YB"], f = Math.floor(Math.log(a)/Math.log(c));
return parseFloat((a/Math.pow(c,f)).toFixed(d))+" "+e[f]
}```
const freeMem = formatBytes(Math.round(require('os').freemem))```
result = 1.64 GB
example
ok I will try it in a little bit. Thank you
@trail trout That worked perfect thank you
yeah
How long does it usually take for a bot to show online in the site?
I look at the main list and it show's online
๐
ok nvm
i got more important things
how do I use dbl events with a command handler?
Another stupid question probably. What am I doing wrong here?
<center><p class="card-text">Owner:</i> <%= guild.owner.user.tag %></p><center>```
works fine on localhost but doesn't on vps. Throws error saying `user` undefined
Sometimes, it's unable to access guilds owners like @fossil oxide
Is their a better way to do to it will show up like this?
@light marsh
Bots don't have bots, silly.
@woeful falcon
oooo
Don't use Luca here without context
@earnest phoenix pip install git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
If it doesn't work
Just in case i suggest uninstalling async
I don't understand yeoman subgenerators? Are they generators within generators, or are they used to add more stuff to already scaffolded projects?
var dbl = new DBL('dbl token', { webhookPort: 5000, webhookAuth: 'dbl password' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
eco.AddToBalance(vote.user, 400)
});
how do I make rewards
it doesnt even log
wait wrong channel
With code
So like, I didn't use discord for like 4 months, I came back to discord recently again and wanted to start working on my old botagain, but god damn I came across one thing that got me confused as hell
What is this ID: 480846229409103872
Because I'm pretty sure it isn't ๐
If anyone knows, I would appreciate to hear your thoughts
We can't really tell what ID that is...
It can be the ID of any person, channel, reaction, or guild ever created (even a non-existent one).
fak
Well I can tell that the reaction/channel/user/guild was created/added in August 19th, 2018
at 5:11 PM EST if I'm correct
@light olive
hopefully what helps somehow
k ๐
I think I will just go yolo and see if it breaks the bot or not lol
Oh sweet thank you!
I don't know if it is correct or not but that is what google found
holy bots lol!!
Okay this is really boggling me ๐ค
<p class="card-text text-center">Owner:</i> <%= guild.owner.user.tag %></p>```
@maiden scroll
Sorry
commands: 46 ๐ฉ
well It's the only thing I know how to use atm for dashboard and it works
Its not good to put that in every channel
this might sound stupid but shall i run my bot as an console app on ubuntu server?
@timber cloud .setThumbnail() ?
this might sound stupid but shall i run my bot as an console app on ubuntu server?,cause then the console gets blocked and i cant use commands
how would i change the color of the name, email and message font
i spent so long on it, and i can not find out
Im guessing an API, but i have no idea on that kind of stuff XD
https://www.w3schools.com/howto/howto_css_placeholder.asp searchengines exist
const dbl = new DBL('Your discordbots.org token', client);
Where do I find the token?
https://discordbots.org/api/docs#reference the api docs tell you
if you are going for webhook
install your programming languages environment and start your bot code
hello, i have a problem wiht my bot. let text = args.join(" "); i place "args" in any place and have a error for example: if(message.content.startsWith(prefix + "kick")) { let member = message.mentions.members.first(); let reason = args.slice(1).join(" "); member.kick(reason); } the console say what the error is in the "a" of a "args.join(" "); "
someone have the solution?
thank you @marble needle
{ webhookPort: 22, webhookAuth: 'password' }
What port do I use and what password?
const args = message.content.split(" ").slice(1)``` define args first
@knotty badge if args gives you problems you should post the code of how args is created, before the error, not after.
ok thanks
@knotty badge maybe also post full/more code and full error message. use hastebin if its too long
Or just use hastebin in general
Its out of format for mobile users, makes it hard to help 
Why do I get this error?```
8ball.js loaded!
addrole.js loaded!
ban.js loaded!
botinfo.js loaded!
help.js loaded!
kick.js loaded!
removerole.js loaded!
report.js loaded!
serverinfo.js loaded!
setup.js loaded!
D:\Users\my name\Desktop\MyBots\discord.js\testing\index.js:21
bot.commands.set(props.help.name, props);
^
TypeError: Cannot read property 'name' of undefined```
props.help or props itself is undefined
Because it can't read the name of props.help
It litterally says in the error
Meaning props.help is undefined
'NAME'
??
anyways how wold you fix it?
you fix undefined errors by defining what's undefined ๐ค
well then check line 21 in index js and the surrounding code and figure out why it suddenly errors out. Probably has to do with what you did between yesterday and today
haven't done a S***
would you mind sending the code snippet line 21 is in
bot.commands.set(props.help.name, props);
jsfile.forEach((f, i) =>{
let props = require(`./commands/${f}`);
console.log(`${f} loaded!`);
bot.commands.set(props.help.name, props);
});```
and now using a programmer's logical skills you could figure out that if it loaded 10 files successfully and then decided to error out your issue may be laying within a certain file it's trying to load
that's a tempmute file
check your console output for files it didn't load and look into them, probably forgot to define properties or whatnot in there causing props.help to be undefined when it tries to load said file
remove the file you think is causing the issue or change it's ending to something that isn't .js (so your command handler doesn't try to load it) and run your code again
if it doesnt error the file you removed has an error in it
it it still errors you either got the wrong file or you did something wrong in multiple ones
Wait, you want to search for the name or the little id thing
you can make an array in js @uneven laurel
Heโs after json objects not arrays
Gotta love vague development questions
You can also make arrays in JSON, yk?
@rocky dagger @uneven laurel
Also... Atom? Really? @modern sable

just use notepad++ smh https://zero-two.is-a-good-waifu.com/649fea.png
There's no need for it to be an array so why would he make it an array
i like atom
He can do Array#find() @late hill
idk about other languages
Yeah, but my thinking was that I wouldn't expect a person who asked that question to know how to use a for...in loop so I played along with the array idea.
ok
if you need a bidirectional map just create two objects
k -> v and v -> k
not only faster but can also support keys with duplicate values by eg using v -> [k]
how do I make a command that waits for 2, 4 or 6 players, then picks a random player?
liek, you write -bottlespin [amount of players] [amount to bet]
then it waits for x more people
(discord.js)
Anyone here with some time to beta test a bot? I of course offer the same in return ๐
How does one find a botโs ram?
Language?
Discord.js
for the love of god can we get a pin that notes the difference between programming language and library already
^
when I use this await bot.warndb.insert({"userid": wUser.id, "serverid": message.guild.id, "warner": message.author.id, "reason": reason}, async (err, data) => { if (err) console.error(err) await bot.warndb.find({"userid": wUser.id, "serverid": message.guild.id}, async(err,data2) => { warnid = data2[0]._id let warnEmbed = new Discord.RichEmbed() .setDescription("New Warning") .setAuthor(wUser.user.username, wUser.user.displayAvatarURL) .setColor("#b2ac00") .addField("Warned User:", wUser.toString()) .addField("Warned by:", `<@${message.author.id}>`) .addField("Warned In:", message.channel) .addField("Reason:", reason) .setTimestamp() .addField("Warn ID:", warnid) modlogchannel.send(warnEmbed); message.channel.send(`Okay, I have warned ${wUser.user.username} for "${reason}".`) }) }) it gives them the same warning id each time?
^ i completely agree, we need a pin like that
khm
not with that block of code of course
https://stackoverflow.com/questions/12023359/what-do-the-return-values-of-node-js-process-memoryusage-stand-for take a look at this if you want to check and understand how much memory a node process uses and what exactly the function even returns
(at) the one looking for their bot's ram
How do you make a discord bot
Oh my.
Learn how to Programm, learn a language, pick a library for said language and use that
Or dismiss the library part and write your own (:
download small basic
get a basic device + keyboard
start writing a basic script
host on a basic vps
Which editor do you use and why?
0โฃ Sublime Text 3
1โฃ VS Code
2โฃ Atom
3โฃ Notepad++
4โฃ Adobe Brackets
i use visual studio because why fucking bother with electron garbage
all the og's use notepad
pffttt real nibbas use nano
mmlol
@harsh nova why not vim? 
you can literally choose what packages you want to install
I use vscode and jetbrains webstorm
honestly don't even think of starting to use vim
has anyone tried coding on their phone
it's literally impossible
same
Help Code What is a Corrupted Error
someone knows how to delete a guild with my bot?
the bot must own the guild
Help Me
Help Me
but nobody helps
i sent you what you need
if you don't know after reading an official documentation for it that provides you with explanations and example code please refer to what natan said https://i.ryeqb.me/336a441a0a.png
I'm getting this, but I have a catch and the roles do exist and they do also get added, any reason why this would happen?
could be a role somewhere else
It has an array of roles
and happens after the 5 second time out
so I highly doubt it
And the catch does log the error
Well not the error, just what I have it set to log
It wouldnt confuse me as much if it actually didnt work, but it does
let toadd = bot.mutes.get(user.id, "roles")
let muted = message.guild.roles.find(r => r.name == "Muted")
console.log(toadd)
for(var j = 0; j < toadd.length; j++){
user.addRole(message.guild.roles.get(toadd[j])).catch(console.log("Error"))
}
user.removeRole(muted.id).catch(console.log("Error"))
bot.mutes.delete(user.id)
}, time)```
Its weird because it errors for every role
Wait
I think I know the issue

Nope, now it didnt work at all
But it's erroring for every role
even the mute role
so it logs "Error" 3 times (2 roles to add and mute) before it give me the DiscordAPIError
what would be the best way to require a static json file in client side js
inject it into eg a script tag
import statements?
or serve it over a rest endpoint
client-side js doesn't use common.js so cant use require()
How can i add a reaction to a message in java?
library?
JDA
@inner jewel how would i inject it
Holy shit I was trying to add the everyone role ;-;
beatz: Message#addReaction(...)
the reaction
oh, ok
hey does anyone know how to make it so that the bot tells you the number of servers that its in?
in js
yes?
@hoary bramble
ty
yw
can someone show me what I am doing wrong here. It errors and says rows is not defined.
con.connect(function(err) {
if (err) throw err;
con.query(`SELECT * FROM server_settings WHERE server_id = ${guild.id}`, function (err, result, fields) {
logger.log('Info', "Gathered information from Red Queen server settings.");
if (err) throw err;
let sql;
if (rows.length < 1) {
sql = "INSERT INTO server_settings (server_id, prefix, modlog_channel, mod_role, admin_role, welcome_channel, welcome_message, welcome_enabled, leave_channel, leave_message, leave_enabled, level_messages, invite_filter_enabled, invite_whitelist, swear_filter, swear_words, log_deletes, log_newmember, log_commanduse, donot_announce, send_help, enabled) VALUES (" + guild.id + ", '?', 'logs', 'Moderator', 'Admin', 'welcome', 'Welcome {user}!', 'false', 'leave', 'Good-bye {user}!', 'false', 'false', 'false', 'Admin,Moderator', 'false', 'fuck', 'false', 'false', 'true', 'false', 'channel', 'true')";
logger.log('Info', `New server added to database: ${guild.id} successfully.`);
} else {
let update = rows[0].enabled;
sql = `UPDATE server_settings SET enabled = 'true' WHERE server_id = ${guild.id}`;
logger.log('Info', `Updated ${guild.id} to active server.`);
}
});
});```
@dusky steeple looks like you didn't define rows anywhere??
isnt it obvious from the error message
you named it result or fields
@hoary bramble client.guilds.size i believe
hmm I fixed that problem but it's not inserting data into database if its a new server.
||dont prob shouldnt use sql maybe settle for something like mongoose ||
I use mongoose for my bot
Mongoose is nice
Makes things very easy
I don't want to install mongo on my vps when I already have MySQL installed and running.
That's up to you
@dusky steeple where's the insert function?
you're creating an sql command, but not executing it from what i can see
When i put this in my botconfig.json file, in an attempt to make multiple prefixes, I get an error
`{
"prefix": "<<"
}
{
"prefix2": "@fringe helm"
}`
And when i try to put in on the inside, I get an error
what is the best way to host a bot (methods i have heard of is glitch, aws, rasberry pi)
best way is a vps
@last lava vpses arent free, if you want to host for free you'll have to use glitch/heroku or host it yourself like with a raspberry pi
rpi is only "free" if you're not the one paying your bills
your parents/guardians will be paying it for you without their knowledge basically
but a vps's internet is most likely better than yours
unless you got that good fibre

Is there a plan to add an Apex tag for bots?
dunno what that is
you can make an issue on the github
but i assume most site users wont understand/use it
Didn't know if it was worthy of an issue. It's a new battle royale game
It's currently the most viewed game on twitch
alrighty
Thanks! I'll push it as an issue then
yw
var allImages = document.getElementsByTagName("img");
console.log(allImages)
allImages.forEach(i => {
if (!i.id) {
var stat = i;
stat.setAttribute("data-toggle", "tooltip");
stat.setAttribute("data-placement", "right");
stat.setAttribute("title", "Test");
}
})
> HTMLCollection { 0: img#logo.logo, 1: img, 2: img, 3: img, 4: img, 5: img, 6: img, 7: img, 8: img, 9: img
, โฆ }
> TypeError: allImages.forEach is not a function[Learn More]```
anyone able to help here
Try to convert the HTMCollection to a slice
var imageList = Array.prototype.slice.call(allImages);
imageList.forEach(i => {
...
}
alright
@upbeat maple that stopped the errors but the code itself didnt work :(
the image tags stayed like <img src="/wiki/rooms/restroom.png" alt="Restroom"> without the mew attributes added
Ah... I see. I don't have a testbench set up but can you try using imageList as a for loop instead
and then index into each item of allImages
So, you would be doing allImages[x].setAttribute(...)
hm, okay
i've never used for loops much, how would i do that?
also, i need to make sure the images dont have an id for specific purposes
alright
okay, then i just use imageList[x].setAttribute("data-toggle", "tooltip"); and such inside?
hm, that didnt seem to work either
seems that setAttribute isn't working anyways, it is making it to the loop
Use the "x" index for allImages
ah
Is there any alternative for big bots instead of webhooks to check who voted yet?
@cold niche you can just the check endpoint to check if a specific user has voted, or you can use the endpoint to get the last 1k votes if it works, but the webhooks are recommended
To 90% of this server.
I try to answer every question I get. Unfortunately a lot of them are extremely low effort and waste my time. I love to help, but please put some work into y...
Pin that ^
i agree
could pin but maybe all the hacking examples will be confusing
LiveOverflow its a very good channel ๐
in the website? only tags
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/bot.js:11:1)```
What's the problem?
Help Pls
literally tells you, can't find the module
wrong filepath or your file doesnt even exist
hmm
I'il check it out.
Thx
Hey @marble needle
Error: Cannot find module './modules/functions.js'
What's the problem?
do ../modules/functions.js
how can you be that certain if you have no idea about his folder structure
I'm using glitch and now I'm going to do npm install 'module'?
im not but what's wrong with trying it
I have had the same error and that was the pronlem
problem
you use ./ to access the folder the file you're working on is located in. ../ to access the folder thats one level up from the current one
./modules/ implies that in your current working folder there is another folder called modules
if that isn't the case your filepath is wrong and it'll error because it can't find the file you specified at the location you provided
I think I've figured it out , but still got a problem?
@marble needle Do you know how to use glitch?
never used free hosting, never will
@topaz fjord
tbh you should be able to do go get github.com/...
I have to go to class now, ttyl
did you maybe download a malformed package?
like not malformed but the link is wrong
It's http://; that's the issue
can someone help me with that ?
What are you trying to do and screenshot of code
@scarlet bane
index.py:30: UserWarning: Creating a client session outside of coroutine is a very dangerous idea
session = aiohttp.ClientSession()
I am looking for someone to beta test a bot before a big update. Would offer the same for one of your bots ofc ๐
rule 4 
How do you ask for someone to test something with that rule 
- friends
- alt accounts
your beta testers should be people who are already users of your bot, or at least that already know it and are interested in its features
people who know nothing about the bot or how its supposed to work wont be able to accurately test and debug it for you
fair point tim ๐
i don't know anyone who is using it tho and messaging random people using it is a bit weird?
Then second choice that marco said alt accounts 
can you be logged in with multiple accounts?
Also I am mostly looking for feedback on user experience, thats hard to generate with alts ๐
Means you have to smh find a friend that uses it?
yeah, i though asking here is an option if maybe someone else is interested in feedback for their bot too. But i can understand if this falls under rule4
huh, almost like you could finish up a build make it public and use your support server to collect feedback
Do people finish up games before a public release without testers? Usually not. He did what a dev should do and get testers. Just not the right place
alpha/beta phases exist, for public testing 
How fast is sqlite 
fast ๐
what for?
Yeah storing custom prefixes
i use mongo for that, but its very comparable in speed to sqlite
I use mongo for my prefix atm too
But it's sacrificing the bots speed for me
I tested the speed and it takes around 30ms to read/write keys
30ms isn't even bad what
If you want it to be very fast I guess you could cache them if you have enough memory for that
Mongo or sqlite tho
@split hazel most of that latency probably isnt even caused by mongo ๐ค
how are you even measuring the latency
how long it takes to execute the thing
and yeah i wont cache because i'm running low on mem
@trim saddle warnings only stop the weak


are you actually concerned about storing like 100 strings? @split hazel

the amount of space that takes up is ridiculously small
yeah if speed is the worry just use a dict and store it in the bot variable
read once at the start and do update functions
How can i add a reaction to a message? The reaction is uploaded on the server. Using Java and JDA
Message#addReaction
i uh did something wrong... https://paste.tscforum.com/klagprjteo.js
ik
or MessageChannel#addReactionById
But it doesnt work with custom reactions
cmdFound is a boolean?
String emote = args[1]; message.addReaction(emote).queue(); This is my current code
What shall i change?
@inner jewel
how can i get the id of an emote
Emote#getId()
hello!
@split hazel if you need maximum performance, go with redis
well, at his scale mongo should not be taking 30ms for a single operation
Whats a good db tho?
all are good, depends on your needs
for small applications sqlite does a great job
An actual db tho
sqlite is a db
for bigger applications that require a database server, there is mysql, postgre, mongo, and many others
json is a db, change my mind 
for sql i'd use pg
rethink
sqlite can handle sharding
Is it difficult?
sqlite is embedded ye?
would cause issues if you ever need to split your bot across multiple processes
i think
(?)
sqlite can handle multiple processes
Whats the best way to test before actually doing it? Making a 2nd app?
across multiple machines, even
not for multiple machines
if you need multiple machines, you need a server
sqlite is not a server
mysql/mongo/postgre are servers
Atleast switching dbs isnt that hard
its not hard if you have no data
if you have lots of data, it will need to be exported/imported at least
I have data, but i can loop over all of it and put it into a new db
yeah
and that only works well for small datasets
when you have a lot of data it's hard to change
a lot of data meaning tens/hundreds of gb
I think mines still small enough to transfer fine
Less than a gb across it I believe
my bot's database is like 2mb in size
Yeah, I think mine is like 15mb. But I dont store data as efficiently as possible
A mistake I made early on
But Id have to remake a bunch of my code to change it.
yeah but it should be fine
if you know you made a mistake and are switching dbs anyway why not fix that then
and you should be fine with sqlite as well
Im not switching atm
ah
@quartz kindle sqlite is good, i just tried it
1ms read and around 12ms write is good
๐
http://prntscr.com/mjosc1 How can i do such a setup?
I mean that the bot waits for the next message etc
I need to confirm what this error is saying E:\<REDACTED PATH>\node_modules\integer\build\integer.vcxproj(20,3): error MSB4019: The imported project "E:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk From what I understand this has something to do with the path being broken correct?
does anyone know how to add a delete_after argument to the default help command?
what do you mean
what exactly do you need?
I want the default help message to delete itself after 30 seconds
which language and library?
discord.py 1.0.0 Python 3.6
not sure about python, but you can probably sleep for 30 seconds and then execute a delete command on the received message object
sleeping in non async context is bad
how do you put it into async?
i found this in the rewrite docs, so you're right
coroutine send(content=None, *, tts=False, embed=None, file=None, files=None, delete_after=None, nonce=None)```
you should be able to add it as an argument in the send command
there isn't a send command for it since it's built in though
I don't send the help command, it's the default
what do you mean?
The rewrite library includes a help command by default
it's in discord.py, so it can't be directly edited
thanks
I've gotta go, but if you find anything useful, would you mind sending it to me via DM?
thanks for the help
You can do it with wait_for_reaction for example
res = await self.bot.wait_for_reaction(emoji=self.pages, message=msg, timeout=180, check=check)
# redirect on reaction
if res is None:
await self.bot.delete_message(msg)
return None
else:
if str(res.reaction.message.channel.type) != 'private':
await self.bot.remove_reaction(res.reaction.message, res.reaction.emoji, res.user)
return res
the first part, if res is None triggers when the timeout expires
you could easily work in an X emoji to delete and then auto delete on timeout
@young jungle i cant find anything about it in the rewrite docs. there is a bot.remove_command("help") thing, but i think its for async
why do libs ship with built in commands smh
thanks guys
you use it to remove the default help command
Not only
oh no
ye but he wanted to edit the built-in help command
i didnt find anything about that in the docs, the only thing i found was removing it so you can build your own
you cant edit the default
unless you go in discord.py source i guess
which is

when does DBL weekend starts?
GMT-0 00:00 of Saturday?
(and I presume it ends on GMT-0 00:00 of Monday)
What lan is that
Ok so earlier i ask a question about this error E:\<REDACTED PATH>\node_modules\integer\build\integer.vcxproj(20,3): error MSB4019: The imported project "E:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. I checked path on my server, its not there so idk where is came from, and I looked up the error code. The error code is for C# or like C++ i forget, but anyway I'm coding in js so this very much confuses me.
could I get an opinion on this: http://familyfriendly.xyz/b/bob/db
is it clear that he thing is a search bar
yes
alright thanks
Wait what is it for?
my bot
seems like an error tho
error?
oh
hmm
tbh I like the red text, should i change the color
I have no idea how to style things lol
add a dark theme then you're good
maybe blue is better?
daRK theme yeet
just not red
gotcha


๐