In this project, I built a telegram bot that can be initialized from the command line. It is a relatively simple bot that displays text messages based on the commands entered by the user.
- It can interact with the user when the user enters "/hey" or "/how_ya" commands
- It displays a random joke with your name in it
- It can also display a random motivational quote
/help
/hey
/how_ya
/init
/bye
/rdm_quote
/rdm_joke
- Ruby
- Telegram Bot API
- Type fit Quotes API
- Chuck Norris Jokes API
- A desktop or laptop computer
- Ruby. Installing Ruby
- A telegram account
- A telegram Chat bot API (the long number given when you create a new bot)
-
Get a local copy of this repo Open a terminal and run:
git clone git@github.com:felix-vondee/telegram_bot.git
-
Navigate to your telegram account if you have one. Or create new telegram account.
-
Create a new bot with the help of BotFather
-
Obtain your new bot's token.
-
Create .env file in the root directory.
-
Insert the folowing snippet inside your .env file:
TELEGRAM_API = Paste your ChatBot API Here
-
Open a terminal and run
bundle install
-
After successful installation, run the command
ruby bin/main.rb
-
On your telegram account search for your bot's name
-
Then use the commands above to begin interacting with the bot
- telegram-bot-ruby
- dotenv
- httparty
-
Install Rspec on your system
-
Open Command Prompt or Terminal and run:
gem install Rspec
-
Navigate into the project folder and run the following command in the console:
rspec
👤 Felix Vondee
- Github: @felix-vondee
- Twitter: @felix_vondee
- Linkedin: Felix Vondee
Contributions, issues and feature requests are welcome! Feel free to check out the issues page.
Drop a ⭐️ if you like this project!