<commit_before>const crypto = require("crypto");

exports.run = function (message, params, bot, db) {
  if (params === "") {
    message.reply("Please enter a question, e.g. ``!question Is butt legs?``");
    return;
  }
  db.query(
    "INSERT INTO trivia_questions (user, question, timecreated, web_key) VALUES (?, ?, now(), ?)",
    [message.author.id, params, crypto.randomUUID()],
    function (err, result) {
      message.reply("Question #" + result.insertId + " has been registered.");
    }
  );
};

exports.interaction = function (interaction, bot, db) {
  const question = interaction.options.getString("question");
  db.query(
    "INSERT INTO trivia_questions (user, question, timecreated, web_key) VALUES (?, ?, now(), ?)",
    [interaction.user.id, question, crypto.randomUUID()],
    function (err, result) {
      interaction.reply({
        content: "Question #" + result.insertId + " has been registered.",
      });
    }
  );
};
<commit_msg>remove non-slash question<commit_after>const crypto = require("crypto");

exports.run = function (message, params, bot, db) {
  message.reply(
    "The non-slash version of this command has been removed due to people mistaking question for answer. Please use the slash command."
  );
};

exports.interaction = function (interaction, bot, db) {
  const question = interaction.options.getString("question");
  db.query(
    "INSERT INTO trivia_questions (user, question, timecreated, web_key) VALUES (?, ?, now(), ?)",
    [interaction.user.id, question, crypto.randomUUID()],
    function (err, result) {
      interaction.reply({
        content: "Question #" + result.insertId + " has been registered.",
      });
    }
  );
};

{'fraction_non_alphanumeric': 0.15671200473092844, 'fraction_numerical': 0.0, 'mean_word_length': 3.6740331491712706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '97030', 'n_tokens_mistral': 511, 'n_tokens_neox': 499, 'n_words': 137}