<commit_before>//imports discord.js moldule
const Discord = require('discord.js');
//Create instance of the discord client
const servoRoboto = new Discord.Client();

servoRoboto.on('message', (message) =>{
    if(message.content == 'ping'){
        message.reply('pong');
    }
});

//requires bot token that was created when Servo-Roboto was made via discord
//keep this token private
servoRoboto.login('<KEY>');<commit_msg>Added some simple commands time and date<commit_after>//imports discord.js moldule
const Discord = require('discord.js');
//Create instance of the discord client
const servoRoboto = new Discord.Client();

servoRoboto.on('ready', () => {
  console.log('I am ready!');
});

servoRoboto.on('message', (message) =>{
    if(message.content.toLowerCase() == 'ping'){
        message.reply('pong');
    }
    
    if(message.content.toLowerCase() == 'bing' && message.author.username != 'Servo-Roboto'){
        var trucks = (Math.random()*10);
        message.channel.send('bong');
        if(trucks > 5){
            message.channel.send('bing');
        }
    }

    if(message.content.toLowerCase() == 'bing bong'){
        message.reply('I heard you like trucks.');
    }

    if(message.content.toLowerCase() == '!date'){
        var date = new Date();
        message.reply('Todays date is: ' + (date.getMonth()+1) + '/' + date.getDate() + '/' + date.getFullYear());
    }
    if(message.content.toLowerCase() == '!time'){
        var date = new Date();
        message.reply('The time is: ' + formatAMPM(date));

    }
});

//To transfer from 24 hour clock to 12 hour.
function formatAMPM(date) {
  var hours = date.getHours();
  var minutes = date.getMinutes();
  var ampm = hours >= 12 ? 'pm' : 'am';
  hours = hours % 12;
  hours = hours != 0 ? hours : 12; // the hour '0' should be '12'
  minutes = minutes < 10 ? '0' + minutes : minutes;
  var strTime = hours + ':' + minutes + ' ' + ampm;
  return strTime;
}

//requires bot token that was created when Servo-Roboto was made via discord
//keep this token private
servoRoboto.login('<KEY>');
{'fraction_non_alphanumeric': 0.16795366795366795, 'fraction_numerical': 0.010135135135135136, 'mean_word_length': 3.2134146341463414, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, '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': '1604550', 'n_tokens_mistral': 679, 'n_tokens_neox': 661, 'n_words': 176}