Contents
Input
- Credentials
● Token - Chat Id
- Message
- File (file path) (Only when sending as a User)
Crate a Telegram bot
- Login to your Telegram account (either with browser or with app): https://t.me/botfather
- Send messages to BotFather
- Click ‘START’.
- Type ‘/newbot’.
- Type the name of your bot.
- Type the username for your bot.
- Save your token.
3. Invite your bot into a channel and send messages.
Parameter Settings
1. ‘Find a Chat Id’: To get a chat id, you must invite the bot into the channel and start the conversation.
- ‘id’ is Chat Id
- The output may be different depending on the types of a chat which are private, channel, group, and supergroup.
2. ‘Send a message and file’
Return Value
- Select [Sting]
- Success: User definable (default is 0)
- Failure: Print error message but the bot will still run