예제 #1
0
try:
    from commands import *
    from commands.id9 import ID

    id = ID()
except ImportError:
    import os

    os.system("pip install git+https://github.com/egigoka/commands")
try:
    import todoist
except ImportError:
    from commands.pip9 import Pip

    Pip.install("todoist-python")
    import todoist
try:
    import pytz
except ImportError:
    from commands.pip9 import Pip

    Pip.install("pytz")
    import pytz
try:
    import tzlocal
except ImportError:
    from commands.pip9 import Pip

    Pip.install("tzlocal")
    import tzlocal
예제 #2
0
import requests
try:
    from commands import *
except ImportError:
    from bootstrapping_module import *
    from commands import *
try:
    import telebot
except ImportError:
    from commands.pip9 import Pip
    Pip.install("pytelegrambotapi")
    import telebot


def safe_start_bot(
    bot_func,
    skipped_exceptions=(requests.exceptions.ReadTimeout,
                        requests.exceptions.ConnectionError,
                        requests.exceptions.ChunkedEncodingError)):
    ended = False
    while not ended:
        try:
            bot_func()
            ended = True
        except skipped_exceptions as e:
            print(
                f"{e} {e.args} {e.with_traceback(e.__traceback__)}... {Time.dotted()}"
            )
            Time.sleep(5)

예제 #3
0
#! python3
# -*- coding: utf-8 -*-
import datetime
try:
    from commands import *
except ImportError:
    import os
    os.system("pip install git+https://github.com/egigoka/commands")
    from commands import *
try:
    import telebot
except ImportError:
    from commands.pip9 import Pip
    Pip.install(
        "pytelegrambotapi")  # https://github.com/eternnoir/pyTelegramBotAPI
    import telebot
import time
import telegrame

__version__ = "0.0.1"

my_chat_id = 5328715
ola_chat_id = 550959211
tgx_chat_id = 619037205

encrypted_telegram_token = [
    -13, -19, -49, -21, -61, -51, -40, 5, -21, -13, -40, -6, -41, 7, 8, 32, -1,
    50, -8, 28, -32, -34, -10, 3, -14, 46, -25, -14, -42, -26, 9, 59, 28, 49,
    -32, 8, -34, -9, -7, 41, 48, 46, 1, 38, -26
]