Skip to content

Personal-Projects-236/telegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Telegram Bot


Description

  • This project was started to communicate with telegram based on what photos you send to it
  • You take pictures of the kilometers of your vehicle, followed by the caption saying how many kilometers was done
  • Once photo is sent on Telegram it runs some logic then sends a response back

Tech Stack

  • JavaScript
  • Express
  • MongoDB (for database, at time of testing this was only done locally)
  • Github (for version control)
  • yarn (this is my package manager instead of npm)
  • Mongoose (for communicating with my db)
  • Intellij IDE
  • Heroku (this is still to come)
  • Webhooks (this will come once deployed on Heroku)

Project structure that was used

  • server.js - this is the main entry point into the project
  • src - this is where all directories and files will sit stands for source
  • controllers - this is for the main function sit here sending data to other helper functions
  • services - this is where all helper functions sit for the controllers
  • lib - this is used for all important files like a file that handles environment variables
  • models - all schemas sit here
  • public - all other content that I don't have a directory for like screenshots
  • utils - this is used for all files that i use often like getting data from a db

Screenshot of the bot in action

Just a simple response with a message

bot_response

If this is the first entry to the bot

first_entry

If you don't attach a caption to photo

no_caption

If the caption is lower than previously captioned

lower_caption

If the caption is higher than previously captioned

higher_caption


Screenshot of when servicing is due

If no service is Due

if_not_service

If a service is due it will send you a reminder

if_service_due

The service works at a range of 300 below and 300 above the next service


Emoji

If all data is correctly received and stored it sends a smiley face emoji to Telegram

emoji


What will be the next step for this project?

  • This project needs to be made live on Heroku
  • Once live setup Webhooks
  • Test it with taken photos of vehicle KM (this can only be done when I obtain a vehicle)
  • If the step above can be completed, then test to see if numbers can be grabbed from photos

NOTE: This is not based on KM taken from bike, as of when this was done I didn't have a vehicle to test it with

About

This is a bot to communicate with telegram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published