and it also stores your account ID, the waifu name and the amount of waifu’s you’ve claimed in a database. All the data would also be stored in the guild ID you claimed the waifu in so that the waifu’s you’ve claimed won’t be global.
(I don’t want to manually put the guild ID’s or any of the other things I mentioned)
DM me on discord if you need any more details: HK#1331
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "yourusername",
password: "yourpassword",
database: "mydb"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
var sql = "INSERT INTO photos (image, discord_id) VALUES ('username', 'photo')";
con.query(sql, function (err, result) {
if (err) throw err;
console.log("1 record inserted");
});
});
@HK420 I would grab a free DB from MongoDB Atlas. There are tones of tutorials to set it up with node and even specifically for discord.js using the Mongoose npm package. The free DB plan should be above and beyond what you need.
If this bot is for a personal server only, I recommend using free database sites, such as MangoBD and/or Google Cloud (I recommend Google Cloud.) If this bot is intentionally for more than 100+ servers, a paid database would be better.