This commit is contained in:
parent
e2467803c5
commit
345168aa80
@ -12,11 +12,11 @@ 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:
|
||||
try:
|
||||
await bot.send_message(row[0], text)
|
||||
except:
|
||||
chats_id = -1001355646177
|
||||
|
||||
try:
|
||||
await bot.send_message(chats_id, text)
|
||||
except:
|
||||
print('вероятно бота нет в чате')
|
||||
await bot.send_message(message.from_user.id, 'Сообщение успешно отправлено во все чаты')
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user