danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.83k stars 651 forks source link

How to send messages to the robot through MadelineProto, please give a successful example #1526

Closed cnstephen closed 3 months ago

cnstephen commented 3 months ago

I just want to send a message to the robot through this, and I have encountered problems after trying many times through the code given by ai. Can anyone give me an example? I will be grateful help me.

danog commented 3 months ago

Please only use the examples listed in this repo (examples folder) and on https://docs.madelineproto.xyz, AI will always give invalid code for MadelineProto.

You're probably looking for https://github.com/danog/MadelineProto/blob/v8/examples/bot.php or https://github.com/danog/MadelineProto/blob/v8/examples/simpleBot.php