This is a Telegram bot using NodeJS and Firebase. It's running on the Heroku. Username: @AttendanceListBot
- Create your own bot. How do you create a bot?
- Grab your TOKEN.
- Create your Firebase. How do you create a firebase?
- Set project name and country/region.
- Access "Permissions" in Settings.
- In "Service Accounts" create an account.
- Set Service Account name as Editor.
- Choose option to provide a new private key. (Download JSON file).
- Replace YOUR-SECURITY-PRIVATE-KEY.json file.
- Update your firebase credentials in the FirebaseManager.js file, line 6.
- That's it.
- Create the Heroku account and install the Heroku Toolbelt.
- Login to your Heroku account using
heroku login
. - Go to the app's folder using
cd ~/attendance-list-bot
- Run
heroku create [name-is-optional]
to prepare the Heroku environment.
Before you deploy the heroku, you must setting the files with your data.
NODE_ENV=development TOKEN=PUT-YOUR-TELEGRAM-TOKEN
Line 10: Set your heroku app URL: bot.setWebHook('YOUR-APP-URL' + bot.token);
##Deploy your bot to the Heroku
- Run
heroku config:set TOKEN=SET HERE THE TOKEN YOU'VE GOT FROM THE BOTFATHER
. - Run
git add -A && git commit -m "Ready to run on heroku" && git push heroku master
to deploy your bot to the Heroku server. - Test your bot.
Test