我使用的代码如下:
_clientTelegram.OnUpdate += ListenUpdate;以及侦听器更新的Handler:
private async Task ListenUpdate(IObject arg)
{
if (arg is not UpdatesBase updates)
{
_logger.LogWarning($"received not UpdatesBase event: {arg.GetType()}");
return;
}
foreach (var update in updates.UpdateList)
switch (update)
{
case UpdateNewMessage unm: await ProcessEventMessage(unm.message); break;
case UpdateEditMessage uem: await ProcessEventMessage(uem.message); break;
default: _logger.LogInformation($"handle a type message type: {update.GetType().Name}"); break;
}
}还有什么事件的名称,我在哪里加上了新的评论?
还是在我必须使用的每一个UpdateEditMessage上使用await _clientTelegram.Messages_GetReplies(peerChanel, telegramMessageId, limit: MaxRowsComments)?
发布于 2022-10-28 11:56:49
通道注释只是发布在与频道相关的讨论组中的消息。
因此,最简单的解决方案是加入讨论组,并为该组对等方处理UpdateNewMessage。
https://stackoverflow.com/questions/74227376
复制相似问题