Skip to content

lemon5920/calendar-bot

Repository files navigation

Todo Notification Bot

此機器人用於 Slack 回答使用者:某人今日在指定 Google 行事曆上有什麼活動。

支援兩個 Commands:

  • /today_events : 列出「自己」今日所有活動。
  • /today_events_who : 列出「某人」今日活動。command 下完後,會出現 User Selector 跟你互動。

註:所有訊息都是透過 postEphemeral 發出,只有互動者可見,因此如果在群組中使用,並不會影響到其他人,可以盡情的跟機器人互動。

Configuration

Google API Token & Calendar API

可參考 此影片 設定。

主要工作為:

  • GCP 產生 Token。
  • 啟用 Calendar API。
  • 新增行事曆。
  • 相關參數加進 .env

Slack 設定

可參考 Bottender 的文件說明。

主要工作為:

  • 建立與設定 Slack App、Token、Scope、Event Subscriptions 等..。 參考
  • 啟用 Interactivity。 參考 (現在這個頁面叫「Interactivity & Shortcuts」)
  • 建立 Slash Command。 參考

Available Scripts

這個 Bot 是以 Bottender 為基礎建立,Script 與原本大同小異:

yarn dev

Runs the app in development mode.
The bot will automatically reload if you make changes to the code.
By default, server runs on http://localhost:5000 and ngrok runs on http://localhost:4040.

To run in Console Mode, provide the --console option:

yarn dev --console
npm run dev -- --console

yarn start

Runs the app in production mode.
By default, server runs on http://localhost:5000.

To run in Console Mode, provide the --console option:

yarn start --console
npm start -- --console

yarn deploy-heroku

Deploy the app to Heroku that you logged in.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published