A telegram bot that sells phones to users.
Explore the docs »
Report Bug
·
Request Feature
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.
- Ruby
- Telegram Bot Api
To get a local copy up and running follow these simple steps.
- Ruby
for linux users:
$ sudo apt-get install ruby-full
-
Clone the repo
git clone https://github.com/menyagah/Telegram_Bot.git
-
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.
-
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
-
Install dependencies
run bundle install
-
Start local server
cd Telegram_bot/main
then
ruby main.rb
- Open your telegram app. Navigate to BotFather and click on the link provided to your bot.
- Use the following commands to interact with the app
/start
- to start the botPhones
- to view the phones on saleIphone {5/6/8/10/11/12}
- to purchase the phone of your choiceYes {5/6/8/10/11/12}
- to purchase a particular phoneAgent
- to send a notification to the customer care agents
See the open issues for a list of proposed features (and known issues).
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Martin Nyagah - @Martinnyaga20 - [email protected]
- TelegramBotAPI
- README Icon made by Freepik from www.flaticon.com