It would be more convenient for me to use the file from a computer, rather than download it from a specific link.
How i can send a picture from hard driver with using sendphotoasync in Telegram.Bot?
using System;
using Telegram.Bot;
using System.IO;
namespace iBot
{
class Program
{
public static DateTime timeReplacement = DateTime.Parse(Config.TimeReplacement);
private static TelegramBotClient client;
public static void Main()
{
client = new TelegramBotClient(Config.ApiToken);
for(int i = 0; ; i++)
{
DateTime nowTime = DateTime.Now;
var date = DateTime.Now.ToShortDateString();
if (nowTime.ToShortTimeString() == timeReplacement.ToShortTimeString())
{
client.SendPhotoAsync(Config.ChatId, Config.Link, $"Replacements: {date}");
client.StopReceiving();
break;
}
}
}
}
}