Giter VIP home page Giter VIP logo

mastogram's Introduction

What exactly does this project do?

This script was written to connect a telegram bot to a Mastodon account. In this bot, you must enter the login information of your Mastodon account.

(But now there is only the ability to receive notifications and send toots. Other features will be added ASAP.)

You must run this script on a personal server or host with the Telegram bot that you defined.

Requirements

  • Mastodon.py
  • python-telegram-bot

How to run

  • pip install -r requirements.txt
  • Enter Your informations to "config.py"

Get your Telegram chat ID

Paste the following link in your browser. Replace "API-access-token" with the API access token:

https://api.telegram.org/botAPI-access-token/getUpdates?offset=0

Send a message to your bot in the Telegram application. The message text can be anything. Your chat history must include at least one message to get your chat ID. Refresh your browser. Identify the numerical chat ID by finding the id inside the chat JSON object.

In the example below, the chat ID is 123456789..

{  
   "ok":true,
   "result":[  
      {  
         "update_id":XXXXXXXXX,
         "message":{  
            "message_id":2,
            "from":{  
               "id":123456789,
               "first_name":"Mushroom",
               "last_name":"Kap"
            },
            "chat":{  
               "id":123456789,
               "first_name":"Mushroom",
               "last_name":"Kap",
               "type":"private"
            },
            "date":1487183963,
            "text":"hi"
         }
      }
   ]
}

mastogram's People

Contributors

hosseinhimself avatar

Stargazers

Tuan Duc Tran avatar Roman avatar __mr__ avatar The Hapax avatar

Watchers

 avatar

Forkers

thehapax

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.