Coder Social home page Coder Social logo

remind-me's Introduction

Remind Me

A Netlify function for sending reminders in telegram

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development purposes.

Requirements

To install and run this project you need:

Installation

To set up everything in your local machine, you need to follow these steps:

  1. Clone this repo and then change the directory to the remind-me folder:
git clone https://github.com/kaushalmeena/remind-me.git
cd remind-me
  1. Install project dependencies using npm:
npm install
  1. Create a .env file from .env.example
cp .env.example .env
  1. Get a Telegram bot token

    • Open Telegram: If you don't have the Telegram app, download it from your app store and create an account if you don't have one already.
    • Start a Chat with BotFather:
      • Open Telegram and search for "BotFather" or use this link to start a chat: BotFather on Telegram.
      • Click on the BotFather profile, and then click "Start" to initiate a conversation.
    • Create a New Bot:
      • Send the command /newbot to the BotFather.
      • You will be prompted to choose a name for your bot. Choose a unique name for your bot.
      • After that, you'll need to choose a username for your bot. This username must end with the word "bot" and be unique.
    • Receive Your Token:
      • Once you've successfully chosen a name and username, the BotFather will provide you with a bot token.
      • The token will look something like this: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefg.
    • Save Your Token: Set TELEGRAM_BOT_TOKEN in .env file with generated token
  2. Get a Telegram chat ID

    • Start a Chat with Your Bot:
      • Make sure your bot is a member of the chat you want to obtain the chat ID from.
      • Start a conversation with your bot in the chat. You can simply send a "hello" or any other message to your bot.
    • Use the Telegram API:
      • You can use the Telegram API to retrieve the chat ID. You'll need to make a request to the getUpdates method of the Telegram Bot API.
      • In browsers's address bar paste this URL https://api.telegram.org/bot{BOT_TOKEN}/getUpdates after replacing {BOT_TOKEN} with your token
      • The chat ID can be found in the id field of the chat object of response,
    • Save your Chat ID: Set TELEGRAM_CHAT_ID in .env file with received chat id
  3. Login to your Netlify account, and follow the instructions

npx netlify login
  1. Set Netlify environment variables
npx netlify env:import .env

Usage

  1. Create an events.json file in the root of the remind-me folder and add events in it in this format:
[
  {
    "name": "<EVENT_NAME>",
    "date": "<EVENT_DATE_IN_ISO_FORMAT>"
  }
  ...
]

or can use this tool for creating events file.

  1. Deploy project
npm run deploy

License

This project is licensed under the MIT License - see the LICENSE file for details.

remind-me's People

Contributors

kaushalmeena avatar

Watchers

 avatar

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.