<commit_before>
module.exports = (function(){

    //TODO: one instance for one client.

    var request = require("request"),
        config = require("./config.json");

    var resultHandler = {
        echo: (result) => {
            return {
                type: "msg",
                result: result.msg
            };
        },
        kktix: (result) => {

            var command = result.kkCommand;
            var returnStr;

            commandHandlers = {
              notify: function(){
                return (result.tickets.allClosed ? "目前所有票種均已售畢 (╥﹏╥)\n" : "") + result.tickets.map((e, i)=>{
                    return `[${i}] ${e.ticketType} ${e.closed ? "(售畢)" : ""}`;
                }).join("\n") + `.........#${result.timerId}`;
              },
              stop_notify: function(){
                return result.result ? "解除成功" : "解除失敗 QQ";
              },
              check: function(){
                return (result.tickets.allClosed ? "目前所有票種均已售畢 (╥﹏╥)\n" : "") + result.tickets.map((e, i)=>{
                    return `[${i}] ${e.ticketType} ${e.closed ? "(售畢)" : ""}`;
                }).join("\n");
              }
            }

            returnStr = commandHandlers[command]()

            return {
                type: "msg",
                result: returnStr
            };<commit_msg>Show URL Link when response ticket status.<commit_after>
module.exports = (function(){

    //TODO: one instance for one client.

    var request = require("request"),
        config = require("./config.json");

    var resultHandler = {
        echo: (result) => {
            return {
                type: "msg",
                result: result.msg
            };
        },
        kktix: (result) => {

            var command = result.kkCommand;
            var returnStr;

            var eventUrl = "http://{{organization}}.kktix.cc/events/{{event}}".replace("{{organization}}", result.organization).replace("{{event}}", result.event)

            commandHandlers = {
              notify: function(){
                return (result.tickets.allClosed ? "目前所有票種均已售畢 (╥﹏╥)\n" : "") + result.tickets.map((e, i)=>{
                    return `[${i}] ${e.ticketType} ${e.closed ? "(售畢)" : ""}`;
                }).join("\n") + "\n" + `${eventUrl} .........#${result.timerId}`;
              },
              stop_notify: function(){
                return result.result ? "解除成功" : "解除失敗 QQ";
              },
              check: function(){
                return (result.tickets.allClosed ? "目前所有票種均已售畢 (╥﹏╥)\n" : "") + result.tickets.map((e, i)=>{
                    return `[${i}] ${e.ticketType} ${e.closed ? "(售畢)" : ""}`;
                }).join("\n");
              }
            }

            returnStr = commandHandlers[command]()

            return {
                type: "msg",
                result: returnStr
            };
{'fraction_non_alphanumeric': 0.1787204450625869, 'fraction_numerical': 0.0, 'mean_word_length': 1.407531380753138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4651058', 'n_tokens_mistral': 908, 'n_tokens_neox': 878, 'n_words': 161}