A
A
Artem Melnykov2019-12-06 08:56:35
PHP
Artem Melnykov, 2019-12-06 08:56:35

How to force a bot to write to a group?

I am writing a bot for a telegram, but a problem arose:
The bot should write to the group, not to the LAN.
Please tell me the method in the API for sending a message to the channel.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Marat Garifullin, 2018-12-29
@INDIGO1

at the beginning it is not clear, the same thing is indicated twice
If you need to fill the main array with subarrays, then

$newArray = [];
$newArray[] = $subArray1;
$newArray[] = $subArray2;
$newArray[] = $subArray3;

A
Anton Neverov, 2019-12-06
@TTATPuOT

Sending a message to a group is no different from sending a message to a LAN. Method one - sendMessage.
Instead of the username of the user, you need to specify the group id. You can get the id through notifications of new messages in the group.
By the way, messages are sent to the channel in the same way.

H
Hello World, 2019-12-06
@kartoxa18

To spam in a group?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question