Answer the question
In order to leave comments, you need to log in
Bot C# on VkNet. Why doesn't it catch all events?
Good afternoon. Why can't I catch all events? I try to write messages in a conversation with this group, but not everything is displayed in the console.
while (true) // Бесконечный цикл, получение обновлений
{
var s = vkApi.Groups.GetLongPollServer(190776459);
var poll = vkApi.Groups.GetBotsLongPollHistory(
new BotsLongPollHistoryParams()
{ Server = s.Server, Ts = s.Ts, Key = s.Key, Wait = 25 });
if (poll.Updates == null) continue; // Проверка на новые события
foreach (var a in poll.Updates)
{
if (a.Type == GroupUpdateType.MessageNew)
{
Console.Write(a.MessageNew.Message.Text);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question