Coder Social home page Coder Social logo

zerotiertelegrambot's Introduction

ZeroTierTelegramBot

ZeroTierTelegramBot is a telegram bot which helps you manage your ZeroTier Network, runs on Python 3+. The API requests base on ZeroTier Central API v1.

Bot Features

  • Show networks info
  • Show network members info
  • Set member name (Admin only)
  • Authorize new member (Admin only)
  • Unauthorize member (Admin only)
  • Delete member (Admin only)
  • Set sub admin (Invite your friends to group chat, set as admin and manage the network with you)

Getting Started

  1. Create your own ZeroTier Web API Token:

    Create an API Access Token at: https://my.zerotier.com/account

  2. Create your own Telegram Bot:

    Create a telegram bot by sending commands to @BotFather, feel free to send the commands descriptions below to @BotFather:

    help - Show commands list.
    show_network - Show your zerotier networks.
    set_member_name - Set your member's name by using this command.
    auth_member - Authorize a member.
    unauth_member - Unauthorize a member.
    delete_member - Delete a member.
    

    When creating a bot, you need to specify:

    • /setjoingroups -- enable
    • /setprivacy -- disable
  3. Clone repository:

    $ git clone https://github.com/koonchung/ZeroTierTelegramBot.git
    
  4. Install requirements:

    $ pip3 install -r requirements.txt
    
  5. Edit config.yaml

    # Fill with your telegram bot token
    # Create your bot by sending commands to @BotFather in Telegram
    bot_token: "your_bot_token"
    
    # Fill with your zerotier token
    # Get your own API Access Token at: https://my.zerotier.com/account
    zerotier_token: "your_zerotier_web_api_token"
    
    # Fill with telegram id which you want to set as admin
    admin_id:
       - your_telegram_id
    
    # Fill with refresh seconds, used to check new members
    refresh_seconds: 60
  6. Run Bot

    $ cd ZeroTierTelegramBot
    $ python3 zerotiertelegrambot
    

    Invite your bot to a group chat, send /start@your_bot in group chat, and you can start to manage your ZeroTier Networks.

Screenshots

  1. start&help

    start&help

  2. show_network

    show_network

  3. network_info

    network_info

  4. accept&setname

    accept&setname

  5. auth&setname

    auth&setname

  6. new_member

    new_member

zerotiertelegrambot's People

Contributors

cgcel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zerotiertelegrambot's Issues

Description addition.

When creating a bot, you need to specify:

/setjoingroups
enable

/setprivacy
disable

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.