【发布时间】:2023-12-02 18:03:02
【问题描述】:
所以我有这个 python 代码,它可以计算出频道聊天 ID,以便为给定列表中的多个频道发送消息。
我只有频道邀请链接
我仍然不知道如何仅通过名称获取频道 ID。
import os
import telebot
API_KEY = os.environ['API_KEY']
bot = telebot.TeleBot(API_KEY)
a=input("edit msg.txt to send the msg if done press enter")
message=open("message.txt","a+")
bot.send_message(chat_id,message)
【问题讨论】:
标签: telegram-bot