from aiogram import Router, types
from aiogram.fsm.context import FSMContext
from aiogram.fsm.state import State, StatesGroup
from aiogram.types import (
    Message,
    ReplyKeyboardMarkup,
    KeyboardButton,
    InlineKeyboardMarkup,
    InlineKeyboardButton
)
from aiogram import Bot
from aiogram.utils.keyboard import InlineKeyboardBuilder, ReplyKeyboardBuilder
from aiogram.filters.command import Command, CommandObject
from aiogram.filters.callback_data import CallbackData
from core.middleware import AdminMiddleware
from aiogram.types import FSInputFile
from aiogram import F
from typing import Optional
from contextlib import suppress
from aiogram.exceptions import TelegramBadRequest
from dbase.db import DataBase
import cfg
import urllib.parse as urlib
import uuid, hashlib, json
from datetime import datetime
from core.keyboard import *
from source_dir.photoedit import *

bot = Bot(token=cfg.TOKEN)

router = Router()
router.message.outer_middleware(AdminMiddleware())

db = DataBase(file=cfg.DATABASE_URL)

@router.message(lambda message: message.text == "⚠Поддержка")
async def cmd_help(message: Message, state: FSMContext):
    await message.answer('По всем техническим вопросам обращайтесь к @nerd', reply_markup=menu_kb())
