def forwardToAll(bot, list_of_chats, from_chat_id, message_id):
logger.debug("List of chats to forward a message to: %s" % list_of_chats)
if not list_of_chats: #If there are no chats to foward to.
return
for chat in list_of_chats:
try:
bot.forward_message(chat_id=chat,
from_chat_id=from_chat_id,
message_id=message_id)
except TelegramError as te:
logger.debug("Unable to send message to %s from %s. May want to remove it, or resolve the thread." %(chat, from_chat_id))
logger.debug("Error from forward to all: %s" % te)
评论列表
文章目录