Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 4.47 KB

README-EN.md

File metadata and controls

110 lines (75 loc) · 4.47 KB

Bot understands English and Russian languages

If you need fast and handy tool to schedule your plans, Smart Scheduler Bot is the right choice.

Usage example

How to use

Smart Scheduler Bot works in Telegram. Just type task with required expiration time and Smart Scheduler will automatically find scheduling date and what task to schedule in your message. Smart Scheduler will send you notification when particular task's time expires.

Features

You do not need to follow specified date format, Smart Scheduler understands most of human date formats (e.g. «in 5 minutes, «at 5 minutes to 10 pm», «after tomorrow in half past 1»).
Also it's not necessary to write perfectly. Bot can understand what you meant to say even in words with mistakes (e.g. «in twinty minuts» -> «in 20 minutes»).
You can make multiple reminders in one message by dividing each with dot, comma or word "and".

Smart Scheduler can store tasks with minute precision.
Smart Scheduler can generate schedules from voice messages.
Smart Scheduler supports recurring reminders (e.g. «every 5 minutes») and also supports time limits for them (e.g. «every 5 minutes until 20 hours»).
Smart Scheduler supports pictures, videos and files 💾 in reminders.
Smart Scheduler stores tasks separately for every chat and can work in conversations.

Smart Scheduler can be integrated to your Trello board!
More details: Guide to working with Trello.

Supported commands:

  • 🗓 /list - Shows active tasks for current chat.

  • 🗑 /del 1, 2, ...N - Deletes tasks by id.

  • 🗑 /del 1-10, A-B - Deletes all tasks within range.

  • #️⃣ /N - Deletes N-th task.

  • 🌐 /tz - Configures time zone.

and /start with /help of course.

Installation

This bot requires PostgreSQL data base.

Environment variables

Make sure you set following environment variables before starting the bot:

  1. ENABLE_LOGS: "true" or "false", enables or disables logging.
  2. ENABLE_SCHEDULES_CHEKING: "true" or "false", enables or disables checking and sending notifications.
  3. TZ: only "GMT".
  4. DATABASE_URL (optional): URL of your PostgreSQL data base.
  5. SMART_SCHEDULER_DB_URL (optional): URL of your PostgreSQL data base.
  6. IS_HEROKU: "true" or "false". If true, then use DATABASE_URL for data base URL, else SMART_SCHEDULER_DB_URL.
  7. SMART_SCHEDULER_TLGRM_API_TOKEN: telegram bot token.

For debugging (optional):

  1. SMART_SCHEDULER_ADMIN: telegram-id of bot administrator user.
  2. SMART_SCHEDULER_DEBUG_MODE: "true" or "false". If enabled, then bot will check only those reminders, which were created by SMART_SCHEDULER_ADMIN.

For time zone definition via geolocation (optional):

  1. SMART_SCHEDULER_GOOGLE_API_KEY: api-key for Google services.

For voice messages processing (optional):

  1. YC_API_KEY: Yandex api key.
  2. YC_FOLDER_ID: Yandex catalog id.

For integration with Trello (optional):

  1. TRELLO_TOKEN: Trello api token.

On local server

$ git clone https://github.com/alordash/BotSmartScheduler
$ cd BotSmartScheduler
$ npm install
$ node ./BotCode/index.js

Deploying on heroku

  1. Create github account.
  2. Add this repository to yourself.
  3. Create heroku account.
  4. Create new heroku application.
  5. Open created application.
  6. Follow this link.
  7. Press Install Heroku Postgres.
  8. In the appeared line type your application name and press Provision add-on.
  9. Go to the tab Settings of your application.
  10. Press Reveal Config Vars.
  11. Fill all necessary enviromental variables.
  12. Go to the tab Deploy.
  13. In the field Deployment method choose GitHub.
  14. Connect your github account to heroku by pressing Connect to GitHub.
  15. In appeared window choose your respository, press connect.
  16. Press Deploy Branch.
  17. Once loaded, go to the tab Resources.
  18. Disable web, enable worker.
    Your bot is ready to work.