<commit_before># Description:
#   リアクションに反応するbot
# Author:
#   raoka0000

slack = require 'hubot-slack'

module.exports = (robot) ->
  robot.adapter.client.rtm.on 'raw_message', (msg) ->
    message = JSON.parse msg
    return unless message.type is 'reaction_added'
    switch message.reaction
      when 'gotiusa_tino'
        data =
          attachments: [
            author_name: "チノ"
            image_url: "http://otiai10.com/chino.gif"
            color: "ece0f8"
          ]
        robot.send {room: message.item.channel}, data
      when 'serval-chan'
        data =
          attachments: [
            author_name: "チノ"
            image_url: "http://otiai10.com/chino.gif"
            color: "ece0f8"
          ]
        client = robot.adapter.client
        client.web.chat.postMessage(message.item.channel, 'テストだよ！', data)
      when 'chocobot'
        return if message.is_starred is true
        arr = [
          "呼んだクエ？",
          "ナイスだクエ！",
          "リアクションありがとうクエ！",
          "クエックエックエ〜",
          "クエックエックエ〜チョコボール",
          "_チョコボ_",
          "素晴らしいクポ！"
        ]
        text = arr[Math.floor(Math.random() * (arr.length + 1))]
        robot.send {room: message.item.channel}, text<commit_msg>サーバルちゃん実装<commit_after># Description:
#   リアクションに反応するbot
# Author:
#   raoka0000

slack = require 'hubot-slack'

module.exports = (robot) ->
  robot.adapter.client.rtm.on 'raw_message', (msg) ->
    message = JSON.parse msg
    return unless message.type is 'reaction_added'
    switch message.reaction
      when 'gotiusa_tino'
        data =
          attachments: [
            author_name: "チノ"
            image_url: "http://otiai10.com/chino.gif"
            color: "ece0f8"
          ]
        robot.send {room: message.item.channel}, data
      when 'serval-chan'
        data =
          username: "serval-chan"
          icon_emoji: ":serval-chan:"
          as_user: false
        client = robot.adapter.client
        arr = [
          "すごーい",
          "フレンズのみんなー！元気ー？",
          "すごーい！あなたは素敵なフレンズなんだね！",
          "おもしろーい！",
          "わーい！",
          "美味しいものを食べてこその人生だよ！",
          "わーい！すごーい！"
        ]
        text = arr[Math.floor(Math.random() * (arr.length + 1))]
        client.web.chat.postMessage(message.item.channel, text, data)
      when 'chocobot'
        arr = [
          "呼んだクエ？",
          "ナイスだクエ！",
          "リアクションありがとうクエ！",
          "クエックエックエ〜",
          "クエックエックエ〜チョコボール",
          "_チョコボ_",
          "素晴らしいクポ！"
        ]
        text = arr[Math.floor(Math.random() * (arr.length + 1))]
        robot.send {room: message.item.channel}, text
{'fraction_non_alphanumeric': 0.1314176245210728, 'fraction_numerical': 0.008812260536398468, 'mean_word_length': 1.7835820895522387, 'pattern_counts': {'":': 1, '<': 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': '2096758', 'n_tokens_mistral': 1024, 'n_tokens_neox': 1014, 'n_words': 155}