使用 telethon 库从电报组中获取所有预定消息
Fetch all scheduled messages from a telegram group using the telethon library
如何从特定组中的客户端获取所有预定的消息?我知道如何访问客户端已发送的消息,但我找不到预定的消息。
我目前是 运行 一个 python 应用程序客户端,我正在使用 telethon
如果您想检查消息是否已通过计划发送,只需检查 from_schedule
参数。
Message.from_schedule
这将 return True
或 False
您可以使用 GetScheduledHistoryRequest
这样做 https://tl.telethon.dev/methods/messages/get_scheduled_history.html
来自示例:
result = client(functions.messages.GetScheduledHistoryRequest(
peer='username',
hash=0
))
print(result.stringify())
如何从特定组中的客户端获取所有预定的消息?我知道如何访问客户端已发送的消息,但我找不到预定的消息。
我目前是 运行 一个 python 应用程序客户端,我正在使用 telethon
如果您想检查消息是否已通过计划发送,只需检查 from_schedule
参数。
Message.from_schedule
这将 return True
或 False
您可以使用 GetScheduledHistoryRequest
这样做 https://tl.telethon.dev/methods/messages/get_scheduled_history.html
来自示例:
result = client(functions.messages.GetScheduledHistoryRequest(
peer='username',
hash=0
))
print(result.stringify())