Quick fixes
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
from aiogram import Router, Bot, F
|
from aiogram import Router, F
|
||||||
from aiogram.types import (
|
from aiogram.types import (
|
||||||
CallbackQuery
|
CallbackQuery
|
||||||
)
|
)
|
||||||
|
|
||||||
from .factories.full_menu import FullMenuCallback
|
from .factories.full_menu import FullMenuCallback
|
||||||
|
|
||||||
router = Router()
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
@router.callback_query(FullMenuCallback.filter(F.action == 'settings'))
|
@router.callback_query(FullMenuCallback.filter(F.action == 'settings'))
|
||||||
async def on_close(callback_query: CallbackQuery, bot: Bot):
|
async def on_close(callback_query: CallbackQuery):
|
||||||
await callback_query.answer('Settings are not available yet')
|
await callback_query.answer('Settings are not available yet')
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
from aiogram import Router, Bot, F
|
from aiogram import Router, F
|
||||||
from aiogram.types import (
|
from aiogram.types import (
|
||||||
InlineQuery, InputTextMessageContent, InlineQueryResultArticle
|
InlineQuery, InputTextMessageContent, InlineQueryResultArticle
|
||||||
)
|
)
|
||||||
|
|
||||||
from bot.keyboards.inline.full_menu import get_full_menu_kb
|
from bot.keyboards.inline.full_menu import get_full_menu_kb
|
||||||
|
|
||||||
router = Router()
|
router = Router()
|
||||||
|
|
||||||
|
|
||||||
@router.inline_query(F.query == '')
|
@router.inline_query(F.query == '')
|
||||||
async def empty_inline_query(inline_query: InlineQuery, bot: Bot):
|
async def empty_inline_query(inline_query: InlineQuery):
|
||||||
await inline_query.answer(
|
await inline_query.answer(
|
||||||
[
|
[
|
||||||
InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ import os
|
|||||||
import traceback
|
import traceback
|
||||||
import contextlib
|
import contextlib
|
||||||
import re
|
import re
|
||||||
|
from typing import Type
|
||||||
|
|
||||||
|
|
||||||
class PrettyException:
|
class PrettyException:
|
||||||
def __init__(self, e: Exception):
|
def __init__(self, e: Type[BaseException] | Exception):
|
||||||
self.long = f"""
|
self.long = f"""
|
||||||
😍 {e.__class__.__name__}
|
😍 {e.__class__.__name__}
|
||||||
👉 {"".join(traceback.format_exception_only(e)).strip()}
|
👉 {"".join(traceback.format_exception_only(e)).strip()}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class MemoryStorageRecord:
|
|||||||
|
|
||||||
|
|
||||||
class StorageDict(DefaultDict):
|
class StorageDict(DefaultDict):
|
||||||
def __init__(self, default_factory=None, **kwargs) -> None:
|
def __init__(self, default_factory=None) -> None:
|
||||||
if type(db.fsm.get('fsm')) is not dict:
|
if type(db.fsm.get('fsm')) is not dict:
|
||||||
db.fsm['fsm'] = dict()
|
db.fsm['fsm'] = dict()
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ shazamio = { path = "lib/ShazamIO" }
|
|||||||
sqlitedict = "^2.1.0"
|
sqlitedict = "^2.1.0"
|
||||||
spotipy = "^2.23.0"
|
spotipy = "^2.23.0"
|
||||||
attrs = "^23.1.0"
|
attrs = "^23.1.0"
|
||||||
ytmusicapi = "^1.3.0"
|
ytmusicapi = "^1.3.1"
|
||||||
pytube = "^15.0.0"
|
pytube = "^15.0.0"
|
||||||
pydub = "^0.25.1"
|
pydub = "^0.25.1"
|
||||||
aiohttp = "^3.8.6"
|
aiohttp = "^3.8.6"
|
||||||
|
|||||||
Reference in New Issue
Block a user