File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,17 @@ async def channel_post(client: Client, message: Message):
2626 base64_string = await encode (string )
2727 link = f"https://t.me/{ client .username } ?start={ base64_string } "
2828
29- if DISABLE_CHANNEL_BUTTON :
30- reply_markup = message .reply_markup
31- else :
32- reply_markup = InlineKeyboardMarkup ([[InlineKeyboardButton ("🔁 Share URL" , url = f'https://telegram.me/share/url?url={ link } ' )]])
29+ reply_markup = InlineKeyboardMarkup ([[InlineKeyboardButton ("🔁 Share URL" , url = f'https://telegram.me/share/url?url={ link } ' )]])
3330
3431 await reply_text .edit (f"<b>Here is your link</b>\n \n { link } " , reply_markup = reply_markup , disable_web_page_preview = True )
35- await post_message .edit_reply_markup (reply_markup )
32+
33+ if not DISABLE_CHANNEL_BUTTON :
34+ await post_message .edit_reply_markup (reply_markup )
3635
3736@Bot .on_message (filters .channel & filters .incoming & filters .chat (CHANNEL_ID ) & ~ filters .edited )
3837async def new_post (client : Client , message : Message ):
3938
40- if not DISABLE_CHANNEL_BUTTON :
39+ if DISABLE_CHANNEL_BUTTON :
4140 return
4241
4342 converted_id = message .message_id * abs (client .db_channel .id )
You can’t perform that action at this time.
0 commit comments