mybotbeta.js
// Delete a trivia player's score
Delete a trivia player's score
Delete a trivia player ' s score
function giveTriviaPoints(UserID, points) {
  sql.get("SELECT * FROM scores WHERE userID = ?", UserID)
    .then(row => {
      if (!row) {
        sql.run("INSERT INTO scores (userID, points) VALUES (?, ?)", [UserID, points]);
      }
      else {
        sql.run(`UPDATE scores SET points = ${row.points + points} WHERE userID = ${UserID}`);
      }
    });
}
function giveTriviaPoints ( UserID , points ) { sql . get ( "SELECT * FROM scores WHERE userID = ?" , UserID ) . then ( row => { if ( ! row ) { sql . run ( "INSERT INTO scores (userID, points) VALUES (?, ?)" , [ UserID , points ] ) ; } else { sql . run ( ` ${ row . points + points } ${ UserID } ` ) ; } } ) ; }
Delete a trivia player's score
Delete a trivia player ' s score