I have a problem when creating a user bot on the Pyrogram API. When sending a message to my Favorites, I specify an inline keyboard object, but it is not sent with the message (BUT THE MESSAGE WAS SENT SUCCESSFULLY WITHOUT A KEYBOARD). It does not output errors to the console. Is it possible that my user bot was banned for something and therefore cannot send inline keyboards?
code handler:
@Client.on_message(filters.chat(cfg.donor_list))
async def handler1(client: Client, event: Message):
key1 = InlineKeyboardButton(text='123', callback_data='123')
key = InlineKeyboardMarkup([[key1]])
await client.send_message(chat_id = cfg.technical_channel, text = 'Message', reply_markup = InlineKeyboardMarkup(
[
[InlineKeyboardButton(text = 'buttontext', callback_data= 'btn1')]
]
))
query_handler:
@Client.on_callback_query()
async def handler_query(client: Client, query: CallbackQuery):
if query.data == 'btn1':
print('answered')
await client.answer_callback_query()
All handlers load SUCCESSFULLY I really need your help, thank you!
I thought about trying to change the user bot's token, but then I found out that the token cannot be changed.
Users cannot attach an InlineKeyboard.