Add files via upload

This commit is contained in:
S1S13AF7 2024-08-06 17:14:53 +03:00 committed by GitHub
parent 5ea2fc7d45
commit 331dabd88d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,7 +150,6 @@ async def reg_user(message: types.Message):
return reg_date return reg_date
#bot = Bot(token=TOKEN)
bot = Bot(token=TOKEN, parse_mode=types.ParseMode.HTML) #see: https://mastergroosha.github.io/aiogram-2-guide/messages/ bot = Bot(token=TOKEN, parse_mode=types.ParseMode.HTML) #see: https://mastergroosha.github.io/aiogram-2-guide/messages/
dp = Dispatcher(bot) dp = Dispatcher(bot)
@ -184,8 +183,8 @@ async def cmd_reg(message: types.Message):
snd_msg = time.strftime('%d.%m.%Y', time.localtime(rd)) snd_msg = time.strftime('%d.%m.%Y', time.localtime(rd))
await message.answer(snd_msg) await message.answer(snd_msg)
@dp.message_handler(commands=['farm','ферма','random','rand','rnd']) @dp.message_handler(commands=['random','rand','rnd'])
async def cmd_farm (message: types.Message): async def cmd_rand (message: types.Message):
user_id = int(message.from_user.id) user_id = int(message.from_user.id)
when_int = int(datetime.timestamp(message.date)) when_int = int(datetime.timestamp(message.date))
rd=await reg_user(message)#register_user#+sync rd=await reg_user(message)#register_user#+sync
@ -280,9 +279,7 @@ async def cmd_myzh (message: types.Message):
bio_str=row["bio_str"] bio_str=row["bio_str"]
u_link =f'tg://openmessage?user_id={id_user}' #fix для любителів мінять його u_link =f'tg://openmessage?user_id={id_user}' #fix для любителів мінять його
expr_str=re.sub(r'.20', r'.',row["expr_str"]) #.2024->.24 expr_str=re.sub(r'.20', r'.',row["expr_str"]) #.2024->.24
#all_sicknes.append(f"{bio_str} @{id_user}#{expr_str}\n")#слать текстом //old v. a_href = f'<a href="{u_link}"><code>@{id_user}</code></a>'
#a_href = f'<a href="{u_link}">@{id_user}</a>'#Або можна поставить лінки на users
a_href = f'<a href="{u_link}"><code>@{id_user}</code></a>'#або копіпабельні @{id}
all_sicknes.append(f"{bio_str} {a_href}#{expr_str}\n") all_sicknes.append(f"{bio_str} {a_href}#{expr_str}\n")
if len(all_sicknes)!=0: if len(all_sicknes)!=0:
all_sicknes=f'{who}\n{"".join(all_sicknes)}' all_sicknes=f'{who}\n{"".join(all_sicknes)}'