Skip to content

Commit

Permalink
[•]
Browse files Browse the repository at this point in the history
  • Loading branch information
AyiinXd committed Sep 1, 2023
1 parent 51bd480 commit 2de43f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 37 deletions.
32 changes: 0 additions & 32 deletions AyiinXd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,38 +115,6 @@ def STORAGE(n):
gc = str(b64decode("QEF5aWluQ2hhdHM="))[2:13]


async def bot_on():
from AyiinXd.ayiin._hosting import where_hosted

if bot:
A_user = await Ayiin.get_me()
B_user = await bot.get_me()
if var.BOTLOG_CHATID != 0:
await bot.send_message(
var.BOTLOG_CHATID,
message=f'''
❏ ᴀʏɪɪɴ - ᴜsᴇʀʙᴏᴛ ʙᴇʀʜᴀsɪʟ ᴅɪᴀᴋᴛɪғᴋᴀɴ
╭╼┅━━━━━╍━━━━━┅╾
├▹ ᴀʏɪɪɴ ᴠᴇʀsɪᴏɴ : {var.BOT_VER} •[{where_hosted()}]•
├▹ ᴜsᴇʀʙᴏᴛ ɪᴅ : {A_user.id}
├▹ ᴜsᴇʀʙᴏᴛ ɴᴀᴍᴇ : {A_user.first_name}
├▹ ᴀssɪsᴛᴀɴᴛ ɪᴅ : {B_user.id}
├▹ ᴀssɪsᴛᴀɴᴛ ɴᴀᴍᴇ : {B_user.first_name}
╰╼┅━━━━━╍━━━━━┅╾
''',
link_preview=False,
buttons=[
[
Button.url("•• ᴄʜᴀɴɴᴇʟ", url="https://t.me/AyiinChannel"),
Button.url("ɢʀᴏᴜᴘ ••", url="https://t.me/AyiinChats"),
],
[
Button.url("•• ʀᴇᴘᴏ ••", url="https://github.com/AyiinXd/Ayiin-Userbot"),
]
],
)


async def update_restart_msg(chat_id, msg_id):
from config import var

Expand Down
23 changes: 18 additions & 5 deletions AyiinXd/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,32 @@
#
""" Userbot start point """


import sys

from importlib import import_module
from platform import python_version
from traceback import format_exc

from telethon import version
from telethon.tl.alltlobjects import LAYER

from AyiinXd import Ayiin, LOGS, LOOP, bot, bot_on
from AyiinXd.ayiin import autobot, autopilot, checking, heroku
from AyiinXd import Ayiin, LOGS, LOOP, bot
from AyiinXd.ayiin import HOSTED_ON, autobot, autopilot, checking, heroku
from AyiinXd.modules import ALL_MODULES


ON = '''
❏ ᴀʏɪɪɴ - ᴜsᴇʀʙᴏᴛ ʙᴇʀʜᴀsɪʟ ᴅɪᴀᴋᴛɪғᴋᴀɴ
╭╼┅━━━━━╍━━━━━┅╾
├▹ ᴀʏɪɪɴ ᴠᴇʀsɪᴏɴ : {} •[{}]•
├▹ ᴜsᴇʀʙᴏᴛ ɪᴅ : {}
├▹ ᴜsᴇʀʙᴏᴛ ɴᴀᴍᴇ : {}
├▹ ᴀssɪsᴛᴀɴᴛ ɪᴅ : {}
├▹ ᴀssɪsᴛᴀɴᴛ ɴᴀᴍᴇ : {}
╰╼┅━━━━━╍━━━━━┅╾
'''


async def AyiinMain():
from config import var

Expand All @@ -35,14 +47,15 @@ async def AyiinMain():
try:
for module_name in ALL_MODULES:
imported_module = import_module(f"AyiinXd.modules.{module_name}")
await bot.start()
LOGS.info(f"Python Version - {python_version()}")
LOGS.info(f"Telethon Version - {version.__version__} [Layer: {LAYER}]")
LOGS.info(f"Userbot Version - {var.BOT_VER}")
LOGS.info(f"Ayiin Version - 4.0.0")
LOGS.info("[✨ BERHASIL DIAKTIFKAN! ✨]")
await checking(Ayiin)
await bot_on()
me = await Ayiin.get_me()
bo = await bot.get_me()
await Ayiin.send_message(var.BOTLOG_CHATID, ON.format(var.BOT_VER, HOSTED_ON, me.id, me.first_name, bo.id, bo.first_name))
except (ConnectionError, KeyboardInterrupt, NotImplementedError, SystemExit):
pass
except BaseException as e:
Expand Down

0 comments on commit 2de43f3

Please sign in to comment.