Git Product home page Git Product logo

chatbot's Introduction

IMPORTANT

Since the API has been discontinued, this will no longer work.

About

A fun telegram userbot written in python3 using Intellivoid's Coffeehouse API. Written by this person!

Installation

Open up your terminal and run these commands.

git clone https://github.com/rsktg/Chatbot.git

cd Chatbot

pip install -r requirements.txt

• Now make a copy of sample_config.ini and rename it to config.ini and enter your api_id and api_hash. These can be obtained from here.

Non-Heroku users

Edit NAME in generate_session.py

python3 generate_session.py

Heroku users

python3 string_session.py

You'll be asked to enter your phone number and 2FA password (if any). Copy and save the string session you get in the end.

Two possible ways of going forward

You can either use environment variables or edit the config.ini file further.

If you're going to use environment variables, then add a variable named ENV and set the value to anything you want. Now you can use environment variables.

Add the following ones as well.

SESSION_NAME: If you ran generate_session.py, the name of the session you created.

STRING_SESSION: The string session (Only for Heroku users).

CF_API_KEY: You can get this API key from here

DATABASE_URL: The URL of your SQL database. It should look something like this - sqldbtype://username:pw@hostname:port/db_name. PostgreSQL is recommended.

NAME: Your bot will reply to the AI-enabled users everytime this name is said.

However, if you're gonna use config.ini, go ahead and set the values given above with the exception of ENV.

Running the bot

After setting the required environment variables/editing the config.ini file, run python3 -m chatbot.

Congrats, your bot should now be up!

Credits

Intellivoid for providing the API used for this project.

pyrogram - the library used for this project.

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.