forked from Pavel_Durov/python_bot
test
This commit is contained in:
parent
e2467803c5
commit
345168aa80
@ -12,10 +12,10 @@ async def sendall(message: types.Message):
|
||||
if message.from_user.id == 226765676:
|
||||
text = message.text[9:]
|
||||
try:
|
||||
chats_id = session.query(user.chat_id).distinct()
|
||||
for row in chats_id:
|
||||
chats_id = -1001355646177
|
||||
|
||||
try:
|
||||
await bot.send_message(row[0], text)
|
||||
await bot.send_message(chats_id, text)
|
||||
except:
|
||||
print('вероятно бота нет в чате')
|
||||
await bot.send_message(message.from_user.id, 'Сообщение успешно отправлено во все чаты')
|
||||
|
Loading…
Reference in New Issue
Block a user