This telegram bot can be initialized on the command line(windows) / terminal(mac & linux) where it responds to specific commands -
/start
and/stop
.
You can find the bot on telegram with the name "@QuizMeBot"
This is a telegram bot built as a capstone project for Microverse's Ruby module.
- Preface
- Purpose
- Features
- Presentations
- Built With
- Quick Start
- Dependencies
- Testing
- Author
- Acknowledgment
- Contributing
- The bot currently lets a user play a quiz on General knowledge category with different difficult levels.
start
end
- Ruby 2.6.5
- VS Code
- Telegram Bot API
- REST API from https://opentdb.com/api_config.php recieve the quizes
- Get a local copy with:
git clone https://github.com/sinework/telegram-bot-with-ruby.git
Or download it as a Zip File.
-
Install Ruby in your system. To install Ruby, you can read the Documentation
-
Navigate to your telegram account if you have one. Or create new telegram account.
-
Create a new bot with the help of BotFather. Use this documentation if you are facing challenges New Bot.
-
Obtain your new bot's token.
-
Go to the Bot class and assign your token to
TOKEN
variable.
If you are on windows:
*- Go inside the project folder
*- Open prompt here (Option)
ruby bin/main.rb
-
On your telegram account search for your bot's name
-
Then press the /START button begin interacting.
- rspec
- telegram_bot
Install Rspec gem in your system. To do this:
Open Command Prompt or Terminal and run:
gem install Rspec
Navigate into the project folder and run the following command in the console:
rspec
👤 Sinework Amare Shiferaw
I would like to show my appreciation to https://opentdb.com/api_config.php for the free quiz API they made available for developers
Contributions, issues and feature requests are welcome! Feel free to check the issues page.