Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OdinBot

A bot that helps you excel on your daily tasks.

Odin is a Telegram bot created through the Telegram API. It is designed to track and help with your daily sessions. It uses Node's Natural Language Processing to distinguish phrases and categorize them into specified intents, in order to provide a suitable response. It has built-in methods (such as "/pomodoro") that allow users to utilize their functions.

At a Glance

Demo #1 Demo #2
  • note "7 minutes done!" didn't take 7 minutes because of demo purposes.

Current Methods

1. The Pomodoro Technique

The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. The technique uses a timer to break down work into intervals traditionally 25 minutes in length, separated by short breaks. These intervals are known as "pomodori", from the Italian word pomodoro for "tomato". The method is based on the idea that frequent breaks can improve mental agility.

After you have entered the commands "/pomodoro <session name>", <session name> executes.

  • Sending the text /pomodoro status will let you know how much time you have left in your current Pomodoro session or break.
  • Sending any other phrase will start a 25 minute pomodoro session. You'll be notified 25 minutes later via text to take a break. And then will be notified 7 minutes after that to get back to work (at which point you can send another phrase to start the Pomodoro session).
  • Sending the word /pomodoro clear will clear all sessions.

Example conversation:

  • /pomodoro status: "No pomodoro session is currently running."
  • /pomodoro Physics Lab: "Session "Physics Lab" started on 6/2/2019, 11:01:14 PM."
  • /pomodoro status: "Session "Physics Lab" is currently running. You have 25 minute(s) left."
  • Work for 25 minutes....
  • You'll get a text: ""25 minutes done! Take a break.""
  • /pomodoro status: "You're on break from "Physics Lab"! You have 7 minute(s) left before work."
  • Do something for 7 minutes to your heart's content...
  • You'll get a text: "7 minutes done. Back to work!"
  • /pomodoro status: "No pomodoro session is currently running."
  • And so on...

Project structure

  • src/
    • index.js — bot entrypoint
    • config.js — shared configuration and help text
    • commands/
      • pomodoro.js — pomodoro session logic
      • nlp.js — NLP training and responses
    • data/
      • classifier.json — classifier definition data
  • images/ — image assets used by the bot
  • .env.example — example environment configuration

Get Started

Get your own Telegram token from BotFather. More on that here.

  1. Create a .env file in the project root with:
TELEGRAM_TOKEN=your_token_here
  1. Install dependencies:
npm install
  1. Run the bot in development mode:
npm run bot
  1. Or run the bot in production mode:
npm start

Commands

  • /start — show the welcome image and start the bot
  • /help — show supported commands
  • /pomodoro <session name> — start a 25-minute Pomodoro session
  • /pomodoro status — show current session or break status
  • /pomodoro clear — cancel the current Pomodoro session
  • /break — begin a break early
  • /stop or /cancel — stop the current session

About

A Telegram bot that helps you excel on your daily tasks through Node NLP.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages