Deepthought icon indicating copy to clipboard operation
Deepthought copied to clipboard

Send a Message to a Telegram User

Open chri1389 opened this issue 7 years ago • 1 comments

Hello, I have import this project in Eclipse and I have modify the main parameters: APIKEY, APIHASH, PHONENUMBER and the Database MySQL parameters....

The project run well.

Now I have a question.

How can I modify the main class (Deepthought.java) to send a simple message to a specific user?

Thank you very much!

Best Regards

chri1389 avatar Feb 07 '18 10:02 chri1389

hi, you see my example

IKernelComm kernelComm = kernel.getKernelComm();
final IUser user = databaseManager.getUserById(kernelComm.getCurrentUserId());
if (user != null) {
	kernelComm.sendMessage(user, message);
}
kernelComm.sendMessage(user, message);

onixred avatar Jun 08 '18 14:06 onixred