Skip to content
Telegram bot which fetches GitHub Profiles.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
.travis.yml
Pipfile
Pipfile.lock
README.md
conftest.py
deploy.sh
handler.py
package-lock.json
package.json
requirements.txt
serverless.yml

README.md

git-profiler-bot

This is a Telegram bot which fetches Profile summary using GitHub API. Ported to serverless as part of #noserverNovember

How to use 🤔

Usage

What do I need 🤔

  • A AWS key configured locally, see here.
  • NodeJS.
  • A Telegram account.

Installing

# Install the Serverless Framework
$ npm install serverless -g

# Install the necessary plugins
$ npm install

# Get a bot from Telegram, sending this message to @BotFather
Go to https://t.me/BotFather
$ /newbot

# Put the token received into a file called serverless.env.yml, like this
$ cat >serverless.env.yml
TELEGRAM_TOKEN: <your_token>

# Change app and tenant to your ones
$ nano serverless.yml
app: <your-app>
tenant: <username>

# Export you AWS Keys to your shell

- Get some help from [here](https://serverless.com/framework/docs/providers/aws/guide/credentials/)

# Deploy it!
$ serverless deploy

# With the URL returned in the output, configure the Webhook
$ curl -X POST https://<your_url>.amazonaws.com/dev/set_webhook

Testing

# Create a virtual python env
$ python3 -m venv pytest-env

# Activate the virtual env
$ source pytest-env/bin/activate

# Install following modules
$ pip3 install -r requirements.txt

# Run tests
$ pytest

Contributing

Feel free to raise issues and send PRs. 😄


Made with ❤️ by Aashutosh Rathi

You can’t perform that action at this time.