- message.text == 'Отправить сообщение' or message.text == 'Статистика за неделю' or message.text == 'Статистика за месяц'
+ message_text in ['Отправить сообщение', 'Статистика за неделю' , 'Статистика за месяц']
TO = 12345678 # кому
FROM = 87654321 # из какого чата
ID = 7 # id сообщения из чата FROM
"""
ЧАТ 87654321:
- сообщение: "Привет, мир!", id=7
ЧАТ 12345678:
---
"""
bot.copy_message(user,call.message.chat.id,int(message_id))
"""
ЧАТ 87654321:
- сообщение: "Привет, мир!", id=7
ЧАТ 12345678:
- сообщение: "Привет, мир!", id=1
"""
def getMainButtons():
kb = types.ReplyKeyboardMarkup(resize_keyboard=True)
some_button = types.KeyboardButton("КНОПКИ")
kb.add(some_button )
return kb
# reply_markup=getMainButtons()
if(message.text == "wiki"):
from pyrogram import Client
api_id = 12345
api_hash = "0123456789abcdef0123456789abcdef"
PostChannel = 'channel'
app = Client("my_account", api_id, api_hash)
def GetScheduledMsg():
with app:
n = True
for message in app.get_chat_history(PostChannel):
if message.from_scheduled:
print(message.text)
n = False
if n:
print('нету')
GetScheduledMsg()