<commit_before>const Botkit = require('botkit')
const BeepBoop = require('beepboop-botkit')

module.exports = (app) => {
  var ambientThreshold = 0.33

  var controller = Botkit.slackbot({
    retry: true,
    logger: botkitLogger(app.log)
  })

  BeepBoop.start(controller, {
    debug: true,
    logger: beepboopLogger(app.log)
  })

  var jokeTime = ['direct_message', 'direct_mention', 'mention']

  controller.hears('joke', jokeTime, function (bot, message) {
    bot.startTyping(message)

    app.jokes.random((err, joke) => {
      if (err) {
        app.log.error(err.message)
      }

      bot.reply(message, joke || "Hmmmm, I can't seem to think of any jokes. 😕")
    })
  })<commit_msg>fixing retry option<commit_after>const Botkit = require('botkit')
const BeepBoop = require('beepboop-botkit')

module.exports = (app) => {
  var ambientThreshold = 0.33

  var controller = Botkit.slackbot({
    retry: 10,
    logger: botkitLogger(app.log)
  })

  BeepBoop.start(controller, {
    debug: true,
    logger: beepboopLogger(app.log)
  })

  var jokeTime = ['direct_message', 'direct_mention', 'mention']

  controller.hears('joke', jokeTime, function (bot, message) {
    bot.startTyping(message)

    app.jokes.random((err, joke) => {
      if (err) {
        app.log.error(err.message)
      }

      bot.reply(message, joke || "Hmmmm, I can't seem to think of any jokes. 😕")
    })
  })
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 3.2844036697247705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1954795', 'n_tokens_mistral': 520, 'n_tokens_neox': 491, 'n_words': 104}