async def delSub(message: types.Message): subject_name = message.text[6:].split(' ') if len(subject_name) != 1: await message.answer("Incorrect input for /drop command, use /help") else: try: Storage.DeleteService(message.from_user.id, subject_name) await message.answer("All tasks from " + subject_name[0] + " were deleted successfully!") except Exception as e: print(e) print("Can't delete subject with this name")