How do i use offset in my code
SecretV opened this issue · 4 comments
SecretV commented
hi i want to get the offset but i dont know how! and this is my code till now
static void Main(string[] args)
{
bot.OnUpdate += Bot_OnUpdate;
bot.StartReceiving();
Thread.Sleep(int.MaxValue);
}
private static void Bot_OnUpdate(object sender, Telegram.Bot.Args.UpdateEventArgs e)
{
Console.WriteLine(e.Update.ChannelPost.Text);
}
MihaZupan commented
What offset?
Do check out the example bot https://telegrambots.github.io/book/1/quickstart.html
SecretV commented
@MihaZupan i cant get the messages sent to my bot when my bot is offline , i can only get the messages that has been send to my bot when my bot in online
MihaZupan commented
You will get all available messages when you start the bot. If the downtime is prolonged you are not guaranteed to get any messages from before.
The bot should be "online" all the time to receive messages.
karb0f0s commented
@SecretV Telegram Bot API does not provide any way to access message history. Feel free to join our Telegram.Bot library group.