This is a Ruby based Telegram bot that gives inspiring messages on request from the user with notifications and reminders to document their thoughts. It is a church bot that was built to aid church members to remember the word of God. This will remind them daily of their faith and testimonies to keep them going. I hope to make it permanently running for use.
-
This bot provides an inspiring word to the user on request.
-
The user can choose to write/create their thoughts, view or delete them.
-
It gives scheduled reminders every 12 hours which is twice daily. The three reminders are:
- An inspiring word
- A reminder to document a testimony.
- A reminder of their testimony entry at random.
-
Visit The GLA Buddy on Telegram.
-
Send the '/help' message to the bot for a list of functional details. Here is a list of available commands:
- /start - to enable notifications
- /stop - to stop notifications
- /write - to make an entry
- /view - to view all your entries
- /delete - to delete an entry
- /cancel - to cancel writing or deleting
- /word - to receive an inspiring word
You can see it working here
There are two parts that run: - the main.rb waits for the commands from the user and replies. - the timed.rb sends reminders to the user that has accepted to receive them.
There is a basic database manager module that gives the classes control over the text files which make up the database folder.
There are 3 classes: - The SaveMessage class contains the methods to save thought entries from the user. It controls the view feature that allows the user to view their entries and delete them. A new text file is created to save each user's data upon new entry. - The StateManager class alerts the bot on what each user would like to do. It creates a file upon selection of any option. - The UserPrompts class contains all the replies that the bot will send to the user which are: the /start, /stop, /write, /view, /delete, /cancel, /help and /word.
- Ruby
- Rspec(code testing)
- Rubocop(code linting)
To get a local copy up and running follow these steps:
- Ruby installed on local machine
- Forking the project
- Cloning the project to your local machine
cd
into the project directory- Install the gems in the Gemfile by using the
bundle install
in the root folder terminal - After installing the gems, get your api key from Telegram's BotFather from the Telegram API docs and create a .env file in your root folder and on the first line place:
API_KEY= 'YOUR-TELEGRAM-API-KEY'
- Fork/Clone this project to your local machine.
- Unit tests were built in Rspec, test using
rspec
in root directory of the project.
👤 Glory David
- LinkedIn: Glorydavid
- GitHub: @glowreeyah
- E-mail: glodave99@gmail.com
- Twitter: @gloweeeyah
Contributions, issues and feature requests are welcome! Start by:
* Forking the project
* Cloning the project to your local machine
* cd
into the project directory
* Run git checkout -b your-branch-name
* Make your contributions
* Push your branch up to your forked repository
* Open a Pull Request with a detailed description to the development branch of the original project for a review
Give a ⭐️ if you like this project!
- Ruby Docs
The project is licensed under MIT.