我正在尝试运行一个代码,该代码将代表我每小时向我的组发送消息。但由于某种原因,它只向我最喜欢的人发送消息,而不向群组发送消息。安装了电话库。告诉我这段代码有什么问题? [![代码运行结果][1]][1]
import time
# Use your own values from my.telegram.org
api_id = 23932115
api_hash = '7dde9279e3c815a7539bb3f3d63942f294'
# The first parameter is the .session file name (absolute paths allowed)
with TelegramClient('anon', api_id, api_hash) as client:
client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))
async def main():
while True:
await client.send_message(1002172163245, '/Любой текст - тест 33/')
time.sleep(60)
with client:
client.loop.run_until_complete(main())