<commit_before>import 'dart:io';
import 'dart:convert';
import 'package:discord/discord.dart' as discord; //Do not change this.

main() async {
  var config = JSON.decode(await new File('config.json').readAsString());
  var bot = new discord.Client(config['token']);

  bot.on('ready', (e) { //e is telling the event.
    print("Bot online and ready!"); //Telling you that the bot is online and ready to use.
  });

  bot.on('message', (e) { //e is telling the event
    var m = e.message; //You can change the m to msg or message or whatever you like.
    //Don't do something big.
    print("User: " + m.author.username + " Guild Name: " + m.guild.name + " Message: " + m.content);
    //Logging system.

    if (m.content.startsWith(config['prefix'] + "ping")) {
      m.channel.sendMessage("Pong!");
    }
  });
}<commit_msg>Revised comments<commit_after>// Import libraries.
import 'dart:io';
import 'dart:convert';
import 'package:discord/discord.dart' as discord;

// Where the code goes.
main() async {
  // Load the config and start the bot.
  var config = JSON.decode(await new File('config.json').readAsString());
  var bot = new discord.Client(config['token']);

  // Print a message when the bot is ready.
  bot.on('ready', (e) {
    print("Bot online and ready!");
  });

  // Do stuff whenever the bot receives a message.
  bot.on('message', (e) {
    // Shortcut for e.message
    var m = e.message;

    // Log messages
    print("User: " + m.author.username + " Guild Name: " + m.guild.name + " Message: " + m.content);

    // Ping command.
    if (m.content.startsWith(config['prefix'] + "ping")) {
      m.channel.sendMessage("Pong!");
    }
  });
}
{'fraction_non_alphanumeric': 0.1688622754491018, 'fraction_numerical': 0.0, 'mean_word_length': 3.136138613861386, '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': '5224742', 'n_tokens_mistral': 553, 'n_tokens_neox': 541, 'n_words': 164}