How to create a discord bot that is capable of registering accounts into mysql ?

Hello, I wish to create a discord bot that users can use a simple command to input the username and password, then delete the typed message.
Need help finishing this, trying to make a Discord bot register an account on mySQL server.

//Discord Bot
const Discord = require(‘discord.js’);
const client = new Discord.Client();
//default prefix
let prefix = “??”;

const mysql = require(‘mysql’);
var con = connection = mysql.createConnection
host : ‘localhost’,
port : ‘3306’,
user : ‘root’,
password : ‘’,
database : ‘auth’,
charset : ‘utf8mb4’

//confirm connection
con.connect(err =>
if(err) throw err;
console.log(“Connected to the DB.”)
//Bot Token
client.on(‘Ready’, readyDiscord);

//verification Bot is working
function readyDiscord() {

//message function
client.on(“message”, (message) =>
if (!message.content.startsWith(prefix) || return;
if ( ==‘!IDCHANNEL!’ && message.content.startsWith(prefix + ‘Register’))
sql = “INSERT INTO account (username, verifier) VALUES (‘’, ‘’)”;
con.query(sql, function (err, result) {
if (err) throw err;
console.log(“1 record inserted”);

      message.reply('You are registered, welcome to the server!.');
    } else
    //PING to confirm this works, will remove later.
    if ( =='!IDCHANNEL' && message.content.startsWith(prefix + 'Ping'))

as you can see i am having trouble with the variables needed to complete this.
(Yes I don't mind sharing my code.   :) )
I am hoping this can become to an actual Opensource project.

Checkout this bot from azerothcore here: GitHub - XanderDeLaet/AzerothCoreDiscordBot: A Discord Bot that connects to your AzerothCore server so you / users can manage the server / character. Made for AzerothCore / azerothcore-tools

To Do:
You need to change “’ xmlns:ns1=“urn:AC”>'” to “’ xmlns:ns1=“urn:TC”>'”

in “soap.js” line 42.

And if you using the master, you need to adapt the account creation command.