Exemplo n.º 1
0
BOTLOG_CHATID = int(os.environ.get("BOTLOG_CHATID")) if BOTLOG else 0

UPSTREAM_REPO_URL = os.environ.get(
    "UPSTREAM_REPO_URL", "https://github.com/HitaloSama/PaperplaneMinimal.git")

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

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

WELCOME_MUTE = sb(os.environ.get("WELCOME_MUTE", "False"))

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

TEMP_DOWNLOAD_DIRECTORY = os.environ.get("TMP_DOWNLOAD_DIRECTORY",
                                         "./downloads")

BIO_PREFIX = os.environ.get("BIO_PREFIX", None)
DEFAULT_BIO = os.environ.get("DEFAULT_BIO", None)

LASTFM_API = os.environ.get("LASTFM_API", None)
LASTFM_SECRET = os.environ.get("LASTFM_SECRET", None)
LASTFM_USERNAME = os.environ.get("LASTFM_USERNAME", None)
LASTFM_PASSWORD_PLAIN = os.environ.get("LASTFM_PASSWORD", None)
LASTFM_PASS = md5(LASTFM_PASSWORD_PLAIN)
if not LASTFM_USERNAME == "None":
Exemplo n.º 2
0
    lastfm = None

GITHUB_USERNAME = os.environ.get("GITHUB_USERNAME", None)
GITHUB_PASSWORD = os.environ.get("GITHUB_PASSWORD", None)
if GITHUB_USERNAME and GITHUB_PASSWORD:
    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 "