Giter VIP home page Giter VIP logo

ap2020bot's Introduction

class-slackbot

Google Apps Script (GAS) で動く,クラスSlackのbot

Setup

デプロイ設定

cp .clasp.example.json .clasp.json

gas-clasp-starterのセットアップをする(test環境が不要であれば,その項はスキップ可)

Trello連携設定

Slackと連携するチームがまだなければ作成

SlackにTrelloをインストール

ドライブ管理に使うボードを作成

  • チームメンバーが参加できるようにする: オフ
  • コメントの許可設定: チームメンバー

にしておくと管理者以外のチームメンバーは閲覧とコメント権限のみ持つ。

ドライブ管理ボードと連携するSlackチャンネルを作成

/invite @trello
/trello ボードのURL

GASのスクリプトのプロパティ設定

  • slack-bot-token: botトークン
  • slack-user-token: 全ユーザのメッセージ削除のための管理者のトークン
  • seashore-id: 定期的にメッセージ削除するSlackのチャンネルのID
  • root-folder-id: 更新通知対象のフォルダ
  • drivelog-id: 更新通知するSlackのチャンネルID
  • drivelog-admin-id: Trelloと連携するSlackのチャンネルID
  • ignored-drive-items: 更新通知されたくないフォルダやファイルのIDのリストのJSON
  • trello-token, trello-key: TrelloのAPIトークンとキー
  • trello-drive-board-id: ドライブ管理に使うTrelloボードID
./deploy.release.sh

Licenses

MIT License

このリポジトリは以下のプロジェクトを利用しています。

gas-clasp-starter

Copyright (c) 2018 Tatsuya Nakano Released under the MIT license

ap2020bot's People

Contributors

dependabot[bot] avatar e5f6bd avatar howdy39 avatar pizzacat83 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

e5f6bd

ap2020bot's Issues

UpdateNotifier: 自動復元失敗を繰り返さない

稀に restoreItem が失敗するが,10分おきに自動復元を試みるので無限エラー発生器になってしまう上,他のアイテムの自動復元が滞る。

1回失敗したら何回やっても多分ダメなので,Trelloに「ToDo: autofix failed」みたいなボードを用意して,失敗したアイテムのカードはそこに移して自動復元が繰り返されないようにしたい。

GASlackerに移行

Slack APIのライブラリとして現在SlackAppを使っているが,古くて対応していないAPIも多い。
もう少し新しいライブラリとしてGASlackerがあるので,それに移行したい

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.