diff --git a/bot/callbacks/streams.py b/bot/callbacks/streams.py index 9983094..9bad90e 100755 --- a/bot/callbacks/streams.py +++ b/bot/callbacks/streams.py @@ -22,33 +22,31 @@ async def _(client: Client, callback: CallbackQuery): if VOICE_CHATS[callback.message.chat.id].is_video_paused: await VOICE_CHATS[callback.message.chat.id].set_pause(False) - return await callback.edit_message_text( - callback.message.text, + return await callback.edit_message_reply_markup( reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( - "\u25B6\uFE0F", + "⏸️", callback_data="pause_or_resume", ), - InlineKeyboardButton("\u23ED\uFE0F", callback_data="next"), + InlineKeyboardButton("⏭️", callback_data="next"), ], ] ), ) await VOICE_CHATS[callback.message.chat.id].set_pause(True) - return await callback.edit_message_text( - callback.message.text, + return await callback.edit_message_reply_markup( reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( - "\u23F8\uFE0F", + "▶️", callback_data="pause_or_resume", ), - InlineKeyboardButton("\u25B6\uFE0F", callback_data="next"), + InlineKeyboardButton("▶️", callback_data="next"), ], ] ), diff --git a/bot/commands/play_song.py b/bot/commands/play_song.py index f637057..57e7f43 100755 --- a/bot/commands/play_song.py +++ b/bot/commands/play_song.py @@ -117,13 +117,13 @@ async def _(client: Client, message: Message): reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( "⏸️", callback_data="pause_or_resume", ), InlineKeyboardButton( - "\u23ED\uFE0F", + "⏭️", callback_data="next", ), ], @@ -162,7 +162,7 @@ async def _(client: Client, message: Message): position=position, ) return await msg.edit( - f"__Added to queue at {position} \n\n Title: [{name}]({url})\nDuration: {duration} Minutes\n Requested by:__ [{data['first_name']}]({data['mention']})", + f"__Added to queue at {position} \n\n Title: [{name}]({url_mention})\nDuration: {duration} Minutes\n Requested by:__ [{data['first_name']}]({data['mention']})", reply_markup=InlineKeyboardMarkup( [[InlineKeyboardButton("cʟᴏꜱᴇ", callback_data="close")]] ), @@ -190,13 +190,13 @@ async def _(client: Client, message: Message): reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( "\u23F8\uFE0F", callback_data="pause_or_resume", ), InlineKeyboardButton( - "\u23ED\uFE0F", + "⏭️", callback_data="next", ), ], diff --git a/bot/commands/play_video.py b/bot/commands/play_video.py index 308a9da..c2e3a60 100755 --- a/bot/commands/play_video.py +++ b/bot/commands/play_video.py @@ -78,14 +78,12 @@ async def _(client: Client, message: Message): reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( "\u23F8\uFE0F", callback_data="pause_or_resume", ), - InlineKeyboardButton( - "\u23ED\uFE0F", callback_data="next" - ), + InlineKeyboardButton("⏭️", callback_data="next"), ], ], ), @@ -148,13 +146,13 @@ async def _(client: Client, message: Message): reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( "\u23F8\uFE0F", callback_data="pause_or_resume", ), InlineKeyboardButton( - "\u23ED\uFE0F", + "⏭️", callback_data="next", ), ], @@ -210,12 +208,12 @@ async def _(client: Client, message: Message): reply_markup=InlineKeyboardMarkup( [ [ - InlineKeyboardButton("\u23EA", callback_data="back"), + InlineKeyboardButton("⏪", callback_data="back"), InlineKeyboardButton( "\u23F8\uFE0F", callback_data="pause_or_resume", ), - InlineKeyboardButton("\u23ED\uFE0F", callback_data="next"), + InlineKeyboardButton("⏭️", callback_data="next"), ], ], ), diff --git a/bot/commands/streaming.py b/bot/commands/streaming.py index 8076724..370179c 100755 --- a/bot/commands/streaming.py +++ b/bot/commands/streaming.py @@ -14,6 +14,7 @@ remove_queue, ) + @kreacher.on_message(filters.regex(pattern="^[!?/]streaming")) @only_grps_chnns async def _(client: Client, message: Message): diff --git a/bot/decorators/only_managers.py b/bot/decorators/only_managers.py index ddf5c9d..a36df12 100755 --- a/bot/decorators/only_managers.py +++ b/bot/decorators/only_managers.py @@ -12,29 +12,29 @@ def only_managers(func): @functools.wraps(func) async def _(client: Client, anything): try: - if isinstance(any, Message): - if not any.chat.type == ChatType.PRIVATE: + if isinstance(anything, Message): + if not anything.chat.type == ChatType.PRIVATE: user = await client.get_chat_member( anything.chat.id, anything.from_user.id ) if not user.privileges: - return await any.reply( + return await anything.reply( "**__You are not my master, you do not order me what to do, bye__** \U0001f621" ) - elif isinstance(any, CallbackQuery): - if not any.message.chat.type == ChatType.PRIVATE: + elif isinstance(anything, CallbackQuery): + if not anything.message.chat.type == ChatType.PRIVATE: user = await client.get_chat_member( - any.message.chat.id, any.message.from_user.id + anything.message.chat.id, anything.message.from_user.id ) if not user.privileges: return await client.answer_callback_query( - any.id, + anything.id, text="**__You are not my master or played user, you cannot execute this action.__** \U0001f621", show_alert=True, ) - await func(client, any) - except Exception as e: - logging.error(e) + await func(client, anything) + except Exception as err: + logging.error(err) return _