leobot

Simple Telegram Logging Bot
git clone git://bsandro.tech/leobot
Log | Files | Refs | README | LICENSE

README (1223B)


      1 What is this
      2 ------------
      3 
      4 Simple bot that logs messages from public/private channels it have been added to.
      5 
      6 How to set up
      7 -------------
      8 
      9 There is a special Telegram bot named @BotFather - send it a message '/newbot' (without quotes) and follow provided instructions. BotFather will grant you a token - put it inside the 'config.ini' so the file looks like this:
     10 
     11 token = 123123:bunchofletters
     12 
     13 Then you have to permit your bot to access messages in public channels - again send @BotFather a message '/setprivacy' (without quotes) and choose "Disable" option after a selector appears.
     14 
     15 After that bot can be added to public channels.
     16 
     17 How to run
     18 ----------
     19 
     20 After setting it all up just run the executable ('leobot' or 'leobot.exe').
     21 
     22 Logfiles location
     23 -----------------
     24 
     25 Logs are being written into the "logs" folder placed in the same directory where your bot executable is. Folder structure is "channel/year/month/day/log.txt"
     26 
     27 Building from source
     28 --------------------
     29 
     30 This is a primitive Go project, min. golang version is 1.18
     31 External dependencies are bundled inside of the 'vendor' directory (go-ini and go-telegram-bot-api).
     32 
     33 Simply run 'go build' in the root directory to build.
     34 
     35 License
     36 -------
     37 
     38 BSD 2-clause.