Giter Site home page Giter Site logo

office-user-bot's Introduction

🍼 office-user-bot

forthebadge

🐙 用 Telegram bot 创建 Office 账号

🥼 环境

python 3.6+

💢 用法

1. 在 @botfather 新建 bot

2. 下载项目

git clone https://github.com/zayabighead/office-user-bot.git
cd office-user-bot
pip install -r requirements.txt

3. 同目录下新建 config.json 并如下编辑

{
  "bot": {
    "admin": bot 管理员,填 tg 的用户 id,
    "notify": true / false 是否接受新建账号时的推送,
    "token": "bot 的 token,从 botfather 获取"
  },
  "aad": {
    "clientId": "aad app 的 client id",
    "clientSecret": "aad app 的 client secret",
    "tenantId": "aad app 的 tenant id"
  },
  "office": {
    "subscriptions": [
      {
        "name": "订阅显示名称",
        "sku": "订阅 id"
      }
    ],
    "domains": [
      {
        "display": "@******.org 仅供显示域名",
        "value": "@abcde.org 实际域名"
      }
    ]
  },
  "banned": {
    "tgId": [要拉黑的 tg 用户的 id],
    "officeUsername": [
      "admin",
      "用户名黑名单"
    ]
  }
}

4. 运行

python bot.py

输入任意消息 bot 即会回复

生成的激活码保存在同目录下的 codes.json

office-user-bot's People

Contributors

realbyg 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.