try 使用此代码在telegram 中向机器人发送表情符号
text_found = None
messagetosend = '????'
with TelegramClient(username, api_id, api_hash) as client:
@client.on(events.NewMessage(chats = botname))
async def my_event_handler(event):
global text_found
text_found = event.raw_text
await client.disconnect()
# client(functions.messages.StartBotRequest(bot = botname, peer = '@user', start_param = emoji.emojize(':House Building:')+' Мой Кабинет'))
client(functions.messages.StartBotRequest(bot = botname, peer = '@user', start_param = messagetosend))
client.run_until_disconnected()
print(text_found)
但是接收错误-启动参数无效(由StartBotRequest引起)如何修复这个问题?