Beispiel #1
0
    "bin/megadown",
    "https://raw.githubusercontent.com/yshalsager/cmrudl.py/master/cmrudl.py":
    "bin/cmrudl",
}

for binary, path in binaries.items():
    downloader = SmartDL(binary, path, progress_bar=False)
    downloader.start()
    os.chmod(path, 0o755)

# 'bot' variable
if STRING_SESSION:
    # pylint: disable=invalid-name
    bot = UserBot(StringSession(STRING_SESSION),
                  API_KEY,
                  API_HASH,
                  connection_retries=None,
                  auto_reconnect=False,
                  lang_code='en')
else:
    # pylint: disable=invalid-name
    bot = UserBot("userbot",
                  API_KEY,
                  API_HASH,
                  connection_retries=None,
                  auto_reconnect=False,
                  lang_code='en')


async def check_botlog_chatid():
    if not BOTLOG_CHATID and LOGSPAMMER:
        LOGS.info(
Beispiel #2
0
    github = Github(GITHUB_USERNAME, GITHUB_PASSWORD)
else:
    github = None

CURRENCY_API = os.environ.get("CURRENCY_API", None)

GDRIVE_FOLDER = os.environ.get("GDRIVE_FOLDER", None)

SPAMWATCH_API_KEY = os.environ.get("SPAMWATCH_API_KEY", None)
if SPAMWATCH_API_KEY:
    spamwatch = SpamWatch(SPAMWATCH_API_KEY, host="https://staging.spamwat.ch")
else:
    spamwatch = None

# pylint: disable=invalid-name
bot = UserBot("userbot", API_KEY, API_HASH)


async def check_botlog_chatid():
    if not BOTLOG:
        return

    entity = await bot.get_entity(BOTLOG_CHATID)
    if entity.default_banned_rights.send_messages:
        LOGS.error(
            "Your account doesn't have rights to send messages to BOTLOG_CHATID "
            "group. Check if you typed the Chat ID correctly.")
        quit(1)


with bot: