Closed N3R00 closed 2 years ago
Is the bot in the channel with any privileges?
If not, put the bot in the channel and send a random message. Now try sending the message as you were doing before.
Method getChat return information about the chat The first parameter of the sendMessage method is the chat id In your case, the chat id is -1611586710 try
const chatId = -1611586710;
bot.sendMessage(chatId, 'HelloWorld');
I'm trying to send messages to a channel I have, but it just gives me an error that the chat was not found
let chat = await bot.getChat(-1611586710) bot.sendMessage(chat, 'Hello World!');