<commit_before>'use strict';

const Handler = require('../models/BaseEventHandler');
const { games } = require('../CommonFunctions');

/**
 * Describes a handler
 */
class NotifyOwnerJoin extends Handler {
  /**
   * Base class for bot commands
   * @param {Genesis} bot  The bot object
   * @param {string}  id   The command's unique id
   * @param {string}  event Event to trigger this handler
   */
  constructor(bot) {
    super(bot, 'handlers.notifyowner', 'guildCreate');
    this.channelTimeout = 60000;
  }

  /**
   * add the guild to teh Database
   * @param {Discord.Guild} guild guild to add to the database
   */
  async execute(...[guild]) {
    if (!games.includes('LOGGING')) return;
    this.logger.debug(`Running ${this.id} for ${this.event}`);

    if (!guild.available) {
      return;
    }
    const bots = guild.members.filter(member => member.user.bot);
    const isOverLimit = ((bots.size / guild.memberCount) * 100) >= 80;

    try {
      if (!isOverLimit) {<commit_msg>fix: notifying owner on bot-join<commit_after>'use strict';

const Handler = require('../models/BaseEventHandler');
const { games } = require('../CommonFunctions');

/**
 * Describes a handler
 */
class NotifyOwnerJoin extends Handler {
  /**
   * Base class for bot commands
   * @param {Genesis} bot  The bot object
   * @param {string}  id   The command's unique id
   * @param {string}  event Event to trigger this handler
   */
  constructor(bot) {
    super(bot, 'handlers.notifyowner', 'guildCreate');
    this.channelTimeout = 60000;
  }

  /**
   * add the guild to teh Database
   * @param {Discord.Guild} guild guild to add to the database
   */
  async execute(...[guild]) {
    if (!games.includes('LOGGING')) return;
    this.logger.debug(`Running ${this.id} for ${this.event}`);

    if (!guild.available) {
      return;
    }
    const bots = guild.members.cache.filter(member => member.user.bot);
    const isOverLimit = ((bots.size / guild.memberCount) * 100) >= 80;

    try {
      if (!isOverLimit) {
{'fraction_non_alphanumeric': 0.14710252600297177, 'fraction_numerical': 0.009905894006934125, 'mean_word_length': 3.080808080808081, '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': '2539746', 'n_tokens_mistral': 671, 'n_tokens_neox': 632, 'n_words': 178}