Skip to content
usithadevPublic

About

A simple telegram bot I made to learn (demonstrated CRUD of) mongodb. This is my hello world to mongodb. See README.md for more info.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Telegram bot for Creating, Reading, Updating and Deleting username and email

This is a simple telegram bot that is used to create, read, update and delete usernames and emails. (ie. MongoDB CRUD)

Developer manual

Environmental variables to setup:

  • BOT_TOKEN : The bot token got from the https://t.me/botfather (@BotFather)
  • DB_URI : The URI of the MongoDB database server (include the database name also). (eg: mongodb://localhost:27017/testdb)

Installation

$ npm install

Or

$ npm install -D typescript @types/node
$ npm install --save dotenv grammy mongoose

Build and run commands:

$ npm start

Or:

$ npx tsc
$ node index.js

User manual

Commands:

  • /start - Start the bot
  • /save username email@example.com - Save a record
  • /delete email@example.com - Delete a record by the email
  • /getall - See all data in the database
  • /changeemail exisiting@email.com new@email.com - Update an email by email
  • /changename email@example.com new_name - Update name by name

More info

Developed by Usitha Indeewara. (Under GNU GPL v3)

Copyright (C) 2023  Usitha Indeewara

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

About

A simple telegram bot I made to learn (demonstrated CRUD of) mongodb. This is my hello world to mongodb. See README.md for more info.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages