it keeps on awaiting for a username or link in every message I send.
@dp.message_handler(commands="posts")
async def cmd_stat(message: types.Message):
await message.answer("Input a username or else send profile link")
@dp.message_handler()
async def get_username(message: types.Message):
get_username = message.text
username = get_username.replace(URL, '').replace('/', '')
print(username)
profile = L.check_profile_id(username)
await message.answer("User found, please wait... ⏳", disable_notification=True)
profile = L.check_profile_id(username)
L.download_profile(profile)
dirname = str(username)
print('path: ', dirname)
await asyncio.sleep(1)
media = types.MediaGroup()
await types.ChatActions.upload_photo()
os.chdir(dirname)
idk if maybe there's a way to make a command to stop it
I tried if else but did not went well, I'm new to this.