README.md 5.5 KB

✨ WilliamButcherBot ✨

Telegram Group Manager Bot + Userbot Written In Python Using Pyrogram.

技师咨询与评价

当前版本要求 Python 3.12,产品主流程是:浏览技师与服务信息 → Telegram 私聊 咨询 → 顾客直接评价 → 管理员审核 → 自动发布到技师公开评价话题并参与排行。 平台不处理预约、支付、退款或精确服务地址。

技师服务默认通过 Telegram Mini App 快速创建,入口地址由 SERVICE_TECHNICIAN_MINI_APP_URL 配置。自助接口会校验 Telegram initData 签名并绑定当前技师,不能通过请求参数修改其他技师资料。系统首次启动时会幂等 内置快速到店、快速上门和按小时服务模板;管理员可以继续编辑、停用或归档, 后续启动不会覆盖管理员修改。技师只需确认服务价格、内容、时长、额外费用说明 和公开区域;具体地址由双方私聊。

公开评价使用一个开启“话题”的公开超级群。将 Bot 设为管理员并授予管理话题 权限,然后在后台填写群 Chat ID 和公开用户名;系统会为每位技师自动创建独立 话题,并在评价审核通过后立即发布。

  • /find_technician:浏览技师、服务和公开评价。
  • /technician_profile:技师通过 Mini App 快速发布服务。
  • /review_teacher:顾客选择技师后直接评价,无需服务单或完成确认。
  • /technician_top:从第一条审核评价开始展示排行。

旧 /teacher_*、/my_services 和 /review_qr 命令继续作为兼容入口。

made-with-python built-with-love
LICENSE Contributors Repository Size
Python Version Issues Forks Stars

Ready to use method

A Support Group and ready-to-use running instance of this bot can be found on Telegram
WilliamButcherBot | WbbSupport

⇝ Requirements ⇜

Python3.9 | Telegram API Key | Telegram Bot Token | MongoDB URI

⇝ Install Locally Or On A VPS ⇜

thehamkercat@arch:~$ git clone https://github.com/thehamkercat/WilliamButcherBot
thehamkercat@arch:~$ cd WilliamButcherBot
thehamkercat@arch:~$ pip3 install -U -r requirements.txt
thehamkercat@arch:~$ cp sample_config.py config.py

Edit config.py with your own values

⇝ Run Directly ⇜

thehamkercat@arch:~$ python3 -m wbb

Generating Pyrogram Session For Heroku

thehamkercat@arch:~$ git clone https://github.com/thehamkercat/WilliamButcherBot
thehamkercat@arch:~$ cd WilliamButcherBot
thehamkercat@arch:~$ pip3 install pyrogram TgCrypto
thehamkercat@arch:~$ python3 str_gen.py

⇝ Docker ⇜

thehamkercat@arch:~$ git clone https://github.com/thehamkercat/WilliamButcherBot
thehamkercat@arch:~$ cd WilliamButcherBot
thehamkercat@arch:~$ cp sample_config.env config.env

Edit config.env with your own values

thehamkercat@arch:~$ sudo docker build . -t wbb
thehamkercat@arch:~$ sudo docker run wbb

⇝ Write new modules ⇜

# Add license text here, get it from below

from wbb import app # This is bot's client
from wbb import app2 # userbot client, import it if module is related to userbot
from pyrogram import filters # pyrogram filters
...


# For /help menu
__MODULE__ = "Module Name"
__HELP__ = "Module help message"


@app.on_message(filters.command("start"))
async def some_function(_, message):
    await message.reply_text("I'm already up!!")

# Many useful functions are in, wbb/utils/, wbb, and wbb/core/

And put that file in wbb/modules/, restart and test your bot.

Discover more awesome plugin add-ons for this repo @WilliamButcherBot-Add-ons.