浏览代码

startup message

thehamkercat 5 年之前
父节点
当前提交
2e98b73250
共有 1 个文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      wbb/utils/botinfo.py

+ 4 - 0
wbb/utils/botinfo.py

@@ -1,3 +1,4 @@
+from wbb import LOG_GROUP_ID
 BOT_ID = 0
 BOT_NAME = ""
 BOT_USERNAME = ""
@@ -8,9 +9,12 @@ async def get_info(app):
     global BOT_ID, BOT_NAME, BOT_USERNAME, BOT_DC_ID
     getme = await app.get_me()
     BOT_ID = getme.id
+    
     if getme.last_name:
         BOT_NAME = getme.first_name + " " + getme.last_name
     else:
         BOT_NAME = getme.first_name
     BOT_USERNAME = getme.username
     BOT_DC_ID = getme.dc_id
+    try:
+        await app.send_message(LOG_GROUP_ID, text=f"{BOT_NAME} Started!")