CTBot
CTBot copied to clipboard
How to check for new messages only?
How to check for new messages without deleting them? Something like myBot.checkNewMessage(msg) If several clients are connected to the bot. The client to whom the message is intended should delete it.
Can you implement that?
Hello 20flint12,
I'm not sure if it is allowed by Telegram (checking a bot from several clients). BTW there is a new version in the v3.0.0 branch, check it out.
If you install that library, you can use the getNewMessage()
method with another optional message mode
:
CTBotGetMessageNoOption - no blocking, no destructive
CTBotGetMessageDestructuve - once read, the message is no more retrieved
CTBotGetMessageBlocking - wait until a Telegram Server response
CTBotGetMEssageBlockingDestructive - the sum of the two effects
This should be the functionalities that you asked for. Please let me know if it works. Cheers,
Stefano