示例#1
0

class First(StatesGroup):
    work_with_images_one = State()
    work_with_images_two = State()
    work_with_images_three = State()
    work_with_images_four = State()


class Second(StatesGroup):
    gradation_transformations_one = State()
    gradation_transformations_two = State()
    gradation_transformations_three = State()


settings = Settings.from_json(pathlib.Path('./config.json'))
bot = Bot(token=settings.telegram_bot_token)
dp = Dispatcher(bot, storage=MemoryStorage())

logging.basicConfig(format="%(asctime)s %(name)s[%(levelname)s]: %(message)s",
                    level=logging.INFO)
log = logging.getLogger(__name__)


@dp.message_handler(commands=['start', 'help'], state=None)
async def main_send_welcome(message: types.Message):
    """Process start and help command.

    Args:
        message: Message from telegram update.
    """