Giter Site home page Giter Site logo

amirulandalib / forcehub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jainamoswal/forcehub

0.0 0.0 0.0 21 KB

A Telegram bot to force the user to follow GitHub Profile.

Home Page: https://github.com/jainamoswal

License: GNU General Public License v3.0

Python 100.00%

forcehub's Introduction

Issues Forks Stars LICENSE Size Contributors


Support

  • Channel
  • Support

ForceHub

A Telegram bot, to force a user to follow your GitHub account before chatting.

This bot will mute the user if not followed. It works with Telegram Auth and GitHub oAuth.


Steps :~

  • Add following variables to the envirenment variables.

    • API_HASH ~ Get it from my.telegram.org

    • APP_ID ~ Get it from my.telegram.org

    • APP_DOMAIN ~ Your application domain name. eg. https://jainam.me.

    • BOT_TOKEN ~ Get it from @BotFather.

    • GITHUB_USERNAME ~ Your GitHub username, which you want users to force-follow.

    • MONGO_URL ~ MongoDb URL, to save user's github usernames after login via GitHub oAuth2.

    • FLASK_SECRET_KEY ~ Make it random value, It will be used to access session cookie while Telegram and GitHub linking.

    • GITHUB_OAUTH_CLIENT_ID ~ Your GitHub oAuth credential. Get it from here.

      Assuming github-app.herokuapp.com as my App's endpoint.

      Add App URL in GitHub app settings. eg. https://github-app.herokuapp.com/

      Add App URL and a callback route to it. eg. https://github-app.herokuapp.com/login/github/authorize

    • GITHUB_OAUTH_CLIENT_SECRET ~ Your GitHub oAuth credential. Get it from here.

    • PORT ~ Leave it blank, as Heroku will assign it.

  • Set the same APP_DOMAIN in Bot settings.-


Deployments :-

Heroku


Deploy

Zeet


Deploy

Locally
1. Clone it to your local machine.

2. Add environment variables or remove them and use as normal varibales via setting them in config.py

3. Run both the files app.py & ForceHub via python app.py and python -m ForceHub respectively.
Any other Platform.
1. Clone this repo or fork it.

2. Set the variables as envirenment variables or in config.py.

3. Publish it.

Next pro tip :

Use Freenom for a cool free domain.

Many times, Freenom has many server issues, So you will need to retry after some time.

License

License

The GNU General Public License (GNU GPL or simply GPL) is a series of widely-used free software licenses that guarantee end users the freedom to run, study, share, and modify the software.[8] The licenses were originally written by Richard Stallman, founder of the Free Software Foundation (FSF), for the GNU Project, and grant the recipients of a computer program the rights of the Free Software Definition.[9] The GPL series are all copyleft licenses, which means that any derivative work must be distributed under the same or equivalent license terms. This is in distinction to permissive software licenses, of which the BSD licenses and the MIT License are widely used, less restrictive examples. GPL was the first copyleft license for general use.

forcehub's People

Contributors

jainamoswal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.