when i search about this topic in google, people says just send group or channel name insist of chatID
like this
sendMessage('@testGroup','message')
but it's not work .
how can i send message to a channel ro group by my bot
thanks
use chat_id as first argument.
Like:
bot.sendMessage(-102324354, 'Hello World!');
@Assada
but how can i find channel ID?
@milad145 bot.getChat('@username')
Also, tgfancy supports sendMessage('@testGroup','message') out of the box.
tgfancy is basically node-telegram-bot-api on steroids.
tgfancy is a drop-in replacement!
@GingerPlusPlus
thanks, it was helpfull
Hi again,
i create a message with inlineKyboards
and one of keyboards is sendToAnother
is it possible when i click sendToAnother, i can choose user from my contacts
and bot get the member(or channel or group) id?
@milad145 Please create a new issue for this new query, to avoid much confusion for devs exploring issues.
Most helpful comment
@milad145
bot.getChat('@username')