This is my ruby capstone project where I created a telegram bot. As a remote developer, I realized that I waste a lot of time trying to figure out my daily meals. because of this, I find it helpful to have a bot that can suggest meals, for example, breakfast, lunch, and dinner. I named my boat meealsbot
- There boat will remind you which day of the week it is
- The boat suggest for your meals for the day
The development environment uses Ruby
, hence install ruby before proceeding.
-
Mac OS -
brew install ruby
-
Linux -
sudo apt-get install ruby-full
-
windows - Download RubyInstaller here, run it, and you are done!
-
Clone the project - git clone
https://github.com/oloomoses/telegram-bot.git
-
Run
bundle
to get all the gems -
create a
.env
file -
Download and install telegram -
https://desktop.telegram.org/
-
Create a Telegram Bot using this link -
https://www.siteguarding.com/en/how-to-get-telegram-bot-api-token
-
Add the token from the new created bot to the
.env
- TG_API_KEY=
token_from_Botfather
- TG_API_KEY=
-
On your terminal type
cd telegram-bot
to get into the project folder -
Run
ruby bin/main.rb
to start the bot
-
/start
==> Displays the day and list to select from -
/meals
==> Displays suggested meals -
/meetings
==> Informs you if you have a meeting or not -
/stop
==> Displays a goodye message
The tests have been implemented using RSpec
To run: Type
rspec
on your Terminal to get a report
The Bot has been tested using two methodoligies
-
Unit testing ==> Create a test for the bot application itself
-
Simulation testing ==> Running the bot on telegram and evaluating the output
This project was developed using:
-
telegram_bot ==> Ruby gem that does most of the heavy lifting
-
dotenv ==> Enable us to load enviroment variables
-
rspec ==> For unit testing
👨 Oloo Moses
-
Twitter: https://twitter.com/olooine
-
Github: https://github.com/oloomoses