[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Discord bot user database

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 13
Thread images: 3

File: unnamed.png (43KB, 300x300px) Image search: [Google]
unnamed.png
43KB, 300x300px
So I'm starting up a new discord bot, and I'm fairly new to it all. I'm using discord.js as the library, and it certainly contains most of the tools I need to make what I want.
The issue is that I want to implement a database that can track user stats and such. I've thought about using the Collection/Map classes to have each user ID act as a key to an array that saves this data, but I need somewhere to save/load this data since as far as I'm aware the database wipes every time I restart the code.

Is there a efficient write/read system for doing this in javascript? Would it work well if I put my bot on a dedicated server?
>>
>>60898721
STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT STOP USING THIS UGLY FAGGOT ASS PIECE OF SHIT
>>
What are you using to run this javascript?
Nodejs? I'm pretty sure it has plenty of filesaving functions.
>>
>>60898734
t. Angry TS user
>>
>>60899052
>ts
ewww
>>
>>60898721
>using something that bans lolis
>>
>>60898721
use any database you're comfortable with. there are plenty of drivers on npm.
>>
>>60899166
This.
>>
>>60898721
Why not just use a JSON file.
>>
>>60899537
>>60899166
I was hoping for a bit more depth in the answers. Like I said I'm fairly new to this. I've done s decent amount of programming in java, and javascript is just different enough to throw me off at key points.
>>
File: stallman.jpg (114KB, 690x388px) Image search: [Google]
stallman.jpg
114KB, 690x388px
>>60900967
>Java
>JavaScript
>Discord

Unless you're willing to change your mind and develop this bot for Matrix, get out.

https://matrix.org
>>
>>60900967
Use MySQL.
Install it using
npm install mysql

Documentation available here: https://www.npmjs.com/package/mysql
>>
File: discord.png (26KB, 1003x345px) Image search: [Google]
discord.png
26KB, 1003x345px
>>60898721
Thread posts: 13
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.