<commit_before>module.exports = {

    getChannelName: function(robot, res){
        return (robot.adapter.client.rtm.dataStore.getChannelGroupOrDMById(res.message.room)).name;
    },

    getUserName: function(res){
        return res.message.user.name;
    },

    getChannelId: function(res){
        return  res.message.room;
    },

    getUserId: function(res){
        return res.message.user.id;
    },

    getTeamId: function(res){
        return res.message.user.team_id;
    },

    menu: function(){
        return {
                "text": "",
                "mrkdwn": true,
                "response_type": "in_channel",
                "attachments": [
                    {
                        "text": "",
                        "fallback": "",
                        "color": "#3AA3E3",
                        "attachment_type": "default",
                        "callback_id": "cb_id",
                        "mrkdwn_in": [
                            "text",
                            "pretext"
                        ],
                        "actions": [
                            {
                                "name": "",
                                "text": "",
                                "type": "select",
                                "options": [
                                    {
                                        // To add menu items: 
                                        // item = {"text": text, "value": value} 
                                        // attachements[0].actions.[0].options.push(item)
                                        // "text": "",
                                        // "value": ""
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
    },

    buttons: function(){
        return {
                "text": "",
                "attachments": [
                    {
                        "text": "",
                        "fallback": "",
                        "callback_id": "cb_id",
                        "mrkdwn_in": [
                            "text",
                            "pretext"
                        ],
                        "color": "#3AA3E3",
                        "attachment_type": "default",
                        "actions": [
                            {
                                // To add buttons: 
                                // item = {"name":name, "text": text, "type":"button", "value":value} 
                                // attachements[0].actions.push(item)
                                
                                // "name": "",
                                // "text": "",
                                // "type": "",
                                // "value": ""
                            }
                        ]
                    }
                ]
        } 
    },

    basicMessage: function(){
        return {
            "attachments": [
                {
                    "fallback": "",
                    "mrkdwn_in": ["text", "pretext"],
                    "color": "#36a64f",
                    "pretext": "Please get a token to authorize your Trello account",
                    "title": "Slack API Documentation",
                    "title_link": "",
                    "text": "Copy the token from the link above and run\n *trello add token <YOUR TOKEN>*",
                    "footer": "Trello Authorization",
                    "footer_icon": "https://d2k1ftgv7pobq7.cloudfront.net/meta/u/res/images/b428584f224c42e98d158dad366351b0/trello-mark-blue.png"        }
            ]
        }
    },

    // only visible to the user involved 
    ephemeralMsg: function(){
        return {
          "response_type": "ephemeral",
          "replace_original": false,
          "text": "This is an ephemeral msg!"
        }
    }

    
}

<commit_msg>update slack msg callback<commit_after>module.exports = {

    getChannelName: function(robot, res){
        return (robot.adapter.client.rtm.dataStore.getChannelGroupOrDMById(res.message.room)).name;
    },

    getUserName: function(res){
        return res.message.user.name;
    },

    getChannelId: function(res){
        return  res.message.room;
    },

    getUserId: function(res){
        return res.message.user.id;
    },

    getTeamId: function(res){
        return res.message.user.team_id;
    },

    menu: function(){
        return {
                "text": "",
                "mrkdwn": true,
                "response_type": "in_channel",
                "attachments": [
                    {
                        "text": "",
                        "fallback": "",
                        "color": "#3AA3E3",
                        "attachment_type": "default",
                        "callback_id": "cb_id",
                        "mrkdwn_in": [
                            "text",
                            "pretext"
                        ],
                        "actions": [
                            {
                                "name": "",
                                "text": "",
                                "type": "select",
                                "options": [
                                    {
                                        // To add menu items: 
                                        // item = {"text": text, "value": value} 
                                        // attachements[0].actions.[0].options.push(item)
                                        // "text": "",
                                        // "value": ""
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
    },

    buttons: function(){
        return {
                "text": "",
                "attachments": [
                    {
                        "text": "",
                        "fallback": "",
                        "callback_id": "cb_id",
                        "mrkdwn_in": [
                            "text",
                            "pretext"
                        ],
                        "color": "#3AA3E3",
                        "attachment_type": "default",
                        "actions": [
                            {
                                // To add buttons: 
                                // item = {"name":name, "text": text, "type":"button", "value":value} 
                                // attachements[0].actions.push(item)
                                
                                // "name": "",
                                // "text": "",
                                // "type": "",
                                // "value": ""
                            }
                        ]
                    }
                ]
        } 
    },

    basicMessage: function(){
        return {
            "attachments": [
                {
                    "fallback": "",
                    "mrkdwn_in": ["text", "pretext"],
                    "color": "#36a64f",
                    "pretext": "Please get a token to authorize your Trello account",
                    "title": "Slack API Documentation",
                    "title_link": "",
                    "text": "Copy the token from the link above and run\n *trello add token <YOUR TOKEN>*",
                    "footer": "Trello Authorization",
                    "footer_icon": "https://d2k1ftgv7pobq7.cloudfront.net/meta/u/res/images/b428584f224c42e98d158dad366351b0/trello-mark-blue.png"        }
            ]
        }
    },

    // only visible to the user involved 
    ephemeralMsg: function(){
        return {
          "response_type": "ephemeral",
          "replace_original": true,
          "text": "This is an ephemeral msg!"
        }
    }

    
}


{'fraction_non_alphanumeric': 0.11623547056617922, 'fraction_numerical': 0.009998750156230472, 'mean_word_length': 0.7253126347563605, 'pattern_counts': {'":': 98, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1638423', 'n_tokens_mistral': 1983, 'n_tokens_neox': 1792, 'n_words': 313}