Skip to content

This is a telegram bot coded in ruby programming language

Notifications You must be signed in to change notification settings

menyagah/Telegram_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues License: MIT LinkedIn


Logo

Telegram Bot

A telegram bot that sells phones to users.
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

image

This is a telegram bot that serves as a sales bot. The bot displays a range of items available on a fictional shop with their prices. The user can then pick the item they are interested in and the bot can then go ahead and send a notification to its owner with a link to the buyer for him to finalise the purchase.

Built With

  • Ruby
  • Telegram Bot Api

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Ruby for linux users:
    $ sudo apt-get install ruby-full

Installation

  1. Clone the repo

    git clone https://github.com/menyagah/Telegram_Bot.git
  2. Telegram Bot Father

    Having installed ruby, we also need to have a telegram account in order to obtain our A.P.I token code and also create the channel for our new bot. To do this we need the help of the bot father. So, search for BotFather on your telegram app. Tap on the channel and type /start. After that we only need to create a new bot so type /newbot and follow the instructions of the bot father. Copy the token given by bot father and paste it in the bot.rb file on the token variable.

  3. Set-up Chat Id

    • Search for (Telegram Bot Raw) on your telegram app
    • Type /start on the channel
    • Copy your id from the json output.
      • It is labelled as "id" : xxxxxx
  4. Install dependencies

    run bundle install
  5. Start local server

    cd Telegram_bot/main

    then

    ruby main.rb

Usage

image

  1. Open your telegram app. Navigate to BotFather and click on the link provided to your bot.
  2. Use the following commands to interact with the app
    • /start - to start the bot
    • Phones - to view the phones on sale
    • Iphone {5/6/8/10/11/12} - to purchase the phone of your choice
    • Yes {5/6/8/10/11/12} - to purchase a particular phone
    • Agent - to send a notification to the customer care agents

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Martin Nyagah - @Martinnyaga20 - [email protected]

Acknowledgements

About

This is a telegram bot coded in ruby programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages