TelegramFile

 

Send files to the Telegram application. To use this feature, tokens must be generated using the Telegram Bot API.

 

Note) Image and document files can be transferred under 50MB.

Telegram message functions are transmitted using up to 1000 message queues.

When sending a message, a delay of 2 seconds is applied for the same bot.

Therefore, when 1000 message queues are generated in a short time, the last message is sent about 33 minutes later.

 

int @TelegramFile(string botToken, string chatID, string filePath, string caption)

 

Parameters

botToken : Assigned Telegram Bot Token

chatID : Chat Room ID

filePath : The path of the file to be sent

caption : caption

 

Return value

0,  It does not return whether it has been sent or not. Instead, if the transfer fails, an error will be displayed in the message window.

 

Example 1)

buf = "c:\\Autobase\\img2.gif";
@TelegramMsg("7300000000:AAGjg9MiJHEYvx2QbDjmISFISzDKZZZZZZZ", "-1000000000", buf, "gif");

 

Description: Send the file "c:\Autobase\img2.gif" and the "gif" string caption to the Telegram chat room.

 

Example 2)

buf = "c:\\Autobase\\MyScreen.png";

@ScreenSave(buf);
@TelegramFile("7308452649:AAGjg9MiJHEYvx2QbDjmISFISzDKSGpvtJs", "-1002494829817", buf,"");

 

Description: Save the screen of the Local Main program with a MyScreen.png name and send the file to the Telegram chat room.

Note) How to use Telegram Bot
1. Sign up for Telegram
2. Send a /newbot command after searching the top of BotFather
2-1. Enter a bot name
2-2. Enter bot nicknames (should end with bot)
2-3. Check botToken
3. Create a new channel from the menu -> search for the bot nickname and invite.eg. @Autobase_test_bot
4. Type the link below in the channel and click the link to check the chat ID
https://api.telegram.org/bot[Enter the bot token issued]/getUpdates
5. Use after entering telegram bot token and chatId.

 

Version Information

Supported Version: 10.3.6.24 or higher

 

Related Helps)

@SmsSend()

@SmsSendLineNotify()

@SmsWebSend()

@TelegramMsg()

@TelegramFile()