Ver Fonte

startup message

thehamkercat há 5 anos atrás
pai
commit
2e98b73250
1 ficheiros alterados com 4 adições e 0 exclusões
  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!")