TelegramPlayGround / pyrogram

PyroGramFORK | Telegram MTProto API framework in Python for users and bots | PyroGramFORK
https://telegramplayground.github.io/pyrogram/
GNU Lesser General Public License v3.0
72 stars 14 forks source link

UpdateShortMessage bug #52

Open JuiceFW opened 1 month ago

JuiceFW commented 1 month ago

Checklist

Description

When I try to send a message with reply_markup - reply_markup just doesn't show up. Without any errors.

Steps to reproduce

  1. Tried to add/remove bot_token from Client.

P.S. I dont even know what I can do. The code is so simple.

Code example

item1 = types.InlineKeyboardButton("Do not resend", callback_data=f"!resend_{message.chat.id}")
markup = types.InlineKeyboardMarkup([[item1]])

await app.send_message(
    chat_id=-1002158278968,
    text = "some_text",
    reply_markup=markup
)

Logs

chat_id = -1002158278968
text="some_text"

reply_markup = {
    "_": "InlineKeyboardMarkup",
    "inline_keyboard": [
        [
            {
                "_": "InlineKeyboardButton",
                "text": "Do not resend",
                "callback_data": "!resend_-1002089543094"
            }
        ]
    ]
}
SpEcHiDe commented 1 month ago

What is app.me.is_bot ?

JuiceFW commented 1 month ago

What is app.me.is_bot ?

It is False.

SpEcHiDe commented 1 month ago

image

Only bots can send buttons.

JuiceFW commented 1 month ago

image

Only bots can send buttons.

I tried to add "bot_token" argument to Client and nothing changed. Is there a way to use the client for both the bot and the user? I am talking about "bot_token" because I have seen a video where one guy sent reply_markup and his Client had that argument.